[OpenSIPS-Users] media server behind nat

Tony Ward Tonyward at ob.ais-rx.com
Wed Feb 5 20:19:09 CET 2014


Hello, 

I currently have a media server behind a nat firewall with calls
delivered via a PSTN Trunk.  I want to add a 2nd media server and route
calls to either depending upon the dialed number.  I've been  trying to
do this using drouting in opensips 1.10.0, but cannot get a
configuration that works.  

 

I started by generating the 'trunking script' using make menuconfig, and
populated mysql to accept my PSTN trunk and route to my media server.
When an incoming call arrives, it is directed to opensips, and forwarded
to media server with a record-route header containing my private ip.
This confuses my PSTN partner and we are unable to establish the rtp
stream.

 

After reviewing the mailing lists I tried setting alias and
advertised_address=my public ip.  Now when an incoming call arrives it
is directed to opensips and forwarded to the media server with a
record-route header containing my public ip.  Call setup completes
successfully.  Call teardown initiated from PSTN trunk completes
successfully.  Call teardown initiated from media server fails because
the media servers sends BYE  to the public IP, and the NAT router does
not know what to do with it (destination unreachable).

 

It seems as though the invite to my media server needs to have a
record-route header with my private ip, while the ok response back to my
PSTN provider needs to have a record-route header with my public ip.  Is
this the right approach?  I've briefly toyed with rtpproxy and also
b2bua without much luck, and was hoping this simpler solution could be
made to work.

 

Thanks,

Tony

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20140205/071cffc6/attachment.htm>


More information about the Users mailing list