[OpenSIPS-Users] Source port in SIP replies

Bogdan-Andrei Iancu bogdan at voice-system.ro
Mon Oct 11 15:08:49 CEST 2010


Hi Alex,

got it, and indeed, it looks weird... as it is impossible from opensips 
point of view (as for UDP, there are used only the defined 
interfaces/sockets, so not dynamic ports).

I would rather suspect something related to kernel/iptables....

Regards,
Bogdan

Саша Александров wrote:
> Hi, Bogdan!
>
> I sent pcap to your address directly, in order not to disclose real ip 
> addresses and to throw files to the list.
> I tried to study the code, and yes, it appears that it can not change 
> the port freely...
> The strnage thing is, that this problem appeared suddenly, and then 
> suddenly disappeared - without my interaction.
> Unfortunately, only the capture that I sent exists. I noticed that the 
> src port is different only when the problem already went away.
> Looks like some kernel/system flaw...
> iptables do not change packets - there is only an ACCEPT input chain 
> for the operator's address...
> Weird...
>
> --
> Regards,
> Alex
>
> 2010/10/6 Bogdan-Andrei Iancu <bogdan at voice-system.ro 
> <mailto:bogdan at voice-system.ro>>
>
>     Hi Alexandr,
>
>     Alexandr A. Alexandrov wrote:
>     > Hi Bogdan,
>     >
>     > Well, this confuses me even more...
>     > I though that in case opensips can not open socket on the port it
>     > listens on, it tries to open a socket on a port where it can,
>     and then
>     > send the packet out...
>     >
>     all the local ports are open at startup time - there is no local
>     socket
>     created at runtime (for UDP).
>
>     I'm really sure that opensips is not messing with the ports, this
>     is why
>     I was asking for the pcap....just to check what happens at network
>     level.
>
>     Regards,
>     Bogdan
>     > This would not break any standarts, AFAIK (even though firewalls
>     might
>     > get crazy about this, which is, pitifully, my case).
>     >
>     > Regards,
>     > Alex
>     >
>     >
>     > 06.10.2010 15:26, Bogdan-Andrei Iancu:
>     >
>     >> Hi Alexandr,
>     >>
>     >> Alexandr A. Alexandrov wrote:
>     >>
>     >>
>     >>> Hi!
>     >>>
>     >>> I ran into a pretty weird situation last day. I'm using
>     opensips-1.6.2
>     >>> as a load balancer for several * servers.
>     >>> Everything worked fine for months, but suddenly opensips
>     started to use
>     >>> ports like 56827 or 51234 (does not matter, just non-default,
>     not the
>     >>> one it is listening on). And the operator's system does not
>     allow such
>     >>> replies, it just drops them.
>     >>> Opensips is listening on port 5070 on my system.
>     >>>
>     >>> Invite comes like:
>     >>> User Datagram Protocol, Src Port: sip (5060), Dst Port: vtsas
>     (5070)
>     >>> INVITE sip:xxxxx at my.ip:5070;user=phone SIP/2.0
>     >>>
>     >>> Reply goes like:
>     >>> User Datagram Protocol, Src Port: 52795 (52795), Dst Port: sip
>     (5060)
>     >>> SIP/2.0 100 Giving a try
>     >>>
>     >>> Normally src port is always 5070.
>     >>>
>     >>> So, the questions are:
>     >>> - under what conditions does opensips decide to invent a new port?
>     >>>
>     >>>
>     >> under no conditions - it will use only the defined interfaces
>     from cfg...
>     >>
>     >> Are you sure about that port changing ? could you provide a
>     pcap showing
>     >> this ?
>     >>
>     >> Regards,
>     >> Bogdan
>     >>
>     >>
>     >>
>     >>
>     >
>     >
>     > _______________________________________________
>     > Users mailing list
>     > Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>     > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>     >
>     >
>
>
>     --
>     Bogdan-Andrei Iancu
>     OpenSIPS Bootcamp
>     15 - 19 November 2010, Edison, New Jersey, USA
>     www.voice-system.ro <http://www.voice-system.ro>
>
>
>     _______________________________________________
>     Users mailing list
>     Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>
> -- 
> С уважением, ААА.
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
15 - 19 November 2010, Edison, New Jersey, USA
www.voice-system.ro




More information about the Users mailing list