[OpenSIPS-Users] Need help w/ NATHelper & RTPPROXY (or if mediaproxy would work better?)
Kirk Stephens
Kirk.Stephens at vocalocity.com
Tue Oct 28 18:47:54 CET 2008
Hello all,
I am trying to understand how to configure nathelper and rtpproxy to do media hairpinning to the OpenSIPs proxy between two call legs in the following 3 scenarios. I have all of the signal routing working as desired, and I have been able to directly connect media between clients and the PSTN gateways, however, I need to find a way to hairpin on the OpenSIPs rtpproxy directly, I am just trying to understand how I can hairpin and exchange the media between the two call legs on the public side of the OpenSIPs proxy. I have been working with rtpproxy so far. If this would be easier accomplished with media proxy please point me in the right direction. Also, if anyone is aware of a problem in that supporting all three scenarios here is beyond the design scope for an OpenSIPs solution (and I need to look at B2BUA purpose-built options instead) please let me know (and maybe recommend a Free Open Source B2BUA solution you have had any positive experience with).
Scenario 1: NAT client termination to PSTN
Nat’d Client UAC → OpenSIPS Public Int → AppServer w/ private IP (think of something like asterisk here) = Leg 1.
AppServer w/private IP → OpenSIPS Private Int → Public PSTN GW = Leg 2
With end result being media flow as:
Nat’d Client UAC media → OpenSIPS/SER public Int → Public PSTN GW - and
Public PSTN GW → OpenSIPS/SER public Int → Nat’d Client UAC pinhole
Note: The appserver in this case uses the same SDP parameters to start Leg 2 as it received from OpenSIPS on Leg1, but generates a different call id.
Scenario 2: PSTN Origination to NAT clients
PSTN GW → OpenSIPS/SER Public Int → AppServer w/ private IP = Leg 1.
AppServer w/ Private IP → OpenSIPs Private Int → Nat’d client UAS pinhole = Leg 2.
With the same result media flow as:
Nat’d Client UAC media → OpenSIPS/SER public Int → Public PSTN GW - and
Public PSTN GW → OpenSIPS/SER public Int → Nat’d Client UAS pinhole
Note: The appserver in this case uses the same SDP parameters to start Leg 2 as it received from OpenSIPS on Leg1, but generates a different call id.
Scenario 3: PSTN or NAT clients directly to AppServer
(PSTN GW || Nat’d Client) → OpenSIPS/SER Public Int → AppServer w/ Private IP.
With the media flow as:
(PSTN GW || Nat’d Client) → OpenSIPS/SER Public Int → AppServer w/ Private IP.
AppServer w/ Private IP → OpenSIPS/SER Public Int → (PSTN GW || Nat’d Client --- same one as is sending audio).
Note: The appserver in this case responds with its local address/port as the connection info parameter in SDP.
Noted “bug”
I am not sure if this is a “bug” or not, but the “nortpproxy” string, if left to default, or set to anything other than a blank string, has consistently been prepended with a null character. I have seen this in wireshark on various legs of various calls wherever it inserts the custom SDP attribute. This causes problems with my appserver, and it will not process the message because of the null character. Because of this, I have had to disable the norttpproxy parameter with ‘modparam(“nathelper”, “norrtpproxy_str”, “”)’. If it is necessary to actually set this to achieve the above, is there known workaround to preventing the null character from being prepended to the attribute line?
Kirk Stephens
More information about the Users
mailing list