Benoit Panizzon
2017-Dec-22 13:54 UTC
[asterisk-users] To Header instead of Request URI based routing
Dear List It looks like the common way to to sip signaling over a trunk is: In the Request URI, return the 'Register' Contact. In the To: Header, send the destination number. Unfortunately, asterisk with pjsip (i did not try chan_sip) does expect the dialed extension as request uri and does ignore what it is getting in the To: header. I could not find any hint in the documentation of this can be changed. I found instructions for a work-around: http://www.kempgen.net/voip/sip-request-uri-vs-to-header-routing.html In the meantime: Is there a way to tell the asterisk with pjsip to use the To: header to address an extension? Kind regards -Beno?t Panizzon- -- I m p r o W a r e A G - Leiter Commerce Kunden ______________________________________________________ Zurlindenstrasse 29 Tel +41 61 826 93 00 CH-4133 Pratteln Fax +41 61 826 93 01 Schweiz Web http://www.imp.ch ______________________________________________________
Joshua Colp
2017-Dec-22 13:56 UTC
[asterisk-users] To Header instead of Request URI based routing
On Fri, Dec 22, 2017, at 9:54 AM, Benoit Panizzon wrote:> Dear List > > It looks like the common way to to sip signaling over a trunk is: > > In the Request URI, return the 'Register' Contact. > In the To: Header, send the destination number. > > Unfortunately, asterisk with pjsip (i did not try chan_sip) does > expect the dialed extension as request uri and does ignore what it is > getting in the To: header. > > I could not find any hint in the documentation of this can be changed. > > I found instructions for a work-around: > > http://www.kempgen.net/voip/sip-request-uri-vs-to-header-routing.html > > In the meantime: Is there a way to tell the asterisk with pjsip to use > the To: header to address an extension?Both chan_sip and chan_pjsip use the request URI, there's no configuration option currently to change it. Most people end up just doing the parsing in the dialplan. Cheers, -- Joshua Colp Digium, Inc. | Senior Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: www.digium.com & www.asterisk.org
Max Grobecker
2017-Dec-22 21:00 UTC
[asterisk-users] To Header instead of Request URI based routing
Hi, do you have access to the system that sends you these calls? If it's also an Asterisk, you could tell it to send another INVITE URI, regardless of what is submitted in the registration. On Asterisk with chan_sip you can do it by dialling: Dial(SIP/your_peer/+49202thatgoesinthetouri!+49202thatgoesintheinviteuri) That is, as said, if the remote system which is sending you the calls is an Asterisk machine so you can just reconfigure the way you get the calls to your local machine. If it's not your system, you need to parse the To: header - for example, with: Set(ToHeaderVal=${SIP_HEADER(To)}) Set(DailedNumber=${CUT(ToHeaderVal,:,2)}) Set(DailedNumber=${CUT(DailedNumber,@,1)}) That should give you the dialed number in Variable "DialedNumber". Greetings Max Am 22.12.2017 um 14:54 schrieb Benoit Panizzon:> Dear List > > It looks like the common way to to sip signaling over a trunk is: > > In the Request URI, return the 'Register' Contact. > In the To: Header, send the destination number. > > Unfortunately, asterisk with pjsip (i did not try chan_sip) does > expect the dialed extension as request uri and does ignore what it is > getting in the To: header. > > I could not find any hint in the documentation of this can be changed. > > I found instructions for a work-around: > > http://www.kempgen.net/voip/sip-request-uri-vs-to-header-routing.html > > In the meantime: Is there a way to tell the asterisk with pjsip to use > the To: header to address an extension? > > Kind regards > > -Beno?t Panizzon- >-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20171222/1cec587c/attachment.pgp>