[Freeswitch-users] Controlling the caller ID (Solved)

D'Arcy J.M. Cain darcy at Vex.Net
Thu Oct 11 18:34:17 MSD 2012


On Wed, 10 Oct 2012 22:26:17 -0500
Ken Rice <krice at freeswitch.org> wrote:

> termination is termination and origination is origination... just
> because out interconnect tech is primarily sip vs tdm (pots pri ss7
> etc) the terminology does not change.

Cool.  I am so glad to hear that FS got that right.  People seem to get
confused.  One provider talks about "inbound" and "outbound" to
reduce their user's confusion but that's like saying "left" and "right"
on a ship. It depends on which direction you are looking.

> as far as freeswitch controlling what clid is passed thru, that is up
> to how you configure freswitch. yes it can pass thru what the
> customer sends or it can block that and send something you have
> configured for the customer... for the later see the effective caller
> id name and number variables on the fs wiki.

Yes, I did that and it still left me with some questions.  I know that
I may sound knowledgeable about some of these things but when it comes
to the FreeSWITCH package itself I am a rank amateur so please bear with
me while I describe my understanding in excruciating detail to make sure
that I have it right.

Here is an actual (sanitized) directory entry.

<include>
  <user id="4164251212" mailbox="4164251212">
    <params>
      <param name="password" value="password"/>     
      <param name="vm-password" value="0000"/>
    </params>
    <variables>
      <variable name="accountcode" value="4164251212"/>
      <variable name="user_context" value="default"/>
      <variable name="effective_caller_id_name" value="Vex Consulting"/>
      <variable name="effective_caller_id_number" value="4164251212"/>
    </variables>
  </user>
</include>

Here is my (again, sanitized) dialplan.

<include>
  <extension name="mygateway">
    <condition field="destination_number" expression="^1?(\d{10})\d*$">
      <action application="set" 
        data="effective_caller_id_number=${effective_caller_id_number}"/>
      <action application="set" 
        data="effective_caller_id_name=${effective_caller_id_name}"/>
      <action application="bridge" data="sofia/gateway/mygateway/$1"/>
    </condition>
  </extension>
</include>

So, just before sending this message I decided to test one more time
and realized that the reason this didn't seem to work was that the cell
phone I was testing with had my office number in the contacts and was
displaying that name rather than the CNAME.  I changed the number
(416-555-1212) and it sent that number and displayed the proper CNAME.
I decided to send this message anyway to help future mailing list
searchers with a working example as well as pointing out a possible
testing gotcha.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:darcy at Vex.Net



Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list