[OpenSIPS-Users] Change Via-port based on Destination-port

Bogdan-Andrei Iancu bogdan at opensips.org
Thu Jun 9 12:09:36 CEST 2011


Hi Joel,

Have you tried to add in the very beginning of your script a 
"force_rport();" ?

Regards,
Bogdam

On 06/08/2011 07:00 PM, joel.oliveira wrote:
> Hello all,
>
> I am having problems with a D-Link Horstbox Professional DVA-G3342SB which
> is behind a router and is not receiving any calls when registered in
> OpenSIPs; when I register him on a Asterisk it does receive calls.
>
> My 2 different configurations are:
> a) Asterisk 1.4.26.2
> b) Opensips 1.6.4 + Cisco Media GW
>
> As you can see in the pastebin - http://pastebin.com/LXPf3mXe , in both
> Request of Register by the client (Asterisk and OpenSIPs) the source-port is
> different then the Via-port ( e.g. in Asterisk source-port=1024 and
> via-port=1026 ), which by itself is very strange but Asterisk handles well
> the situation. When placing a call to the client ( first Invite in the
> pastebin ) it uses the same IP:port for both placing the SIP-message and the
> Via-header delivering correctly the call.
>
> In OpenSIPs: since the ports are different between the source and the
> via-header, OpenSIPs identifies the user as behind NAT ( which is true ).
> When placing a call to the client (the Last Invite on the Pastebin ) the via
> and the destination-port are different because it uses both contact and the
> received information from DB to generate the SIP Request and the call never
> gets to the client.
>
> So for the question to maybe solve my problem: Is it possible to clone the
> Asterisk-behaviour, i.e. compare both via-IP and destination-IP and if they
> are equal just change the via-port with the destination-port? Or by any
> reason I am thinking this all wrong and should rethink this?
>
> Thanks for your time - Best Regards,
> Joel Oliveira

-- 
Bogdan-Andrei Iancu
OpenSIPS solutions and "know-how"




More information about the Users mailing list