[Freeswitch-users] strange behavior in setting origination_caller_id_number

Sean Devoy sdevoy at bizfocused.com
Mon Dec 30 23:45:26 MSK 2013


>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 at lists.freeswitch.org [mailto:freeswitch-users-bounces at 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 at junsun.net<mailto:jsun at 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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20131230/ba0f3f6d/attachment-0001.html 


Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list