Brian J. Murrell
2019-Jan-15 15:46 UTC
[asterisk-users] (NAT) direct media to host on local net when registering from external address
This is going to be a bit of an odd situation, but perhaps might become more and more common (as mobile phone SIP clients utilize PUSH proxies instead of the battery draining direct registering with SIP servers). I have a SIP client which can be on the same RFC-1918 LAN as my Asterisk server. Even though it's on the same LAN as the Asterisk server, it's registration comes from an IP address external to the LAN. This is because the client is registering to the local Asterisk server through a SIP proxy server that is external to the LAN. Is there any way for Asterisk to determine that this is what is happening and to direct/setup the media session to the client on it's LAN address? Put another way, even though the registration comes from an external (NATted) IP address, I want the media connection to stay within the LAN. One solution of course is to add the external IP address of the SIP proxy -- the address that the client's registration is coming from -- to localnet but that breaks the use-case of the SIP client (which is mobile) leaving the LAN and having an external IP address. Ultimately I am hoping there is something in the registration that will indicate to Asterisk that even though the registration is coming from an external IP address, the client has an internal IP address that is on the same network as it is and sets the IP address in the SDP payload to a local IP address. I do realize this is fairly non-standard configuration so it might not be possible. Any suggestions would be welcome. Cheers, b. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: This is a digitally signed message part URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20190115/870af47c/attachment-0001.sig>
John Kiniston
2019-Jan-15 16:00 UTC
[asterisk-users] (NAT) direct media to host on local net when registering from external address
How is your endpoint currently configured in asterisk? Have you tried rtp_symmetric to see if the endpoint sends audio to asterisk if asterisk can send audio back to the client? Alternatively if your SIP Proxy is also a Media proxy you could set the media_address on the endpoint to be your proxy and let your proxy handle proxying the media to your endpoint. On Tue, Jan 15, 2019 at 8:47 AM Brian J. Murrell <brian at interlinx.bc.ca> wrote:> > Put another way, even though the registration comes from an external > (NATted) IP address, I want the media connection to stay within the > LAN. >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20190115/03990d57/attachment.html>
Brian J. Murrell
2019-Jan-15 16:17 UTC
[asterisk-users] (NAT) direct media to host on local net when registering from external address
On Tue, 2019-01-15 at 09:00 -0700, John Kiniston wrote:> How is your endpoint currently configured in asterisk?It's configured as a chan_sip peer.> Have you tried > rtp_symmetric to see if the endpoint sends audio to asterisk if > asterisk > can send audio back to the client?That would require using chan_pjsip wouldn't it? Not that I am opposed to trying that. I need to use chan_pjsip at some point to be able to authenticate to my SIP provider for SIP SIMPLE anyway. But will rtp_symmetric really solve the problem? Isn't the problem the setting up of the RTP session, so there is no address and port that it receives from yet?> Alternatively if your SIP Proxy is also a Media proxy you could set > the > media_address on the endpoint to be your proxy and let your proxy > handle > proxying the media to your endpoint.The idea of sending my media out of the LAN (where I have almost zero latency) and introducing the latency of a round trip to the proxy and back doesn't seem like a great solution. Cheers, b. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: This is a digitally signed message part URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20190115/37424325/attachment.sig>
Maybe Matching Threads
- (NAT) direct media to host on local net when registering from external address
- How do I enable instant messaging support for PJSIP endpoints on Asterisk 13.1.0?
- pjsip trunking configuration issue
- How do I enable instant messaging support for PJSIP endpoints on Asterisk 13.1.0?
- CALLERID on pjsip doesn't work?