Re: pjsua TCP transport issue on Windows 10

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


More info.
I have seen that this happens when the hostname (  in example) resolves different IP because there is more than one computer providing service on the same hostname and the IP changes from to .   When this happens a new TCP connection is created with a new local port.

The problem its that this new local port its not rewrite on the contact even having the allow_contact_rewrite set to true.


On Fri, Mar 27, 2020 at 1:39 PM ramon <calanor@xxxxxxxxx> wrote:
I am testing pjsua app on Windows 10 compiled with Visual Studio.
I connect directly to a Siemens HiPath server. The registry works correctly for a few hours until in one of the re-registrations there is a strange behaviour.
In one of the re-registers, pjsua creates a new TCP transport with a different source port. Looking at the Wireshark it doesn't appear that the previous transport has been broken at any time.
Viewing the log, the creation of the new TCP transport with a new org port is observed, but the previous port continues to appear on contact. 50054 its the previous port and 50088 its the new  source port created.

12:54:50.751   tcpc00F6B374  .TCP client transport created
12:54:50.757   tcpc00F6B374  .TCP transport is connecting to
12:54:50.758   pjsua_core.c  .TX 726 bytes Request msg REGISTER/cseq=36417 (tdta00F76F4C) to TCP
REGISTER;transport=tcp SIP/2.0
Via: SIP/2.0/TCP;rport;branch=z9hG4bKPj81eff9781dbe429eae25993049a28a82;alias
Max-Forwards: 70
From: <sip:xxxxxxxx@ sipserver .com>;tag=9cf46b07fd9247f2986f725806dd2942
To: <sip: xxxxxxxx @sipserver .com>
Call-ID: c23ad26b4da64272af81c4c8b4f37a8e
CSeq: 36417 REGISTER
User-Agent: PJSUA v2.10-dev win32-6.2/i386/msvc-19.2.3
Supported: outbound, path
Contact: <sip: xxxxxxxx @;transport=TCP;ob>;reg-id=1;+sip.instance="<urn:uuid:00000000-0000-0000-0000-00007a5cb7fa>"
Expires: 300
Content-Length:  0

From that moment, calls are no longer received and neither receive BYE from calls in course. Other pjsua clients receive a 408 Timeout when try to call me

Using re-register command in pjsua (rr) don't solve de problem and in the application I am creating with pjsua-api it is solved if I do a  pjsua_acc_del () and then a pjsua_acc_add () with the same account, 

Why is a new transport created if the previous one has not failed? Why don't create a new contact with new source port like when an IP change?

I have tried linphone-daemon on the same machine without any issue and any transport change for days.

Any help is welcome.

Visit our blog:

pjsip mailing list

[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