[Freeswitch-users] Trouble setting "caller_id_name", "caller_id_number" on an inbound call

Brian Foster bdfoster at endigotech.com
Sat Mar 31 00:46:59 MSD 2012


Solution time!

<!-- This is for cleaning up the CID and CNAM -->

    <extension name="cid_number_cleanup" continue="true">
      <condition field="caller_id_number" expression="^(?:\+)(\d+)$">
        <action application="set" data="effective_caller_id_number=$1"/>
      </condition>
    </extension>

    <extension name="cid_name_cleanup" continue="true">
      <condition field="caller_id_name" expression="^(?:\+)(\d+)$">
        <action application="set" data="effective_caller_id_name=$1"/>
      </condition>
    </extension>

<!-- This is where we do the actual lookup. I give cidlookup 10 digits, I
add a 1 if needed in cidlookup.conf.xml -->

    <extension name="cid_lookup-country_code_1" continue="true">
      <condition field="${module_exists(mod_cidlookup)}" expression="true"/>
      <condition field="caller_id_name" expression="^(?:\+)(\d+)$|^$"/>
      <condition field="caller_id_number"
expression="^(?:\+1)?([2-9]\d\d[2-9]\d{6})$">
        <action application="set"
data="effective_caller_id_name=${cidlookup $1}"/>
      </condition>
    </extension>


On Fri, Mar 30, 2012 at 4:06 PM, Brian Foster <bdfoster at endigotech.com>wrote:

> http://pastebin.freeswitch.org/18791 << Entire Call
>
> It seems like a pretty common question, and there doesn't seem to be a
> good answer to just cleaning up the caller id and doing a lookup. Even the
> documentation on the wiki is wrong. To me, if anything, I'd like to get
> something that's correct on the wiki in order to facilitate new users. I've
> gotten this to work as well, and I don't remember having to go through much
> to get it working. I wonder if something has changed?
>
> -BDF
>
> On Fri, Mar 30, 2012 at 3:37 PM, Michael Collins <msc at freeswitch.org>wrote:
>
>>
>>
>> On Fri, Mar 30, 2012 at 12:20 PM, Brian Foster <bdfoster at endigotech.com>wrote:
>>
>>> I need to change the caller_id_name and caller_id_number. I've got ATA's
>>> that don't like the plus in front of the number. At the same time, I'm
>>> doing a cidlooup, so that's going to have to be changed as well.
>>>
>>> -BDF
>>>
>>>
>> It looks like PB 18786 doesn't have very much information. I'd recommend
>> getting the whole call from start to finish, and get the SIP trace as well.
>> Also, if you're creating a new leg with a bridge then you'll need to export
>> effective_caller_id_number or set it in the {} in front of the dialstring.
>> Lastly, be sure to use the sip_cid_type<http://wiki.freeswitch.org/wiki/Channel_Variables#sip_cid_type>var to select which field has the caller ID info in it.
>>
>> -MC
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> 
>> 
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://wiki.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>>
>
>
> --
> Brian D. Foster
> Endigo Computer LLC
> Email: bdfoster at endigotech.com
> Phone: 317-800-7876
> Indianapolis, Indiana, USA
>
> This message contains confidential information and is intended for those
> listed in the "To:", "CC:", and/or "BCC:" fields of the message header. If
> you are not the intended recipient you are notified that disclosing,
> copying, distributing or taking any action in reliance on the contents of
> this information is strictly prohibited. E-mail transmission cannot be
> guaranteed to be secure or error-free as information could be intercepted,
> corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.
> The sender therefore does not accept liability for any errors or omissions
> in the contents of this message, which arise as a result of e-mail
> transmission. If verification is required please request a hard-copy
> version.
>
>


-- 
Brian D. Foster
Endigo Computer LLC
Email: bdfoster at endigotech.com
Phone: 317-800-7876
Indianapolis, Indiana, USA

This message contains confidential information and is intended for those
listed in the "To:", "CC:", and/or "BCC:" fields of the message header. If
you are not the intended recipient you are notified that disclosing,
copying, distributing or taking any action in reliance on the contents of
this information is strictly prohibited. E-mail transmission cannot be
guaranteed to be secure or error-free as information could be intercepted,
corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.
The sender therefore does not accept liability for any errors or omissions
in the contents of this message, which arise as a result of e-mail
transmission. If verification is required please request a hard-copy
version.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120330/f3b4aa26/attachment-0001.html 


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