<div dir="ltr"><div>This is where the problem is. The place where I need that information is on the external gateway itself, not on the internal one (behind NAT) where the devices register. The directory settings on the internal gateway has the effective_caller_id_name and number changed from their defaults, so the SIP user name and user id on the sip phone don't seem to appear in any of the channel variables during the call.<br><br></div><div>To give more detail. All SIP phone registers to Asterisk user id and password. Asterisk registers to internal Freeswitch running on a different port on the same box. The internal Freeswitch connects to external Freeswitch which connects external providers gateways. I need to combine the internal Gateway's CLI with the User ID from Sipura in the external Freeswitch's to form the effective_caller_id_number to differentiate calls in the external providers CDR.<br></div><div><br></div>The username and user id on the Sipura are present somewhere but they don't seem to be available in any of the caller profile fields or variables in the A Leg phase. It is in the B Leg that somehow they are obtained, and they appear in info command, and in the Bleg xml_cdr. Can user_data actually retrieve them in the ALeg stage?<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 3 February 2016 at 19:57, Stanislav Sinyagin <span dir="ltr"><<a href="mailto:ssinyagin@gmail.com" target="_blank">ssinyagin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">You need user_data.<br>
See the example here: <a href="https://txlab.wordpress.com/2013/06/29/freeswitch-limiting-the-number-of-concurrent-calls-on-multiple-sip-accounts/" target="_blank">https://txlab.wordpress.com/2013/06/29/freeswitch-limiting-the-number-of-concurrent-calls-on-multiple-sip-accounts/</a><br></p><div class="HOEnZb"><div class="h5">
<div class="gmail_quote">On 3 Feb 2016 19:16, "vfclists ." <<a href="mailto:vfclists@gmail.com" target="_blank">vfclists@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>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.<br><br></div>eg. When I check the logs I see output like this sofia.c:1192 sofia/internal/<a href="mailto:2048@201.182.29.148" target="_blank">2048@201.182.29.148</a> Update Caller ID to "Desk 12" <1012><br><br></div>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.<br><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 3 February 2016 at 17:34, Ítalo Rossi <span dir="ltr"><<a href="mailto:italo@freeswitch.org" target="_blank">italo@freeswitch.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><a href="https://freeswitch.org/confluence/display/FREESWITCH/XML+Dialplan#XMLDialplan-CallerProfileFieldsvs.ChannelVariables" target="_blank">https://freeswitch.org/confluence/display/FREESWITCH/XML+Dialplan#XMLDialplan-CallerProfileFieldsvs.ChannelVariables</a><br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Wed, Feb 3, 2016 at 2:11 PM, vfclists . <span dir="ltr"><<a href="mailto:vfclists@gmail.com" target="_blank">vfclists@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div><div><div>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?<br><br></div>Is there also a way of performing some string manipulation and extraction on the variables in the XML dialplan?<br><br></div>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.<br><br></div>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.<span><font color="#888888"><br clear="all"><div><div><div><div><br>-- <br><div>Frank Church<br><br>=======================<br><a href="http://devblog.brahmancreations.com" target="_blank">http://devblog.brahmancreations.com</a></div>
</div></div></div></div></font></span></div>
<br></div></div>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><span><font color="#888888"><br></font></span></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr">Ítalo Rossi<div><a href="mailto:italo@freeswitch.org" target="_blank">italo@freeswitch.org</a></div></div></div>
</font></span></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br><br clear="all"><br>-- <br><div>Frank Church<br><br>=======================<br><a href="http://devblog.brahmancreations.com" target="_blank">http://devblog.brahmancreations.com</a></div>
</div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div>
</div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Frank Church<br><br>=======================<br><a href="http://devblog.brahmancreations.com" target="_blank">http://devblog.brahmancreations.com</a></div>
</div>