strange behavior in setting origination_caller_id_number
I have a very simple call plan to allow internal extension to call external PSTN numbers. See below. <extension name="domestic.example.com"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=11111111"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <=== NOT WORK <!--action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/--> <=== NOT WORK <action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/> <=== WORKS!! </condition> </extension> There a couple of things strange here: 1. I have to put origination_caller_id_number inside data field of "bridge" application in order for the dialing out to happen. Why putting it outside as channel variable does not work? 2. Actually because bridge command is for leg-B, really it should be "effective_caller_id_number" not "origination_caller_id_number". Is that right? I'm using IDT express as SIP carrier. I don't know if they changed something or I changed configuration in freeswitch. Now it seems I have to set origination_caller_id_number if I want to use IDT for outbound calls. I'd really appreciate your help. Cheers. Jun
Sorry! The 2nd "NOT WORK" example was meant to show setting "effective_caller_id_number", not "origination_caller_id_number". So the correct dialplan is as follows. <extension name="domestic.example.com"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=11111111"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <=== NOT WORK <!--action application="bridge" data="[effective_caller_id_number=111111]sofia/gateway/idt/$1"/--> <=== NOT WORK <action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/> <=== WORKS!! </condition> </extension> Cheers. Jun On 12/29/2013 9:25 AM, Jun Sun wrote:
I have a very simple call plan to allow internal extension to call external PSTN numbers. See below.
<extension name="domestic.example.com"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=11111111"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <=== NOT WORK <!--action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/--> <=== NOT WORK <action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/> <=== WORKS!! </condition> </extension>
There a couple of things strange here:
1. I have to put origination_caller_id_number inside data field of "bridge" application in order for the dialing out to happen. Why putting it outside as channel variable does not work?
2. Actually because bridge command is for leg-B, really it should be "effective_caller_id_number" not "origination_caller_id_number". Is that right?
I'm using IDT express as SIP carrier. I don't know if they changed something or I changed configuration in freeswitch. Now it seems I have to set origination_caller_id_number if I want to use IDT for outbound calls.
I'd really appreciate your help.
Cheers.
Jun
Any takers of this challenge? :) Jun On Sun, Dec 29, 2013 at 9:38 AM, Jun Sun <jsun@junsun.net> wrote:
Sorry! The 2nd "NOT WORK" example was meant to show setting "effective_caller_id_number", not "origination_caller_id_number". So the correct dialplan is as follows.
<extension name="domestic.example.com"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=11111111"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <=== NOT WORK <!--action application="bridge" data="[effective_caller_id_number=111111]sofia/gateway/idt/$1"/--> <=== NOT WORK
<action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/> <=== WORKS!! </condition> </extension>
Cheers.
Jun
On 12/29/2013 9:25 AM, Jun Sun wrote:
I have a very simple call plan to allow internal extension to call external PSTN numbers. See below.
<extension name="domestic.example.com"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=11111111"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <=== NOT WORK <!--action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/--> <=== NOT WORK <action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/> <=== WORKS!! </condition> </extension>
There a couple of things strange here:
1. I have to put origination_caller_id_number inside data field of "bridge" application in order for the dialing out to happen. Why putting it outside as channel variable does not work?
2. Actually because bridge command is for leg-B, really it should be "effective_caller_id_number" not "origination_caller_id_number". Is that right?
I'm using IDT express as SIP carrier. I don't know if they changed something or I changed configuration in freeswitch. Now it seems I have to set origination_caller_id_number if I want to use IDT for outbound calls.
I'd really appreciate your help.
Cheers.
Jun
I use {} and I am not familiar with [] in the bridge statement. Try, < action application="bridge" data="{effective_caller_id_number=111111}sofia/gateway/idt/$1" /> From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Jun Sun Sent: Monday, December 30, 2013 1:46 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] strange behavior in setting origination_caller_id_number Any takers of this challenge? :) Jun On Sun, Dec 29, 2013 at 9:38 AM, Jun Sun <jsun@junsun.net<mailto:jsun@junsun.net>> wrote: Sorry! The 2nd "NOT WORK" example was meant to show setting "effective_caller_id_number", not "origination_caller_id_number". So the correct dialplan is as follows. <extension name="domestic.example.com<http://domestic.example.com>"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=11111111"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <=== NOT WORK <!--action application="bridge" data="[effective_caller_id_number=111111]sofia/gateway/idt/$1"/--> <=== NOT WORK <action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/> <=== WORKS!! </condition> </extension> Cheers. Jun On 12/29/2013 9:25 AM, Jun Sun wrote: I have a very simple call plan to allow internal extension to call external PSTN numbers. See below. <extension name="domestic.example.com<http://domestic.example.com>"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=11111111"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <=== NOT WORK <!--action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/--> <=== NOT WORK <action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/> <=== WORKS!! </condition> </extension> There a couple of things strange here: 1. I have to put origination_caller_id_number inside data field of "bridge" application in order for the dialing out to happen. Why putting it outside as channel variable does not work? 2. Actually because bridge command is for leg-B, really it should be "effective_caller_id_number" not "origination_caller_id_number". Is that right? I'm using IDT express as SIP carrier. I don't know if they changed something or I changed configuration in freeswitch. Now it seems I have to set origination_caller_id_number if I want to use IDT for outbound calls. I'd really appreciate your help. Cheers. Jun
Switching to "{}" makes no difference here. See the updated rules below. This is driving me nuts because there is no way for me to set caller id dynamically (because I cannot do that inside the data field). Why would freeswitch ignore channel variable set? And why would it insist on origination_caller_id_number? <extension name="domestic.example.com"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=${outbound_calller_id_number"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/${default_gateway}/$1"/--> <== NOT WORK <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <== NOT WORK <!--action application="bridge" data="{origination_caller_id_number=$${outbound_caller_id_number}}sofia/gateway/${default_gateway}/$1"/--> <== NOT WORK <action application="bridge" data="{effective_caller_id_number=111111}sofia/gateway/${default_gateway}/$1"/> <== NOT WORK <!--action application="bridge" data="{origination_caller_id_number=111111}sofia/gateway/${default_gateway}/$1"/--> <== WORKS <!--action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/${default_gateway}/$1"/--> <== WORKS </condition> </extension> IN the case when it does not work, I got NORMAL_TEMPORARY_FAILURE: 2013-12-30 22:53:12.876331 [NOTICE] sofia.c:6623 Hangup sofia/external/15102991913 [CS_CONSUME_MEDIA] [NORMAL_TEMPORARY_FAILURE] Cheers. Jun On Mon, Dec 30, 2013 at 12:13 PM, Sean Devoy <sdevoy@bizfocused.com> wrote:
I use {} and I am not familiar with [] in the bridge statement. Try,
< action application="bridge" data="{effective_caller_id_number=111111}sofia/gateway/idt/$1" />
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Jun Sun *Sent:* Monday, December 30, 2013 1:46 PM *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] strange behavior in setting origination_caller_id_number
Any takers of this challenge? :)
Jun
On Sun, Dec 29, 2013 at 9:38 AM, Jun Sun <jsun@junsun.net> wrote:
Sorry! The 2nd "NOT WORK" example was meant to show setting "effective_caller_id_number", not "origination_caller_id_number". So the correct dialplan is as follows.
<extension name="domestic.example.com"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=11111111"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <=== NOT WORK
<!--action application="bridge" data="[effective_caller_id_number=111111]sofia/gateway/idt/$1"/--> <=== NOT WORK
<action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/> <=== WORKS!! </condition> </extension>
Cheers.
Jun
On 12/29/2013 9:25 AM, Jun Sun wrote:
I have a very simple call plan to allow internal extension to call external PSTN numbers. See below.
<extension name="domestic.example.com"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=11111111"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <=== NOT WORK <!--action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/--> <=== NOT WORK <action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/> <=== WORKS!! </condition> </extension>
There a couple of things strange here:
1. I have to put origination_caller_id_number inside data field of "bridge" application in order for the dialing out to happen. Why putting it outside as channel variable does not work?
2. Actually because bridge command is for leg-B, really it should be "effective_caller_id_number" not "origination_caller_id_number". Is that right?
I'm using IDT express as SIP carrier. I don't know if they changed something or I changed configuration in freeswitch. Now it seems I have to set origination_caller_id_number if I want to use IDT for outbound calls.
I'd really appreciate your help.
Cheers.
Jun
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
Are you sure the var ${outbound_caller_id_number} has the correct number in that moment? Log the info in that var, and check if lt looks ok. I know for sure that effective_caller_id_number does work, so there is something else to it. The short example below (cut from your example), works fine at least for me. <extension name="domestic.example.com"> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="effective_caller_id_number=123456"/> <action application="bridge" data="sofia/gateway/${default_ gateway}/$1"/> </condition> </extension> 2013/12/30 Jun Sun <jsun@junsun.net>
Switching to "{}" makes no difference here. See the updated rules below.
This is driving me nuts because there is no way for me to set caller id dynamically (because I cannot do that inside the data field). Why would freeswitch ignore channel variable set? And why would it insist on origination_caller_id_number?
<extension name="domestic.example.com"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=${outbound_calller_id_number"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/${default_gateway}/$1"/--> <== NOT WORK <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <== NOT WORK <!--action application="bridge" data="{origination_caller_id_number=$${outbound_caller_id_number}}sofia/gateway/${default_gateway}/$1"/--> <== NOT WORK <action application="bridge" data="{effective_caller_id_number=111111}sofia/gateway/${default_gateway}/$1"/> <== NOT WORK <!--action application="bridge" data="{origination_caller_id_number=111111}sofia/gateway/${default_gateway}/$1"/--> <== WORKS <!--action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/${default_gateway}/$1"/--> <== WORKS </condition> </extension>
IN the case when it does not work, I got NORMAL_TEMPORARY_FAILURE:
2013-12-30 22:53:12.876331 [NOTICE] sofia.c:6623 Hangup sofia/external/ 15102991913 [CS_CONSUME_MEDIA] [NORMAL_TEMPORARY_FAILURE]
Cheers.
Jun
On Mon, Dec 30, 2013 at 12:13 PM, Sean Devoy <sdevoy@bizfocused.com>wrote:
I use {} and I am not familiar with [] in the bridge statement. Try,
< action application="bridge" data="{effective_caller_id_number=111111}sofia/gateway/idt/$1" />
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Jun Sun *Sent:* Monday, December 30, 2013 1:46 PM *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] strange behavior in setting origination_caller_id_number
Any takers of this challenge? :)
Jun
On Sun, Dec 29, 2013 at 9:38 AM, Jun Sun <jsun@junsun.net> wrote:
Sorry! The 2nd "NOT WORK" example was meant to show setting "effective_caller_id_number", not "origination_caller_id_number". So the correct dialplan is as follows.
<extension name="domestic.example.com"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=11111111"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <=== NOT WORK
<!--action application="bridge" data="[effective_caller_id_number=111111]sofia/gateway/idt/$1"/--> <=== NOT WORK
<action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/> <=== WORKS!! </condition> </extension>
Cheers.
Jun
On 12/29/2013 9:25 AM, Jun Sun wrote:
I have a very simple call plan to allow internal extension to call external PSTN numbers. See below.
<extension name="domestic.example.com"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=11111111"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <=== NOT WORK <!--action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/--> <=== NOT WORK <action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/> <=== WORKS!! </condition> </extension>
There a couple of things strange here:
1. I have to put origination_caller_id_number inside data field of "bridge" application in order for the dialing out to happen. Why putting it outside as channel variable does not work?
2. Actually because bridge command is for leg-B, really it should be "effective_caller_id_number" not "origination_caller_id_number". Is that right?
I'm using IDT express as SIP carrier. I don't know if they changed something or I changed configuration in freeswitch. Now it seems I have to set origination_caller_id_number if I want to use IDT for outbound calls.
I'd really appreciate your help.
Cheers.
Jun
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
I looked into the log a little more. If I put {origination_caller_id_number} into the data field of "bridge" command, I got this: 2013-12-30 23:40:14.536358 [DEBUG] switch_core_session.c:1016 Send signal sofia/external/15102991912 [BREAK] 2013-12-30 23:40:14.536358 [DEBUG] mod_sofia.c:127 (sofia/external/15102991912) State Change CS_INIT -> CS_ROUTING 2013-12-30 23:40:14.536358 [DEBUG] switch_core_session.c:1351 Send signal sofia/external/15102991912 [BREAK] 2013-12-30 23:40:14.536358 [DEBUG] switch_core_state_machine.c:455 (sofia/external/15102991912) State INIT going to sleep 2013-12-30 23:40:14.536358 [DEBUG] switch_core_state_machine.c:415 (sofia/external/15102991912) Running State Change CS_ROUTING 2013-12-30 23:40:14.536358 [DEBUG] sofia.c:5779 Channel sofia/external/15102991912 entering state [calling][0] 2013-12-30 23:40:14.536358 [DEBUG] switch_core_state_machine.c:471 (sofia/external/15102991912) State ROUTING 2013-12-30 23:40:14.536358 [DEBUG] mod_sofia.c:150 sofia/external/15102991912 SOFIA ROUTING 2013-12-30 23:40:14.536358 [DEBUG] switch_ivr_originate.c:67 (sofia/external/15102991912) State Change CS_ROUTING -> CS_CONSUME_MEDIA 2013-12-30 23:40:14.536358 [DEBUG] switch_core_session.c:1351 Send signal sofia/external/15102991912 [BREAK] 2013-12-30 23:40:14.536358 [DEBUG] switch_core_state_machine.c:471 (sofia/external/15102991912) State ROUTING going to sleep 2013-12-30 23:40:14.536358 [DEBUG] switch_core_state_machine.c:415 (sofia/external/15102991912) Running State Change CS_CONSUME_MEDIA 2013-12-30 23:40:14.536358 [DEBUG] switch_core_state_machine.c:490 (sofia/external/15102991912) State CONSUME_MEDIA 2013-12-30 23:40:14.536358 [DEBUG] switch_core_state_machine.c:490 (sofia/external/15102991912) State CONSUME_MEDIA going to sleep 2013-12-30 23:40:16.756330 [DEBUG] switch_core_session.c:1016 Send signal sofia/external/15102991912 [BREAK] 2013-12-30 23:40:16.756330 [DEBUG] switch_core_session.c:1016 Send signal sofia/external/15102991912 [BREAK] 2013-12-30 23:40:16.756330 [DEBUG] sofia.c:5779 Channel sofia/external/15102991912 entering state [proceeding][183] <== difference starts from here 2013-12-30 23:40:16.756330 [DEBUG] sofia.c:5792 Remote SDP: v=0 ... All other failing cases, I got this trace: 2013-12-30 23:41:22.836327 [DEBUG] switch_core_session.c:1016 Send signal sofia/external/15102991912 [BREAK] 2013-12-30 23:41:22.836327 [DEBUG] mod_sofia.c:127 (sofia/external/15102991912) State Change CS_INIT -> CS_ROUTING 2013-12-30 23:41:22.836327 [DEBUG] switch_core_session.c:1351 Send signal sofia/external/15102991912 [BREAK] 2013-12-30 23:41:22.836327 [DEBUG] switch_core_state_machine.c:455 (sofia/external/15102991912) State INIT going to sleep 2013-12-30 23:41:22.836327 [DEBUG] switch_core_state_machine.c:415 (sofia/external/15102991912) Running State Change CS_ROUTING 2013-12-30 23:41:22.836327 [DEBUG] sofia.c:5779 Channel sofia/external/15102991912 entering state [calling][0] 2013-12-30 23:41:22.836327 [DEBUG] switch_core_state_machine.c:471 (sofia/external/15102991912) State ROUTING 2013-12-30 23:41:22.836327 [DEBUG] mod_sofia.c:150 sofia/external/15102991912 SOFIA ROUTING 2013-12-30 23:41:22.836327 [DEBUG] switch_ivr_originate.c:67 (sofia/external/15102991912) State Change CS_ROUTING -> CS_CONSUME_MEDIA 2013-12-30 23:41:22.836327 [DEBUG] switch_core_session.c:1351 Send signal sofia/external/15102991912 [BREAK] 2013-12-30 23:41:22.836327 [DEBUG] switch_core_state_machine.c:471 (sofia/external/15102991912) State ROUTING going to sleep 2013-12-30 23:41:22.836327 [DEBUG] switch_core_state_machine.c:415 (sofia/external/15102991912) Running State Change CS_CONSUME_MEDIA 2013-12-30 23:41:22.836327 [DEBUG] switch_core_state_machine.c:490 (sofia/external/15102991912) State CONSUME_MEDIA 2013-12-30 23:41:22.836327 [DEBUG] switch_core_state_machine.c:490 (sofia/external/15102991912) State CONSUME_MEDIA going to sleep 2013-12-30 23:41:23.016335 [DEBUG] switch_core_session.c:1016 Send signal sofia/external/15102991912 [BREAK] 2013-12-30 23:41:23.016335 [DEBUG] switch_core_session.c:1016 Send signal sofia/external/15102991912 [BREAK] 2013-12-30 23:41:23.016335 [DEBUG] switch_core_session.c:1016 Send signal sofia/external/15102991912 [BREAK] <== difference starts from here 2013-12-30 23:41:23.016335 [DEBUG] sofia.c:5779 Channel sofia/external/15102991912 entering state [terminated][503] 2013-12-30 23:41:23.016335 [NOTICE] sofia.c:6623 Hangup sofia/external/15102991912 [CS_CONSUME_MEDIA] [NORMAL_TEMPORARY_FAILURE] 2013-12-30 23:41:23.016335 [DEBUG] switch_channel.c:3183 Send signal sofia/external/15102991912 [KILL] 2013-12-30 23:41:23.016335 [DEBUG] switch_core_session.c:1351 Send signal sofia/external/15102991912 [BREAK] 2013-12-30 23:41:23.016335 [DEBUG] switch_core_state_machine.c:415 (sofia/external/15102991912) Running State Change CS_HANGUP ... Could there be something wrong in external.xml config file? I'm running this on AWS EC2 instance. Cheers. Jun On Mon, Dec 30, 2013 at 3:28 PM, Peter Olsson <peter@olssononline.se> wrote:
Are you sure the var ${outbound_caller_id_number} has the correct number in that moment? Log the info in that var, and check if lt looks ok. I know for sure that effective_caller_id_number does work, so there is something else to it. The short example below (cut from your example), works fine at least for me.
<extension name="domestic.example.com">
<condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="effective_caller_id_number=123456"/>
<action application="bridge" data="sofia/gateway/${default_ gateway}/$1"/> </condition> </extension>
2013/12/30 Jun Sun <jsun@junsun.net>
Switching to "{}" makes no difference here. See the updated rules below.
This is driving me nuts because there is no way for me to set caller id dynamically (because I cannot do that inside the data field). Why would freeswitch ignore channel variable set? And why would it insist on origination_caller_id_number?
<extension name="domestic.example.com"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=${outbound_calller_id_number"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/${default_gateway}/$1"/--> <== NOT WORK <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <== NOT WORK <!--action application="bridge" data="{origination_caller_id_number=$${outbound_caller_id_number}}sofia/gateway/${default_gateway}/$1"/--> <== NOT WORK <action application="bridge" data="{effective_caller_id_number=111111}sofia/gateway/${default_gateway}/$1"/> <== NOT WORK <!--action application="bridge" data="{origination_caller_id_number=111111}sofia/gateway/${default_gateway}/$1"/--> <== WORKS <!--action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/${default_gateway}/$1"/--> <== WORKS </condition> </extension>
IN the case when it does not work, I got NORMAL_TEMPORARY_FAILURE:
2013-12-30 22:53:12.876331 [NOTICE] sofia.c:6623 Hangup sofia/external/ 15102991913 [CS_CONSUME_MEDIA] [NORMAL_TEMPORARY_FAILURE]
Cheers.
Jun
On Mon, Dec 30, 2013 at 12:13 PM, Sean Devoy <sdevoy@bizfocused.com>wrote:
I use {} and I am not familiar with [] in the bridge statement. Try,
< action application="bridge" data="{effective_caller_id_number=111111}sofia/gateway/idt/$1" />
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Jun Sun *Sent:* Monday, December 30, 2013 1:46 PM *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] strange behavior in setting origination_caller_id_number
Any takers of this challenge? :)
Jun
On Sun, Dec 29, 2013 at 9:38 AM, Jun Sun <jsun@junsun.net> wrote:
Sorry! The 2nd "NOT WORK" example was meant to show setting "effective_caller_id_number", not "origination_caller_id_number". So the correct dialplan is as follows.
<extension name="domestic.example.com"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=11111111"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <=== NOT WORK
<!--action application="bridge" data="[effective_caller_id_number=111111]sofia/gateway/idt/$1"/--> <=== NOT WORK
<action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/> <=== WORKS!! </condition> </extension>
Cheers.
Jun
On 12/29/2013 9:25 AM, Jun Sun wrote:
I have a very simple call plan to allow internal extension to call external PSTN numbers. See below.
<extension name="domestic.example.com"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=11111111"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <=== NOT WORK <!--action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/--> <=== NOT WORK <action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/> <=== WORKS!! </condition> </extension>
There a couple of things strange here:
1. I have to put origination_caller_id_number inside data field of "bridge" application in order for the dialing out to happen. Why putting it outside as channel variable does not work?
2. Actually because bridge command is for leg-B, really it should be "effective_caller_id_number" not "origination_caller_id_number". Is that right?
I'm using IDT express as SIP carrier. I don't know if they changed something or I changed configuration in freeswitch. Now it seems I have to set origination_caller_id_number if I want to use IDT for outbound calls.
I'd really appreciate your help.
Cheers.
Jun
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
Thanks, Peter. Mystery is resolved, at least partially. After changing outbound_caller_id in conf/vars.xml file from 0000000000 to 111111, it starts working. Since freeswitch comes with 0000000000 preconfigured as outbound_caller_id, isn't this confusing if people hit the same problem as I did? And it is unclear who is actively checking on this and decided not happy with "000000000000" as effective_caller_id_number. Cheers. Jun On Mon, Dec 30, 2013 at 3:28 PM, Peter Olsson <peter@olssononline.se> wrote:
Are you sure the var ${outbound_caller_id_number} has the correct number in that moment? Log the info in that var, and check if lt looks ok. I know for sure that effective_caller_id_number does work, so there is something else to it. The short example below (cut from your example), works fine at least for me.
<extension name="domestic.example.com">
<condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="effective_caller_id_number=123456"/>
<action application="bridge" data="sofia/gateway/${default_ gateway}/$1"/> </condition> </extension>
2013/12/30 Jun Sun <jsun@junsun.net>
Switching to "{}" makes no difference here. See the updated rules below.
This is driving me nuts because there is no way for me to set caller id dynamically (because I cannot do that inside the data field). Why would freeswitch ignore channel variable set? And why would it insist on origination_caller_id_number?
<extension name="domestic.example.com"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=${outbound_calller_id_number"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/${default_gateway}/$1"/--> <== NOT WORK <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <== NOT WORK <!--action application="bridge" data="{origination_caller_id_number=$${outbound_caller_id_number}}sofia/gateway/${default_gateway}/$1"/--> <== NOT WORK <action application="bridge" data="{effective_caller_id_number=111111}sofia/gateway/${default_gateway}/$1"/> <== NOT WORK <!--action application="bridge" data="{origination_caller_id_number=111111}sofia/gateway/${default_gateway}/$1"/--> <== WORKS <!--action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/${default_gateway}/$1"/--> <== WORKS </condition> </extension>
IN the case when it does not work, I got NORMAL_TEMPORARY_FAILURE:
2013-12-30 22:53:12.876331 [NOTICE] sofia.c:6623 Hangup sofia/external/ 15102991913 [CS_CONSUME_MEDIA] [NORMAL_TEMPORARY_FAILURE]
Cheers.
Jun
On Mon, Dec 30, 2013 at 12:13 PM, Sean Devoy <sdevoy@bizfocused.com>wrote:
I use {} and I am not familiar with [] in the bridge statement. Try,
< action application="bridge" data="{effective_caller_id_number=111111}sofia/gateway/idt/$1" />
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Jun Sun *Sent:* Monday, December 30, 2013 1:46 PM *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] strange behavior in setting origination_caller_id_number
Any takers of this challenge? :)
Jun
On Sun, Dec 29, 2013 at 9:38 AM, Jun Sun <jsun@junsun.net> wrote:
Sorry! The 2nd "NOT WORK" example was meant to show setting "effective_caller_id_number", not "origination_caller_id_number". So the correct dialplan is as follows.
<extension name="domestic.example.com"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=11111111"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <=== NOT WORK
<!--action application="bridge" data="[effective_caller_id_number=111111]sofia/gateway/idt/$1"/--> <=== NOT WORK
<action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/> <=== WORKS!! </condition> </extension>
Cheers.
Jun
On 12/29/2013 9:25 AM, Jun Sun wrote:
I have a very simple call plan to allow internal extension to call external PSTN numbers. See below.
<extension name="domestic.example.com"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=11111111"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <=== NOT WORK <!--action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/--> <=== NOT WORK <action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/> <=== WORKS!! </condition> </extension>
There a couple of things strange here:
1. I have to put origination_caller_id_number inside data field of "bridge" application in order for the dialing out to happen. Why putting it outside as channel variable does not work?
2. Actually because bridge command is for leg-B, really it should be "effective_caller_id_number" not "origination_caller_id_number". Is that right?
I'm using IDT express as SIP carrier. I don't know if they changed something or I changed configuration in freeswitch. Now it seems I have to set origination_caller_id_number if I want to use IDT for outbound calls.
I'd really appreciate your help.
Cheers.
Jun
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
The default is just to pass along the real number (from the incoming leg). 0000000 is just there as a "backup" if no incoming number exists. I'm guessing your provider has problems with all the zeroes, which makes the call to fail - for FS it really doesn't make any difference. /Peter 2013/12/31 Jun Sun <jsun@junsun.net>
Thanks, Peter. Mystery is resolved, at least partially. After changing outbound_caller_id in conf/vars.xml file from 0000000000 to 111111, it starts working.
Since freeswitch comes with 0000000000 preconfigured as outbound_caller_id, isn't this confusing if people hit the same problem as I did? And it is unclear who is actively checking on this and decided not happy with "000000000000" as effective_caller_id_number.
Cheers.
Jun
On Mon, Dec 30, 2013 at 3:28 PM, Peter Olsson <peter@olssononline.se>wrote:
Are you sure the var ${outbound_caller_id_number} has the correct number in that moment? Log the info in that var, and check if lt looks ok. I know for sure that effective_caller_id_number does work, so there is something else to it. The short example below (cut from your example), works fine at least for me.
<extension name="domestic.example.com">
<condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="effective_caller_id_number=123456 "/>
<action application="bridge" data="sofia/gateway/${default_ gateway}/$1"/> </condition> </extension>
2013/12/30 Jun Sun <jsun@junsun.net>
Switching to "{}" makes no difference here. See the updated rules below.
This is driving me nuts because there is no way for me to set caller id dynamically (because I cannot do that inside the data field). Why would freeswitch ignore channel variable set? And why would it insist on origination_caller_id_number?
<extension name="domestic.example.com"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=${outbound_calller_id_number"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/${default_gateway}/$1"/--> <== NOT WORK <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <== NOT WORK <!--action application="bridge" data="{origination_caller_id_number=$${outbound_caller_id_number}}sofia/gateway/${default_gateway}/$1"/--> <== NOT WORK <action application="bridge" data="{effective_caller_id_number=111111}sofia/gateway/${default_gateway}/$1"/> <== NOT WORK <!--action application="bridge" data="{origination_caller_id_number=111111}sofia/gateway/${default_gateway}/$1"/--> <== WORKS <!--action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/${default_gateway}/$1"/--> <== WORKS </condition> </extension>
IN the case when it does not work, I got NORMAL_TEMPORARY_FAILURE:
2013-12-30 22:53:12.876331 [NOTICE] sofia.c:6623 Hangup sofia/external/ 15102991913 [CS_CONSUME_MEDIA] [NORMAL_TEMPORARY_FAILURE]
Cheers.
Jun
On Mon, Dec 30, 2013 at 12:13 PM, Sean Devoy <sdevoy@bizfocused.com>wrote:
I use {} and I am not familiar with [] in the bridge statement. Try,
< action application="bridge" data="{effective_caller_id_number=111111}sofia/gateway/idt/$1" />
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Jun Sun *Sent:* Monday, December 30, 2013 1:46 PM *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] strange behavior in setting origination_caller_id_number
Any takers of this challenge? :)
Jun
On Sun, Dec 29, 2013 at 9:38 AM, Jun Sun <jsun@junsun.net> wrote:
Sorry! The 2nd "NOT WORK" example was meant to show setting "effective_caller_id_number", not "origination_caller_id_number". So the correct dialplan is as follows.
<extension name="domestic.example.com"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=11111111"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <=== NOT WORK
<!--action application="bridge" data="[effective_caller_id_number=111111]sofia/gateway/idt/$1"/--> <=== NOT WORK
<action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/> <=== WORKS!! </condition> </extension>
Cheers.
Jun
On 12/29/2013 9:25 AM, Jun Sun wrote:
I have a very simple call plan to allow internal extension to call external PSTN numbers. See below.
<extension name="domestic.example.com"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=11111111"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <=== NOT WORK <!--action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/--> <=== NOT WORK <action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/> <=== WORKS!! </condition> </extension>
There a couple of things strange here:
1. I have to put origination_caller_id_number inside data field of "bridge" application in order for the dialing out to happen. Why putting it outside as channel variable does not work?
2. Actually because bridge command is for leg-B, really it should be "effective_caller_id_number" not "origination_caller_id_number". Is that right?
I'm using IDT express as SIP carrier. I don't know if they changed something or I changed configuration in freeswitch. Now it seems I have to set origination_caller_id_number if I want to use IDT for outbound calls.
I'd really appreciate your help.
Cheers.
Jun
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
<!--action application="bridge" data="{origination_caller_id_number=$${outbound_caller_id_number}}sofia/gateway/${default_gateway}/$1"/--> Is it correct? Should only one $. How about origination_caller_id_name. Mine works woth that. Donny On Dec 31, 2013 7:09 AM, "Jun Sun" <jsun@junsun.net> wrote:
Thanks, Peter. Mystery is resolved, at least partially. After changing outbound_caller_id in conf/vars.xml file from 0000000000 to 111111, it starts working.
Since freeswitch comes with 0000000000 preconfigured as outbound_caller_id, isn't this confusing if people hit the same problem as I did? And it is unclear who is actively checking on this and decided not happy with "000000000000" as effective_caller_id_number.
Cheers.
Jun
On Mon, Dec 30, 2013 at 3:28 PM, Peter Olsson <peter@olssononline.se>wrote:
Are you sure the var ${outbound_caller_id_number} has the correct number in that moment? Log the info in that var, and check if lt looks ok. I know for sure that effective_caller_id_number does work, so there is something else to it. The short example below (cut from your example), works fine at least for me.
<extension name="domestic.example.com">
<condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="effective_caller_id_number=123456 "/>
<action application="bridge" data="sofia/gateway/${default_ gateway}/$1"/> </condition> </extension>
2013/12/30 Jun Sun <jsun@junsun.net>
Switching to "{}" makes no difference here. See the updated rules below.
This is driving me nuts because there is no way for me to set caller id dynamically (because I cannot do that inside the data field). Why would freeswitch ignore channel variable set? And why would it insist on origination_caller_id_number?
<extension name="domestic.example.com"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=${outbound_calller_id_number"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/${default_gateway}/$1"/--> <== NOT WORK <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <== NOT WORK <!--action application="bridge" data="{origination_caller_id_number=$${outbound_caller_id_number}}sofia/gateway/${default_gateway}/$1"/--> <== NOT WORK <action application="bridge" data="{effective_caller_id_number=111111}sofia/gateway/${default_gateway}/$1"/> <== NOT WORK <!--action application="bridge" data="{origination_caller_id_number=111111}sofia/gateway/${default_gateway}/$1"/--> <== WORKS <!--action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/${default_gateway}/$1"/--> <== WORKS </condition> </extension>
IN the case when it does not work, I got NORMAL_TEMPORARY_FAILURE:
2013-12-30 22:53:12.876331 [NOTICE] sofia.c:6623 Hangup sofia/external/ 15102991913 [CS_CONSUME_MEDIA] [NORMAL_TEMPORARY_FAILURE]
Cheers.
Jun
On Mon, Dec 30, 2013 at 12:13 PM, Sean Devoy <sdevoy@bizfocused.com>wrote:
I use {} and I am not familiar with [] in the bridge statement. Try,
< action application="bridge" data="{effective_caller_id_number=111111}sofia/gateway/idt/$1" />
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Jun Sun *Sent:* Monday, December 30, 2013 1:46 PM *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] strange behavior in setting origination_caller_id_number
Any takers of this challenge? :)
Jun
On Sun, Dec 29, 2013 at 9:38 AM, Jun Sun <jsun@junsun.net> wrote:
Sorry! The 2nd "NOT WORK" example was meant to show setting "effective_caller_id_number", not "origination_caller_id_number". So the correct dialplan is as follows.
<extension name="domestic.example.com"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=11111111"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <=== NOT WORK
<!--action application="bridge" data="[effective_caller_id_number=111111]sofia/gateway/idt/$1"/--> <=== NOT WORK
<action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/> <=== WORKS!! </condition> </extension>
Cheers.
Jun
On 12/29/2013 9:25 AM, Jun Sun wrote:
I have a very simple call plan to allow internal extension to call external PSTN numbers. See below.
<extension name="domestic.example.com"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=11111111"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <=== NOT WORK <!--action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/--> <=== NOT WORK <action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/> <=== WORKS!! </condition> </extension>
There a couple of things strange here:
1. I have to put origination_caller_id_number inside data field of "bridge" application in order for the dialing out to happen. Why putting it outside as channel variable does not work?
2. Actually because bridge command is for leg-B, really it should be "effective_caller_id_number" not "origination_caller_id_number". Is that right?
I'm using IDT express as SIP carrier. I don't know if they changed something or I changed configuration in freeswitch. Now it seems I have to set origination_caller_id_number if I want to use IDT for outbound calls.
I'd really appreciate your help.
Cheers.
Jun
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
Your first "set" line has a typo: <action application="set" data="origination_caller_id_number=${outbound_calller_id_number"/> It is missing the closing "}" on ${outbound_calller_id_number". So origination_caller_id_number is not being set. I think that is why these fail: <!--action application="bridge" data="sofia/gateway/${default_gateway}/$1"/--> <== NOT WORK <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <== NOT WORK As per the wiki, effective_caller_id_number cannot be set in an origination string, so this fails: <action application="bridge" data="{effective_caller_id_number=111111}sofia/gateway/${default_gateway}/$1"/> <== NOT WORK And this works because you are finally assigning a value to origination_caller_id_number: <!--action application="bridge" data="{origination_caller_id_number=111111}sofia/gateway/${default_gateway}/$1"/--> <== WORKS Use the LOG application to check your values before the bridge statement, like this: <action application="log" data="INFO origination_caller_id_number is $origination_caller_id_number "/> Hope that helps, Sean From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Jun Sun Sent: Monday, December 30, 2013 5:59 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] strange behavior in setting origination_caller_id_number Switching to "{}" makes no difference here. See the updated rules below. This is driving me nuts because there is no way for me to set caller id dynamically (because I cannot do that inside the data field). Why would freeswitch ignore channel variable set? And why would it insist on origination_caller_id_number? <extension name="domestic.example.com<http://domestic.example.com>"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=${outbound_calller_id_number"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/${default_gateway}/$1"/--> <== NOT WORK <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <== NOT WORK <!--action application="bridge" data="{origination_caller_id_number=$${outbound_caller_id_number}}sofia/gateway/${default_gateway}/$1"/--> <== NOT WORK <action application="bridge" data="{effective_caller_id_number=111111}sofia/gateway/${default_gateway}/$1"/> <== NOT WORK <!--action application="bridge" data="{origination_caller_id_number=111111}sofia/gateway/${default_gateway}/$1"/--> <== WORKS <!--action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/${default_gateway}/$1"/--> <== WORKS </condition> </extension> IN the case when it does not work, I got NORMAL_TEMPORARY_FAILURE: 2013-12-30 22:53:12.876331 [NOTICE] sofia.c:6623 Hangup sofia/external/15102991913 [CS_CONSUME_MEDIA] [NORMAL_TEMPORARY_FAILURE] Cheers. Jun On Mon, Dec 30, 2013 at 12:13 PM, Sean Devoy <sdevoy@bizfocused.com<mailto:sdevoy@bizfocused.com>> wrote: I use {} and I am not familiar with [] in the bridge statement. Try, < action application="bridge" data="{effective_caller_id_number=111111}sofia/gateway/idt/$1" /> From: freeswitch-users-bounces@lists.freeswitch.org<mailto:freeswitch-users-bounces@lists.freeswitch.org> [mailto:freeswitch-users-bounces@lists.freeswitch.org<mailto:freeswitch-users-bounces@lists.freeswitch.org>] On Behalf Of Jun Sun Sent: Monday, December 30, 2013 1:46 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] strange behavior in setting origination_caller_id_number Any takers of this challenge? :) Jun On Sun, Dec 29, 2013 at 9:38 AM, Jun Sun <jsun@junsun.net<mailto:jsun@junsun.net>> wrote: Sorry! The 2nd "NOT WORK" example was meant to show setting "effective_caller_id_number", not "origination_caller_id_number". So the correct dialplan is as follows. <extension name="domestic.example.com<http://domestic.example.com>"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=11111111"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <=== NOT WORK <!--action application="bridge" data="[effective_caller_id_number=111111]sofia/gateway/idt/$1"/--> <=== NOT WORK <action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/> <=== WORKS!! </condition> </extension> Cheers. Jun On 12/29/2013 9:25 AM, Jun Sun wrote: I have a very simple call plan to allow internal extension to call external PSTN numbers. See below. <extension name="domestic.example.com<http://domestic.example.com>"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=11111111"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <=== NOT WORK <!--action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/--> <=== NOT WORK <action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/> <=== WORKS!! </condition> </extension> There a couple of things strange here: 1. I have to put origination_caller_id_number inside data field of "bridge" application in order for the dialing out to happen. Why putting it outside as channel variable does not work? 2. Actually because bridge command is for leg-B, really it should be "effective_caller_id_number" not "origination_caller_id_number". Is that right? I'm using IDT express as SIP carrier. I don't know if they changed something or I changed configuration in freeswitch. Now it seems I have to set origination_caller_id_number if I want to use IDT for outbound calls. I'd really appreciate your help. Cheers. Jun _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org<mailto: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
Thanks for the all the helping. Now I have beaten this issue to death. I did a SIP tracing. Peter is right on money. My SIP provider does not like "0000000000" to be caller id number. To be specific and to add confusion, their server doesn't like if it is 10 zero's. (All other cases are fine, e.g, 9 zero's!) Their server would return service not available . That is why we see NORMAL_TEMPORARY_FAILURE. It is good to know the world is still sane, except for the little 10 zero quirk from IDT. :) Cheers. And happy new year. Jun On Tue, Dec 31, 2013 at 9:44 AM, Sean Devoy <sdevoy@bizfocused.com> wrote:
Your first “set” line has a typo:
<action application="set" data="origination_caller_id_number=${outbound_calller_id_number"/>
It is missing the closing “}” on ${outbound_calller_id_number". So origination_caller_id_number is not being set.
I think that is why these fail:
<!--action application="bridge" data="sofia/gateway/${default_gateway}/$1"/--> <== NOT WORK <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <== NOT WORK
As per the wiki, effective_caller_id_number cannot be set in an origination string, so this fails:
<action application="bridge" data="{effective_caller_id_number=111111}sofia/gateway/${default_gateway}/$1"/> <== NOT WORK
And this works because you are finally assigning a value to origination_caller_id_number:
<!--action application="bridge" data="{origination_caller_id_number=111111}sofia/gateway/${default_gateway}/$1"/--> <== WORKS
Use the LOG application to check your values before the bridge statement, like this:
<action application="log" data="INFO origination_caller_id_number is $ origination_caller_id_number "/>
Hope that helps,
Sean
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Jun Sun *Sent:* Monday, December 30, 2013 5:59 PM
*To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] strange behavior in setting origination_caller_id_number
Switching to "{}" makes no difference here. See the updated rules below.
This is driving me nuts because there is no way for me to set caller id dynamically (because I cannot do that inside the data field). Why would freeswitch ignore channel variable set? And why would it insist on origination_caller_id_number?
<extension name="domestic.example.com"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=${outbound_calller_id_number"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/${default_gateway}/$1"/--> <== NOT WORK <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <== NOT WORK <!--action application="bridge" data="{origination_caller_id_number=$${outbound_caller_id_number}}sofia/gateway/${default_gateway}/$1"/--> <== NOT WORK <action application="bridge" data="{effective_caller_id_number=111111}sofia/gateway/${default_gateway}/$1"/> <== NOT WORK <!--action application="bridge" data="{origination_caller_id_number=111111}sofia/gateway/${default_gateway}/$1"/--> <== WORKS <!--action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/${default_gateway}/$1"/--> <== WORKS </condition> </extension>
IN the case when it does not work, I got NORMAL_TEMPORARY_FAILURE:
2013-12-30 22:53:12.876331 [NOTICE] sofia.c:6623 Hangup sofia/external/ 15102991913 [CS_CONSUME_MEDIA] [NORMAL_TEMPORARY_FAILURE]
Cheers.
Jun
On Mon, Dec 30, 2013 at 12:13 PM, Sean Devoy <sdevoy@bizfocused.com> wrote:
I use {} and I am not familiar with [] in the bridge statement. Try,
< action application="bridge" data="{effective_caller_id_number=111111}sofia/gateway/idt/$1" />
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Jun Sun *Sent:* Monday, December 30, 2013 1:46 PM *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] strange behavior in setting origination_caller_id_number
Any takers of this challenge? :)
Jun
On Sun, Dec 29, 2013 at 9:38 AM, Jun Sun <jsun@junsun.net> wrote:
Sorry! The 2nd "NOT WORK" example was meant to show setting "effective_caller_id_number", not "origination_caller_id_number". So the correct dialplan is as follows.
<extension name="domestic.example.com"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=11111111"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <=== NOT WORK
<!--action application="bridge" data="[effective_caller_id_number=111111]sofia/gateway/idt/$1"/--> <=== NOT WORK
<action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/> <=== WORKS!! </condition> </extension>
Cheers.
Jun
On 12/29/2013 9:25 AM, Jun Sun wrote:
I have a very simple call plan to allow internal extension to call external PSTN numbers. See below.
<extension name="domestic.example.com"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=11111111"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <=== NOT WORK <!--action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/--> <=== NOT WORK <action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/> <=== WORKS!! </condition> </extension>
There a couple of things strange here:
1. I have to put origination_caller_id_number inside data field of "bridge" application in order for the dialing out to happen. Why putting it outside as channel variable does not work?
2. Actually because bridge command is for leg-B, really it should be "effective_caller_id_number" not "origination_caller_id_number". Is that right?
I'm using IDT express as SIP carrier. I don't know if they changed something or I changed configuration in freeswitch. Now it seems I have to set origination_caller_id_number if I want to use IDT for outbound calls.
I'd really appreciate your help.
Cheers.
Jun
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
For extra clarification: effective_caller_id_name/number is the old construct from before the invention of bracketed variables. It's basically a variable you set on an inbound leg to the dialplan that will override the caller_id that is copied over to the B leg when the bridge application is executed. If you don't set it the caller_id_name/number will be taken from the A. set_profile_var on caller_id_name/number is a more permenant version of the same idea. Originally the profile vars were not editable directly so the variable was necessary. The problem with either approach is that the change is semi-permenant so every time that same channel may execute the bridge-statement, it will use the newly modified values instead of the original caller id. origination_caller_id_name/number (and any other variables that begin with "origination_") are specifically for the curly brackets which is more portable because it can be used in originate statements on one-legged outbound calls. Each variable holds the exact values you wish to use in the outbound leg. On Tue, Dec 31, 2013 at 1:39 PM, Jun Sun <jsun@junsun.net> wrote:
Thanks for the all the helping. Now I have beaten this issue to death.
I did a SIP tracing. Peter is right on money. My SIP provider does not like "0000000000" to be caller id number. To be specific and to add confusion, their server doesn't like if it is 10 zero's. (All other cases are fine, e.g, 9 zero's!) Their server would return service not available . That is why we see NORMAL_TEMPORARY_FAILURE.
It is good to know the world is still sane, except for the little 10 zero quirk from IDT. :)
Cheers. And happy new year.
Jun
On Tue, Dec 31, 2013 at 9:44 AM, Sean Devoy <sdevoy@bizfocused.com> wrote:
Your first “set” line has a typo:
<action application="set" data="origination_caller_id_number=${outbound_calller_id_number"/>
It is missing the closing “}” on ${outbound_calller_id_number". So origination_caller_id_number is not being set.
I think that is why these fail:
<!--action application="bridge" data="sofia/gateway/${default_gateway}/$1"/--> <== NOT WORK <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <== NOT WORK
As per the wiki, effective_caller_id_number cannot be set in an origination string, so this fails:
<action application="bridge" data="{effective_caller_id_number=111111}sofia/gateway/${default_gateway}/$1"/> <== NOT WORK
And this works because you are finally assigning a value to origination_caller_id_number:
<!--action application="bridge" data="{origination_caller_id_number=111111}sofia/gateway/${default_gateway}/$1"/--> <== WORKS
Use the LOG application to check your values before the bridge statement, like this:
<action application="log" data="INFO origination_caller_id_number is $ origination_caller_id_number "/>
Hope that helps,
Sean
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Jun Sun *Sent:* Monday, December 30, 2013 5:59 PM
*To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] strange behavior in setting origination_caller_id_number
Switching to "{}" makes no difference here. See the updated rules below.
This is driving me nuts because there is no way for me to set caller id dynamically (because I cannot do that inside the data field). Why would freeswitch ignore channel variable set? And why would it insist on origination_caller_id_number?
<extension name="domestic.example.com"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=${outbound_calller_id_number"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/${default_gateway}/$1"/--> <== NOT WORK <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <== NOT WORK <!--action application="bridge" data="{origination_caller_id_number=$${outbound_caller_id_number}}sofia/gateway/${default_gateway}/$1"/--> <== NOT WORK <action application="bridge" data="{effective_caller_id_number=111111}sofia/gateway/${default_gateway}/$1"/> <== NOT WORK <!--action application="bridge" data="{origination_caller_id_number=111111}sofia/gateway/${default_gateway}/$1"/--> <== WORKS <!--action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/${default_gateway}/$1"/--> <== WORKS </condition> </extension>
IN the case when it does not work, I got NORMAL_TEMPORARY_FAILURE:
2013-12-30 22:53:12.876331 [NOTICE] sofia.c:6623 Hangup sofia/external/ 15102991913 [CS_CONSUME_MEDIA] [NORMAL_TEMPORARY_FAILURE]
Cheers.
Jun
On Mon, Dec 30, 2013 at 12:13 PM, Sean Devoy <sdevoy@bizfocused.com> wrote:
I use {} and I am not familiar with [] in the bridge statement. Try,
< action application="bridge" data="{effective_caller_id_number=111111}sofia/gateway/idt/$1" />
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Jun Sun *Sent:* Monday, December 30, 2013 1:46 PM *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] strange behavior in setting origination_caller_id_number
Any takers of this challenge? :)
Jun
On Sun, Dec 29, 2013 at 9:38 AM, Jun Sun <jsun@junsun.net> wrote:
Sorry! The 2nd "NOT WORK" example was meant to show setting "effective_caller_id_number", not "origination_caller_id_number". So the correct dialplan is as follows.
<extension name="domestic.example.com"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=11111111"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <=== NOT WORK
<!--action application="bridge" data="[effective_caller_id_number=111111]sofia/gateway/idt/$1"/--> <=== NOT WORK
<action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/> <=== WORKS!! </condition> </extension>
Cheers.
Jun
On 12/29/2013 9:25 AM, Jun Sun wrote:
I have a very simple call plan to allow internal extension to call external PSTN numbers. See below.
<extension name="domestic.example.com"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=11111111"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <=== NOT WORK <!--action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/--> <=== NOT WORK <action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/> <=== WORKS!! </condition> </extension>
There a couple of things strange here:
1. I have to put origination_caller_id_number inside data field of "bridge" application in order for the dialing out to happen. Why putting it outside as channel variable does not work?
2. Actually because bridge command is for leg-B, really it should be "effective_caller_id_number" not "origination_caller_id_number". Is that right?
I'm using IDT express as SIP carrier. I don't know if they changed something or I changed configuration in freeswitch. Now it seems I have to set origination_caller_id_number if I want to use IDT for outbound calls.
I'd really appreciate your help.
Cheers.
Jun
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
-- Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬ ☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞ http://twitter.com/FreeSWITCH ☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+ <http://freeswitch.org/g+>* ClueCon Weekly Development Call ☎ sip:888@conference.freeswitch.org ☎ +19193869900
From the wiki: http://wiki.freeswitch.org/wiki/Channel_Variables#effective_caller_id_number effective_caller_id_number<http://wiki.freeswitch.org/wiki/Variable_effective_caller_id_number> Sets the effective callerid number. This is automatically exported to the B-leg; however, it is not valid in an origination string. In other words, set this before calling bridge, otherwise use origination_caller_id_number<http://wiki.freeswitch.org/wiki/Variable_origination_caller_id_number>
Usage: <action application="set" data="effective_caller_id_number=9185551212"/> From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Jun Sun Sent: Monday, December 30, 2013 1:46 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] strange behavior in setting origination_caller_id_number Any takers of this challenge? :) Jun On Sun, Dec 29, 2013 at 9:38 AM, Jun Sun <jsun@junsun.net<mailto:jsun@junsun.net>> wrote: Sorry! The 2nd "NOT WORK" example was meant to show setting "effective_caller_id_number", not "origination_caller_id_number". So the correct dialplan is as follows. <extension name="domestic.example.com<http://domestic.example.com>"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=11111111"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <=== NOT WORK <!--action application="bridge" data="[effective_caller_id_number=111111]sofia/gateway/idt/$1"/--> <=== NOT WORK <action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/> <=== WORKS!! </condition> </extension> Cheers. Jun On 12/29/2013 9:25 AM, Jun Sun wrote: I have a very simple call plan to allow internal extension to call external PSTN numbers. See below. <extension name="domestic.example.com<http://domestic.example.com>"> <condition field="${toll_allow}" expression="domestic"/> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="origination_caller_id_number=11111111"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> <!--action application="bridge" data="sofia/gateway/idt/$1"/--> <=== NOT WORK <!--action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/--> <=== NOT WORK <action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/> <=== WORKS!! </condition> </extension> There a couple of things strange here: 1. I have to put origination_caller_id_number inside data field of "bridge" application in order for the dialing out to happen. Why putting it outside as channel variable does not work? 2. Actually because bridge command is for leg-B, really it should be "effective_caller_id_number" not "origination_caller_id_number". Is that right? I'm using IDT express as SIP carrier. I don't know if they changed something or I changed configuration in freeswitch. Now it seems I have to set origination_caller_id_number if I want to use IDT for outbound calls. I'd really appreciate your help. Cheers. Jun
participants (5)
-
Anthony Minessale
-
Donny Hardyanto
-
Jun Sun
-
Peter Olsson
-
Sean Devoy