<include>
<extension name="public_did">
<condition field="ani" expression="^(\+?|\+1?|1?)(\d+).*$" break="never">
<action application="set" data="effective_caller_id_number=$2"/>
<action application="set" data="effective_caller_id_name=$2"/>
</condition>
<condition field="${sip_to_user}" expression="^(\+1?|\+|1?|011?)(\d+).*$" break="never">
<action application="set" data="continue_on_fail=false"/>
<action application="set" data="hangup_after_bridge=true"/>
<action application="set" data="domain_name=$${domain}"/>
<action application="set" data="bypass_media=true"/>
<action application="limit_hash" data="in cc_blades 4200 !USER_BUSY"/>
<action application="bridge" data="{sip_invite_domain=${sip_from_host}}sofia/gateway/${distributor(cc_blades)}/$2"/>
</condition>
</extension>
</include>
then even though the expression/conditions seem to match, none of the digits are being stripped off. Shouldn't this be stripping off digits??
Here's the debug output:
Dialplan: sofia/external/16469NNNNNN Regex (PASS) [public_did] ani(16469NNNNNN;phone-context=+1) =~ /^(\+?|\+1?|1?)(\d+).*$/ break=never
Dialplan: sofia/external/16469NNNNNN Action set(effective_caller_id_number=16469NNNNNN)
Dialplan: sofia/external/16469NNNNNN Action set(effective_caller_id_name=16469NNNNNN)
Dialplan: sofia/external/16469NNNNNN Regex (PASS) [public_did] ${sip_to_user}(011390NNNNNNNNNN;phone-context=+39) =~ /^(\+1?|\+|1?|011?)(\d+).*$/ break=never
Dialplan: sofia/external/16469NNNNNN Action set(continue_on_fail=false)
Dialplan: sofia/external/16469NNNNNN Action set(hangup_after_bridge=true)
Dialplan: sofia/external/16469NNNNNN Action set(domain_name=208.72.186.166)
Dialplan: sofia/external/16469NNNNNN Action set(bypass_media=true)
Dialplan: sofia/external/16469NNNNNN Action limit_hash(in cc_blades 4200 !USER_BUSY)
Dialplan: sofia/external/16469NNNNNN Action bridge({sip_invite_domain=${sip_from_host}}sofia/gateway/${distributor(cc_blades)}/011390NNNNNNNNNN)
why're the '1' in the ANI and '011' in the DNIS/sip_to_user being stripped off???