I think it should work without that 'continue="true"' in 'extension name="public_did_11234567890"' and without 'hangup_after_bridge=true' 19.02.2016, 22:38, "Jerry Kendall" <jerry.kendall@fiberconx.com>:
Hello all....
I'm trying to add code to the dialplan to handle the UNALLOCATED_NUMBER error.
I'm in Canada, when I call a US based 800 number I should, and now am getting UNALLOCATED_NUMBER error from the Canadian based ITSP. However, I want to handle it in the DialPlan. I want to tell the users, via audio file playback, that the number is not assigned/allocated.
I have looked in lots of places and found references to transfer_on_fail and a few other ideas and have tried many but, I just can't seem to make this work.
Not sure if this is the best way to handle this.
my 'default' dialplan has this------------- <include> <!-- North American Outbound call: DID: 1NxxNxxXXXX GW: GW-0 --> <extension name="public_did_11234567890" continue="true"> <condition field="${caller_id_number}" expression="^11234567890$"/> <condition field="${destination_number}" expression="^1?([2-9]\d{2}[2-9]\d{2}\d{4})$">
<action application="set" data="hangup_after_bridge=true"/> <action application="set" data="continue_on_fail=true"/> <action application="set" data="transfer_on_fail=UNALLOCATED_NUMBER UNALLOCATED_NUMBER xml error"/>
<action application="bridge" data="sofia/gateway/GW-0/1$1"/>
</condition>
</extension> </include>
and I have the following in for UNALLOCATED_NUMBER extension---- <include> <extension name="UNALLOCATED_NUMBER" continue="true"> <condition field="destination_number" expression="UNALLOCATED_NUMBER" continue="false" break="on-true"> <action application="sleep" data="1000"/> <action application="playback" data="$${conf_dir}/sounds/unallocated_number.wav"/> <action application="hangup" data="NORMAL_CLEARING"/> </condition> </extension> </include>
Jerry
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org