[asterisk-users] Incoming INVITE with Portability Info and LRN

Administrator TOOTAI admin at tootai.net
Fri Mar 18 10:49:30 CDT 2016


Le 18/03/2016 16:20, Trey Hilyard a écrit :
> I am trying to set up my Asterisk server so that it will recognize an
> incoming call to the Asterisk's own Location Routing Number (LRN),
> validating the "rn" in the INVITE and then using the Called Number from
> the INVITE as the extension in the dialplan.
>
> The INVITE R-URI looks like:
> INVITE
> sip:+19135041291;rn=+19136630000;npdi at 12.4.240.200:5060;user=phone;transport=udp
> SIP/2.0
>
> The +1913663000 is the LRN of the Asterisk box, so I would want to have
> the dialplan validate that the "rn" is that number. The +19136631291 is
> the extension within the system that they are trying to reach, that
> extension will vary, and will have an exten defined in the dialplan.
>
> I assume that this is just going to require that I do some matching and
> substring-type variable replacement to hit a context with just the
> Called Number part of the request, but I wondered if anyone had a
> working example of this before I started putting too much effort into it.

Use the SIP_HEADER function

http://www.voip-info.org/wiki/view/Asterisk+func+sip_header

-- 
Daniel



More information about the asterisk-users mailing list