call forwarding issue with anonymous (Blocked Caller ID)

RCCradio

New Member
Nov 12, 2025
5
0
1
56
Our setup:
Someone calls in on a number +1 (555) 555-0826, which gets forwarded to an answering service +1 (555) 555-6211. I have a dial plan set-up that when someone calls in it forwards to 982615555556211. The dial plan strips the prefix "9826", and sets the 'effective_caller_id_name" and "effective_caller_id_number" to 15555550826. This was the answering service knows what company the person is calling. Everything works until someone with a anonymous, or blocked caller ID, calls. When they call the Caller ID is blocked when the call is forwarded. I've tried using the "action unset sip_h_Privacy", "action unset sip_h_Privacy=id", "action unset sip_h_Privacy=none", "action set sip_h_Privacy=id", and "action set sip_h_Privacy=none". I've also tried using the "outbound_caller_id_name" and "outbound_caller_id_number", but nothing seems to work to turn off the blocked caller id.
Code:
Tag         Type                 Data                                                                                 Break     Inline     Group     Order     Enabled     Delete
condition     ${user_exists}         false                                                                                                 0         10         true     
condition     destination_number     ^9826(\d{11})$                                                                                         0         20         true     
action         set                 sip_h_accountcode=${accountcode}                                                                    0         30         true     
action         export                 call_direction=outbound                                                                     true     0         40         true     
action         unset                 call_timeout                                                                                         0         50         true     
action         set                 hangup_after_bridge=true                                                                             0         60         true     
action         set                 effective_caller_id_name=15555550826                                                                 0         70         true     
action         set                 effective_caller_id_number=15555550826                                                                 0         80         true     
action         set                 inherit_codec=true                                                                                     0         90         true     
action         set                 ignore_display_updates=true                                                                         0         100     true     
action         set                 callee_id_number=$1                                                                                 0         110     true     
action         set                 continue_on_fail=1,2,3,6,18,21,27,28,31,34,38,41,42,44,58,88,111,403,501,602,607,809                 0         120     true     
action         unset                 sip_h_Privacy=none                                                                                     0         121     true     
action         set                 outbound_caller_id_name=15555550826                                                                 0         122     true     
action         set                 outbound_caller_id_number=15555550826                                                                 0         123     true     
action         set                 outbound_prefix=9826                                                                                 0         130     true     
action         bridge                 sofia/gateway/Telnyx/$1                                                                             0         140     true
 
check this thread. There is a very specific order in which you need to do things otherwose it doesn't seem to work.

 
check this thread. There is a very specific order in which you need to do things otherwose it doesn't seem to work.

Thank you for this. I tried it and at first it didn't work.
I had to add the

<action application="privacy" data="no"/>

XML:
<extension name="Telnyx.9826d11" continue="false" uuid="XXXX">
    <condition field="${user_exists}" expression="false"/>
    <condition field="destination_number" expression="^9826(\d{11})$">
        <action application="set" data="sip_h_accountcode=${accountcode}"/>
        <action application="set" data="sip_cid_type=none"/>
        <action application="unset" data="sip_h_Privacy"/>
        <action application="privacy" data="no"/>
        <action application="export" data="call_direction=outbound" inline="true"/>
        <action application="unset" data="call_timeout"/>
        <action application="set" data="hangup_after_bridge=true"/>
        <action application="set" data="effective_caller_id_name=15555550826"/>
        <action application="set" data="effective_caller_id_number=15555550826"/>
        <action application="set" data="inherit_codec=true"/>
        <action application="set" data="ignore_display_updates=true"/>
        <action application="set" data="callee_id_number=$1"/>
        <action application="set" data="continue_on_fail=1,2,3,6,18,21,27,28,31,34,38,41,42,44,58,88,111,403,501,602,607,809"/>
        <action application="set" data="outbound_caller_id_name=15555550826"/>
        <action application="set" data="outbound_caller_id_number=15555550826"/>
        <action application="set" data="outbound_prefix=9826"/>
        <action application="bridge" data="sofia/gateway/XXXXXX/$1"/>
    </condition>
</extension>
 
Last edited:
Well found an issue, I spelt privacy wrong. It's updated in the post now. This was causing the calls to show as failed in the call history and not getting recorded. The calls still forwarded correctly.