Incorrect transport was selected for answer on SIP OPTIONS incoming message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

I develop PJSUA2-based server application.
In application I have two (2) UDP transports, they bound to different
subnetworks, which doesn't see each other.

MSC vendor uses SIP OPTIONS messages to "ping" one of transport (IP1) if my
application is running. Second transport (IP2) I use to conference incoming
calls with other IP-phones (mostly proxy functionality for voice here).

The problem was that MSC does not receive SIP 200 OK answers in that
configuration. In wireshark I saw that SIP OPTIONS goes to IP1 and SIP 200
OK answer try to go from IP2 to MSC. MSC and IP2 are isolated (there is no
routes between them) and MSC cannot recevie OK answers.

In the debugger I found processing code doesn't use transport from rx-data.
Therefore PJSIP selects not-appropriate transport later (from hash-table,
occasionally hash-table was contain one transport - IP2).

My problem was fixed by set PJSIP_TPSELECTOR_TRANSPORT with transport from
rx-data to tx-data. You can see commit here:
https://github.com/halex2005/pjproject/commit/6ee75e99a2ab2c7818b74f9bc7ae56518a5a827c
It works very well for my now.

*I also tried to debug why hash-table has only one entry*. I found that
pjsip_transport_register() function uses tp->key as hash-key (in fact, key
is the remote address). In case of two UDP transports (remote address is
zero for both) only one transport goes to the hash-table, second persists
to temporary list and not used more.
I don't know what I can do with it. Any thoughts?

-- 
Best regards, Aleksei.
mailto:akharlov at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20150313/fd366b40/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux