<div dir="ltr"><div>We used LUA script to deal with registered asterisk systems. <br></div><div>Example DID <a href="tel:888%20555%206666" value="+18885556666" target="_blank">888 555 6666</a> is assigned to user 101, registered on some ip say 8.8.8.8 <br></div><div>Contact will look like <br></div><div><a href="mailto:s@8.8.8.8">s@8.8.8.8</a><br>or <br>101@8.8.8.8.8 <br></div><div><br>LUA Code <br>DIALED_NUMBER=<a href="tel:8885556666" value="+18885556666" target="_blank">8885556666</a><br></div><div>USER = 111  <br></div><div>location = api:execute(&quot;sofia_contact&quot;, USER) or &quot;&quot;<br>destinationlocation=location:gsub(&quot;sip:(.-)@&quot;,&quot;sip:&quot;..DIALED_NUMBER..&quot;@&quot;) <br></div><div>-- This will replace user part in contact heard, (s or even username) with the DID number. <br></div><div>-- destinationlocation will look like <a href="mailto:sip%3A8885556666@8.8.8.8">sip:8885556666@8.8.8.8</a><br></div><div><br>if (destinationlocation ~= &quot;&quot;) then<br>        session:execute(&quot;bridge&quot;,&quot;{sip_cid_type=rpid,loop=3}&quot;..destinationlocation)<br>        <br>end<br><br></div><div class="gmail_extra">Hope this help. <br><br><font color="#888888"><div> <b>Jai Rangi</b><br><span>Cebod Technologies LLC dba DIDforSale/Cebod Telecom</span> </div> <div style="color:rgb(141,141,141);font-size:13px;padding:5px 0px"> <a href="tel:O%20949-471-0101" style="color:rgb(141,141,141);text-decoration:none" target="_blank">O 949-471-0102</a>  <span style="color:rgb(69,102,142);display:inline-block">|</span> <span style="display:inline-block"><a href="tel:C%20949-742-2666" style="color:rgb(141,141,141);text-decoration:none" target="_blank">C 949-<font color="#888888">419-7634</font></a></span>  <span style="color:rgb(69,102,142);display:inline-block">|</span> <span style="display:inline-block"><a style="color:rgb(141,141,141);text-decoration:none">F 949-269-0449 / 949-232-1410</a></span>  <span style="color:rgb(69,102,142);display:inline-block">|</span> <span style="display:inline-block"><a href="mailto:jprangi@didforsale.com" style="color:rgb(141,141,141);text-decoration:none" target="_blank">jprangi@didforsale.com</a></span> <span style="color:rgb(69,102,142);display:inline-block"></span> <span style="white-space:nowrap;display:inline-block"><a href="http://www.cebod.com" style="color:rgb(141,141,141);text-decoration:none" target="_blank">www.cebod.com</a></span>  <span style="color:rgb(69,102,142);display:inline-block">|</span> <span style="color:rgb(69,102,142);display:inline-block"></span> <span style="color:rgb(141,141,141);display:inline-block"><a href="http://www.didforsale.com" target="_blank">www.didforsale.com</a> |3200 Bristol St Suite 615, Costa Mesa, CA 92626  <br></span></div></font><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><img src="https://docs.google.com/uc?export=download&amp;id=0Bz0cNflKgNsWQno1V3dQTzhNSUk&amp;revid=0Bz0cNflKgNsWOFh1ZnMydnBtU1ZDLzZ2OHBMM2Y2bVQ3R1pFPQ"><br><br><br><br><br></div></div></div></div></div>
<br><div class="gmail_quote">On Tue, Feb 2, 2016 at 12:29 PM, Oz Mortimer <span dir="ltr">&lt;<a href="mailto:omortimer@gmail.com" target="_blank">omortimer@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div></div><div>I think you need to explain what you are trying to achieve.. </div><div>What you are doing currently is registering a user against freeswitch - not dissimilar to logging in to Skype. </div><div>In your bridge statement you are calling the registered user - again like you would in Skype.</div><div>Is there a reason you want asterisk to register against freeswitch? The only thing I can think of is that it&#39;s on a private LAN and that your asterisk box does something &quot;special&quot;..</div><div><div class="h5"><div><br></div><div><br>On 2 Feb 2016, at 19:28, Marc S &lt;<a href="mailto:therebel22@gmail.com" target="_blank">therebel22@gmail.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">It seems that &quot;freeswitch gateway username&quot; return all results about setup username and password on FS to register against external SIP gateway, am i wrong ?<br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-02-02 20:23 GMT+01:00 Oz Mortimer <span dir="ltr">&lt;<a href="mailto:omortimer@gmail.com" target="_blank">omortimer@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div></div><div>Setup username / password authentication on asterisk and set the corresponding user &amp; pass in your freeswitch gateway. </div><div>I&#39;m sure a google for &quot;asterisk username authentication&quot; and &quot;freeswitch gateway username&quot; will give you plenty of examples - you will want freeswitch to bridge to gateway - again Google &quot;freeswitch bridge gateway&quot;.</div><div>Google is your friend.. </div><div><div><div><br></div><div><br>On 2 Feb 2016, at 19:03, Marc S &lt;<a href="mailto:therebel22@gmail.com" target="_blank">therebel22@gmail.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">I want to use mod xml curl to generate dynamic dialplan xml like this :<br><div><br> &lt;extension name=&quot;inbound_12345678&quot;&gt;<br>        &lt;condition field=&quot;destination_number&quot; expression=&quot;^(12345678)$&quot;&gt;<br>           &lt;action application=&quot;bridge&quot; data=&quot;user/myuserid&quot;/&gt;<br></div><div>        &lt;/condition&gt;<br></div><div>&lt;/extension&gt;<br><br></div><div>Thanks<br></div><div><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-02-02 19:16 GMT+01:00 Sergey Safarov <span dir="ltr">&lt;<a href="mailto:s.safarov@gmail.com" target="_blank">s.safarov@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">What is way you planing to use for link DID with user?<div><br></div><div>Sergey</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Tue, Feb 2, 2016 at 8:20 PM, Marc S <span dir="ltr">&lt;<a href="mailto:therebel22@gmail.com" target="_blank">therebel22@gmail.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><div dir="ltr"><div><div><div><div><div>Hello,<br></div>sorry for asking again :<br><br></div>I hav an asterisk that register on Freeswitch (as a user). <br><br></div>When a call is incoming to FS, FS send it to asterisk : In asterisk, it is the s extension.<br><br></div>Here my bridge tests<span><br><br>&lt;action application=&quot;bridge&quot; data=&quot;user/myuserid&quot;/&gt; <br><br></span></div>=&gt; s extension in asterisk instead of extension<br><div><br>&lt;action application=&quot;bridge&quot; data=&quot;sofia/mycontext/myextension@&lt;ASTERISK_IP&gt;&quot;/&gt;<br><br></div><div>=&gt; Not authenticated in asterisk (because no IP authentication in asterisk)<br><br></div><div>Have you an idea how to send real extension instead of s extension  ?<br></div><div>Thanks<br></div><div><br><br></div><div><br><br><div><br><br></div></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2016-01-03 10:45 GMT+01:00 Marc S <span dir="ltr">&lt;<a href="mailto:therebel22@gmail.com" target="_blank">therebel22@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div><div>Hello,<br><br></div>i&#39;m discovering FS. I hav read a lot about users and gateways.<br><br></div>I would like to  FS act as registrar for authenticated SIP trunking.<br><br></div>- Customers IPBX would register with login/password to Freeswitch. <br>- Incoming call would be routed to these SIP trunks in dialplan XML.<br><br></div>directory/users does not seem to be the solution because in dialplan, destination DID can&#39;t be defined, only user id :<br><br>&lt;action application=&quot;bridge&quot; data=&quot;user/myuserid&quot;/&gt;<br><br></div>gateway seems to be designed for SIP trunking to remote SIP gateway, not for FS to act as registrar.<br><br></div>Is it possible to FS to act as authenticated SIP trunking registrar ?<br><br></div>Thanks a lot,<br></div>Marc<br><div><div><div><div><br><br></div></div></div></div></div>
</blockquote></div><br></div>
</div></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><br></blockquote></div><br></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></div>
</div></blockquote><blockquote type="cite"><div><span>_________________________________________________________________________</span><br><span>Professional FreeSWITCH Consulting Services: </span><br><span><a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a></span><br><span><a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a></span><br><span></span><br><span>Official FreeSWITCH Sites</span><br><span><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></span><br><span><a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a></span><br><span><a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a></span><br><span></span><br><span>FreeSWITCH-users mailing list</span><br><span><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a></span><br><span><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></span><br><span>UNSUBSCRIBE:http://<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">lists.freeswitch.org/mailman/options/freeswitch-users</a></span><br><span><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></span></div></blockquote></div></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><br></div>
</div></blockquote><blockquote type="cite"><div><span>_________________________________________________________________________</span><br><span>Professional FreeSWITCH Consulting Services: </span><br><span><a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a></span><br><span><a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a></span><br><span></span><br><span>Official FreeSWITCH Sites</span><br><span><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></span><br><span><a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a></span><br><span><a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a></span><br><span></span><br><span>FreeSWITCH-users mailing list</span><br><span><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a></span><br><span><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></span><br><span>UNSUBSCRIBE:http://<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">lists.freeswitch.org/mailman/options/freeswitch-users</a></span><br><span><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></span></div></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></div></div>