[Users] How to rewrite source IP -- SIP packet forwarding.

Bogdan-Andrei Iancu bogdan at voice-system.ro
Tue Aug 2 10:55:41 CEST 2005


Hi Ray,

try to place before the :
    t_relay_to_udp("<public_ip1>", "5060");
the following:
    force_send_socket( <public_ip0>:5060 );

this will force the eth0 interface to be used for forwarding the 
requests to Astersik.

regards,
bogdan


Ray Van Dolson wrote:

>I'm using nathelper with OpenSER 0.10.x.  Here's a quickie diagram of my
>setup:
>
>  [SIP ATA] <-------------> [OpenSER] <--------------> [Asterisk]
> 10.0.201.5            eth1 - 10.0.201.7          eth0 - <public_ip1>
>                       eth0 - <public_ip0>
>
>I'm using the basic nathelper example configuration, except for one
>modification.  I removed the call to t_relay and replaced it with:
>
>t_relay_to_udp("<public_ip1>", "5060");
>
>Basically I want a SIP packet to come in to eth1 on OpenSER server, get
>rewritten as needed by nathelper, then get sent out to public_ip1 on my
>Asterisk PBX.
>
>This appears to be working except a tcpdump on eth0 on OpenSER shows:
>
>14:39:08.654908 IP 10.0.201.7.5060 > <public_ip1>.5060: UDP, length 629
>
>Obviously the packets will never get back with that source IP address.  What
>command should I be looking at to rewrite this IP so it shows up as
><public_ip0> automatically?
>
>I'm trying to get SIP ATA's to REGISTER on my Asterisk box but proxy through
>OpenSER ... (and eventually make use of the rtp proxy).
>
>Can post more info if requested, I am new to SER. :-)
>
>  
>





More information about the Users mailing list