[Freeswitch-users] How do you access caller profile fields in the XML dialplan?

Stanislav Sinyagin ssinyagin at gmail.com
Wed Feb 3 22:57:44 MSK 2016


You need user_data.
See the example here:
https://txlab.wordpress.com/2013/06/29/freeswitch-limiting-the-number-of-concurrent-calls-on-multiple-sip-accounts/
On 3 Feb 2016 19:16, "vfclists ." <vfclists at gmail.com> wrote:

> There are quite a number of variables there, but I can't seem to find tthe
> one I want because the actual extension doesn't seem to be used in the
> configuration files.
>
> eg. When I check the logs I see output like this  sofia.c:1192
> sofia/internal/2048 at 201.182.29.148 Update Caller ID to "Desk 12" <1012>
>
> What I want to do is to combine the 2048 with the 1012 to create the
> effective_caller_id_number 20481012. The information is present somewhere
> in Freeswitch. The extensions connect to Asterisk because most of the
> applications were written for Asterisk, but Asterisk proved to be terrible
> behind NAT so a Freeswitch system was added as an intermediate gateway, so
> none of the extensions register to the Freeswitch, only the Asterisk.
>
>
> On 3 February 2016 at 17:34, Ítalo Rossi <italo at freeswitch.org> wrote:
>
>>
>> https://freeswitch.org/confluence/display/FREESWITCH/XML+Dialplan#XMLDialplan-CallerProfileFieldsvs.ChannelVariables
>>
>> On Wed, Feb 3, 2016 at 2:11 PM, vfclists . <vfclists at gmail.com> wrote:
>>
>>> What is the syntax for accessing caller profile fields in the dialplan,
>>> for instance if you want to set a channel variable to a caller profile
>>> field?
>>>
>>> Is there also a way of performing some string manipulation and
>>> extraction on the variables in the XML dialplan?
>>>
>>> This is what I am trying to achieve. The CDR from a service provider
>>> contains the CLI from a gateway on the customers premises, but it doesn't
>>> show which extension on the customer's premises the call came from. What I
>>> need is to be able to obtain the extension of the sip device and combine
>>> that with the customer gateway's CLI so that it shows in the CDR record.
>>>
>>> eg if the gateway's CLI is 2340 and the extension of the caller is 1001,
>>> corresponding to the UserId on a sipura, I want the CLI passed to the
>>> service provider to be 23401001. When I check the XML cdr in Freeswitch I
>>> see an XML value which in XPath would be accessed as
>>> /callflow/caller_profile/caller_id_number. All the information is therefore
>>> passed onto Freeswitch for use in the call, and what I need is to be able
>>> to access it and change the effective_caller_id_number before bridging the
>>> call.
>>>
>>> --
>>> Frank Church
>>>
>>> =======================
>>> http://devblog.brahmancreations.com
>>>
>>> _________________________________________________________________________
>>> Professional FreeSWITCH Consulting Services:
>>> consulting at freeswitch.org
>>> http://www.freeswitchsolutions.com
>>>
>>> Official FreeSWITCH Sites
>>> http://www.freeswitch.org
>>> http://confluence.freeswitch.org
>>> http://www.cluecon.com
>>>
>>> FreeSWITCH-users mailing list
>>> FreeSWITCH-users 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
>>>
>>
>>
>>
>> --
>> Ítalo Rossi
>> italo at freeswitch.org
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users 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
>>
>
>
>
> --
> Frank Church
>
> =======================
> http://devblog.brahmancreations.com
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160203/3fb4a0c1/attachment-0001.html 


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