PJSIP Outbound Proxy

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

PJSIP Outbound Proxy

Postby asackheim » Tue Jan 19, 2016 9:57 am

Back as far as Asterisk 1.8 in chan_sip, there was a concept of an outbound proxy.
The sip.conf file has this:
outboundproxy=proxy.provider.domain ; send outbound signaling to this proxy, not directly to the devices

In creating "endpoints" in 1.8, you could specify a "host=xxx" to send traffic bound for any destination through that host and then onto its final destination.

I have been trying to utilize this same method in PJSIP, but can't find any way to do it.
The goal is Asterisk -> Sip Proxy -> End Destination
Dialing with the string PJSIP/endpoint/sip:9999@xxx.xxx.xxx.xxx permits me to send packets directly to the end destination, but refuses to utilize the AOR record as the proxy and goes directly to the destination instead of through the proxy.
Using the outbound_proxy in the endpoint, causes the INVITE message's INVITE header to show "INVITE endpoint" as opposed to the expected "INVITE sip:9999@xxx.xxx.xxx.xxx".

I have run out of things to try and the code is so convoluted these days, its very difficult to trace how parameters affect the output.

Any help is appreciated.
asackheim
Newsterisk
 
Posts: 2
Joined: Tue Jan 19, 2016 9:40 am

Re: PJSIP Outbound Proxy

Postby jcolp » Tue Jan 19, 2016 1:57 pm

You want to use SIP loose routing, this is accomplished using something like the following for the outbound_proxy:

outbound_proxy=sip:5.5.5.5\;lr

The ;lr signifies loose routing, which will not alter the request URI.

I'd also suggest providing the complete configuration if this does not work.
Joshua Colp
Digium, Inc. | Senior Software Developer
jcolp
Oldsterisk
 
Posts: 248
Joined: Tue May 19, 2015 6:59 am

Re: PJSIP Outbound Proxy

Postby asackheim » Tue Jan 19, 2016 5:12 pm

That did fix the issue. (I found this out myself right after I posted this message), but it does not appear to be documented anywhere. I would be good to mention this under the outbound_proxy description in the endpoint section.

It would also be good to mention this under PJSIP dialing examples in the documentation, since it discusses an example where you use an endpoint, but it ignores the AOR references to it, etc.

Thanks for your help!

Andy
asackheim
Newsterisk
 
Posts: 2
Joined: Tue Jan 19, 2016 9:40 am

Re: PJSIP Outbound Proxy

Postby jcolp » Wed Jan 20, 2016 6:19 am

If there's a wiki page you came across which would have helped please leave a comment there with some information about how it could have and we'll incorporate something.
Joshua Colp
Digium, Inc. | Senior Software Developer
jcolp
Oldsterisk
 
Posts: 248
Joined: Tue May 19, 2015 6:59 am


Return to Asterisk Support

Who is online

Users browsing this forum: MSN [Bot] and 1 guest