<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Fri, Mar 18, 2016 at 10:49 AM Administrator TOOTAI <<a href="mailto:admin@tootai.net">admin@tootai.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Le 18/03/2016 16:20, Trey Hilyard a écrit :<br>
> I am trying to set up my Asterisk server so that it will recognize an<br>
> incoming call to the Asterisk's own Location Routing Number (LRN),<br>
> validating the "rn" in the INVITE and then using the Called Number from<br>
> the INVITE as the extension in the dialplan.<br>
><br>
> The INVITE R-URI looks like:<br>
> INVITE<br>
> sip:+19135041291;rn=+<a href="mailto:19136630000%3Bnpdi@12.4.240.200" target="_blank">19136630000;npdi@12.4.240.200</a>:5060;user=phone;transport=udp<br>
> SIP/2.0<br>
><br>
> The +1913663000 is the LRN of the Asterisk box, so I would want to have<br>
> the dialplan validate that the "rn" is that number. The +19136631291 is<br>
> the extension within the system that they are trying to reach, that<br>
> extension will vary, and will have an exten defined in the dialplan.<br>
><br>
> I assume that this is just going to require that I do some matching and<br>
> substring-type variable replacement to hit a context with just the<br>
> Called Number part of the request, but I wondered if anyone had a<br>
> working example of this before I started putting too much effort into it.<br>
<br>
Use the SIP_HEADER function<br>
<br>
<a href="http://www.voip-info.org/wiki/view/Asterisk+func+sip_header" rel="noreferrer" target="_blank">http://www.voip-info.org/wiki/view/Asterisk+func+sip_header</a></blockquote><div><br></div><div>I am not sure that this is needed here. The Request URI has all of the values that I need. I agree that I might need to CUT part of the R-URI, but I don't need access to any other header to find the info I need.</div><div><br></div><div>When the call arrives at the Asterisk right now, this is the exten/context that it is hitting, so it already has the info I need:</div><div>Executing [9135041291;rn=+19136630000;npdi@from_pstn:1]<br></div><div><br></div><div>As far as I can tell, I think that I just need to figure out how to make an extension entry that matches on the "rn=+19136630000\;npdi" and then moves to another context (or same one) with ${EXTEN,0,10}.</div><div><br></div><div>I just can't get that first extension to match on the RN value.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
--<br>
Daniel<br>
<br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" rel="noreferrer" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</blockquote></div></div>