Port out of range when send a invite using network with NAT

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

 



I using pjsua2 to make a softphone in C++, but when the lib try send a invite the request is make with a port out of range. The last two char is repeated and the app never register. This not ocorr in all enviroment, has network with NAT the same app is ok. 

In this post: https://stackoverflow.com/questions/52084066/failure-when-try-register-pjsua2-over-nat has a code with a implementation of pjsua2 if necessary. 


18:01:00.201 os_core_win32. !pjlib 2.8 for win32 initialized

18:01:23.450 sip_endpoint.c  .Creating endpoint instance...

18:01:23.450          pjlib  .select() I/O Queue created (273448B0)

18:01:23.450 sip_endpoint.c  .Module "mod-msg-print" registered

18:01:23.450 sip_transport.  .Transport manager created.

18:01:23.450   pjsua_core.c  .PJSUA state changed: NULL --> CREATED

18:01:23.450 sip_endpoint.c  .Module "mod-pjsua-log" registered

18:01:23.450 sip_endpoint.c  .Module "mod-tsx-layer" registered

18:01:23.450 sip_endpoint.c  .Module "mod-stateful-util" registered

18:01:23.450 sip_endpoint.c  .Module "mod-ua" registered

18:01:23.450 sip_endpoint.c  .Module "mod-100rel" registered

18:01:23.450 sip_endpoint.c  .Module "mod-pjsua" registered

18:01:23.450 sip_endpoint.c  .Module "mod-invite" registered

18:01:50.261     wmme_dev.c  ..WMME found 3 devices:

18:01:50.261     wmme_dev.c  .. dev_id 0: Wave mapper  (in=2, out=2)

18:01:50.261     wmme_dev.c  .. dev_id 1: Microfone (Dispositivo de High   (in=2, out=0)

18:01:50.261     wmme_dev.c  .. dev_id 2: Alto-falantes (Dispositivo de H  (in=0, out=2)

18:01:50.261     wmme_dev.c  ..WMME initialized

18:01:50.261          pjlib  ..select() I/O Queue created (2734FAC4)

18:01:50.267 sip_endpoint.c  .Module "mod-evsub" registered

18:01:50.267 sip_endpoint.c  .Module "mod-presence" registered

18:01:50.267 sip_endpoint.c  .Module "mod-mwi" registered

18:01:50.267 sip_endpoint.c  .Module "mod-refer" registered

18:01:50.267 sip_endpoint.c  .Module "mod-pjsua-pres" registered

18:01:50.267 sip_endpoint.c  .Module "mod-pjsua-im" registered

18:01:50.267 sip_endpoint.c  .Module "mod-pjsua-options" registered

18:01:50.267   pjsua_core.c  .1 SIP worker threads created

18:01:50.267   pjsua_core.c  .pjsua version 2.8 for  initialized

18:01:50.267   pjsua_core.c  .PJSUA state changed: CREATED --> INIT

18:01:50.280     wmme_dev.c  WMME found 3 devices:

18:01:50.280     wmme_dev.c   dev_id 0: Wave mapper  (in=2, out=2)

18:01:50.280     wmme_dev.c   dev_id 1: Microfone (Dispositivo de High   (in=2, out=0)

18:01:50.280     wmme_dev.c   dev_id 2: Alto-falantes (Dispositivo de H  (in=0, out=2)

18:01:50.280   pjsua_core.c  Shutting down, flags=0...

18:01:50.280   pjsua_core.c  PJSUA state changed: INIT --> CLOSING

18:01:50.281   pjsua_call.c  .Hangup all calls..

18:01:50.281  pjsua_media.c  .Call 0: deinitializing media..

18:01:50.281  pjsua_media.c  .Call 1: deinitializing media..

18:01:50.281  pjsua_media.c  .Call 2: deinitializing media..

18:01:50.281  pjsua_media.c  .Call 3: deinitializing media..

18:01:50.281   pjsua_pres.c  .Shutting down presence..

18:01:51.282   pjsua_core.c  .Destroying...

18:01:51.282  pjsua_media.c  .Shutting down media..

18:01:51.769 sip_transactio  .Stopping transaction layer module

18:01:51.769 sip_transactio  .Stopped transaction layer module

18:01:51.769 sip_endpoint.c  .Module "mod-pjsua-options" unregistered

18:01:51.769 sip_endpoint.c  .Module "mod-pjsua-im" unregistered

18:01:51.769 sip_endpoint.c  .Module "mod-pjsua-pres" unregistered

18:01:51.769 sip_endpoint.c  .Module "mod-pjsua" unregistered

18:01:51.769 sip_endpoint.c  .Module "mod-stateful-util" unregistered

18:01:51.769 sip_endpoint.c  .Module "mod-refer" unregistered

18:01:51.769 sip_endpoint.c  .Module "mod-mwi" unregistered

18:01:51.769 sip_endpoint.c  .Module "mod-presence" unregistered

18:01:51.769 sip_endpoint.c  .Module "mod-evsub" unregistered

18:01:51.769 sip_endpoint.c  .Module "mod-invite" unregistered

18:01:51.769 sip_endpoint.c  .Module "mod-100rel" unregistered

18:01:51.769 sip_endpoint.c  .Module "mod-ua" unregistered

18:01:51.769 sip_transactio  .Transaction layer module destroyed

18:01:51.769 sip_endpoint.c  .Module "mod-tsx-layer" unregistered

18:01:51.769 sip_endpoint.c  .Module "mod-msg-print" unregistered

18:01:51.769 sip_endpoint.c  .Module "mod-pjsua-log" unregistered

18:01:51.769 sip_endpoint.c  .Endpoint 2733CA04 destroyed

18:01:51.769   pjsua_core.c  .PJSUA state changed: CLOSING --> NULL

18:01:51.769   pjsua_core.c  .PJSUA destroyed...

18:19:38.250 os_core_win32. !pjlib 2.8 for win

32 initialized

18:19:41.789          pjlib  .select() I/O Queue created (27469F70)

18:19:41.789 sip_endpoint.c  .Module "mod-msg-print" registered

18:19:41.789   pjsua_core.c  .PJSUA state changed: NULL --> CREATED

18:19:41.790 sip_endpoint.c  .Module "mod-pjsua-log" registered

18:19:41.790 sip_endpoint.c  .Module "mod-tsx-layer" registered

18:19:41.790 sip_endpoint.c  .Module "mod-stateful-util" registered

18:19:41.790 sip_endpoint.c  .Module "mod-ua" registered

18:19:41.790 sip_endpoint.c  .Module "mod-100rel" registered

18:19:41.790 sip_endpoint.c  .Module "mod-pjsua" registered

18:19:41.790 sip_endpoint.c  .Module "mod-invite" registered

18:19:41.798     wmme_dev.c  ..WMME found 3 devices:

18:19:41.798     wmme_dev.c  .. dev_id 0: Wave mapper  (in=2, out=2)

18:19:41.798     wmme_dev.c  .. dev_id 1: Microfone (Dispositivo de High   (in=2, out=0)

18:19:41.798     wmme_dev.c  .. dev_id 2: Alto-falantes (Dispositivo de H  (in=0, out=2)

18:19:41.798     wmme_dev.c  ..WMME initialized

18:19:41.799          pjlib  ..select() I/O Queue created (2746191C)

18:19:41.801 sip_endpoint.c  .Module "mod-evsub" registered

18:19:41.801 sip_endpoint.c  .Module "mod-presence" registered

18:19:41.801 sip_endpoint.c  .Module "mod-mwi" registered

18:19:41.801 sip_endpoint.c  .Module "mod-refer" registered

18:19:41.801 sip_endpoint.c  .Module "mod-pjsua-pres" registered

18:19:41.801 sip_endpoint.c  .Module "mod-pjsua-im" registered

18:19:41.801 sip_endpoint.c  .Module "mod-pjsua-options" registered

18:19:41.802   pjsua_core.c  .1 SIP worker threads created

18:19:41.802   pjsua_core.c  .pjsua version 2.8 for  initialized

18:19:41.802   pjsua_core.c  .PJSUA state changed: CREATED --> INIT

18:19:41.803   pjsua_core.c  SIP UDP socket reachable at 10.224.100.252:59013

18:19:41.804    udp2747B1E8  SIP UDP transport started, published address is 10.224.100.252:59013

18:19:41.806    tcptp:62884  SIP TCP listener ready for incoming connections at 10.224.100.252:62884

18:19:41.806   pjsua_core.c  PJSUA state changed: INIT --> STARTING

18:19:41.806 sip_endpoint.c  .Module "mod-unsolicited-mwi" registered

18:19:41.806   pjsua_core.c  .PJSUA state changed: STARTING --> RUNNING

*** PJSUA2 STARTED ***

18:19:41.806    pjsua_acc.c  Adding account: id=sip:9001@177.10.116.7

18:19:41.806    pjsua_acc.c  .Account sip:9001@177.10.116.7 added with id 0

18:19:41.806    pjsua_acc.c  .Acc 0: setting registration..

18:19:41.808   pjsua_core.c  ...TX 488 bytes Request msg REGISTER/cseq=26087 (tdta2747FCC4) to UDP 177.10.116.7:5060:

REGISTER sip:177.10.116.7 SIP/2.0

Via: SIP/2.0/UDP 10.224.100.252:59013;rport;branch=z9hG4bKPj140e7d145e2a426da3a56aa89a9a4582

Max-Forwards: 70

From: <sip:9001@177.10.116.7>;tag=1eabb78e743a41a990a03961a9e0eb2a

To: <sip:9001@177.10.116.7>

Call-ID: 6ebf49517aa54692b19de5a5b0d0ca58

CSeq: 26087 REGISTER

Contact: <sip:9001@10.224.100.252:59013;ob>

Expires: 300

Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS

Content-Length:  0





--end msg--

18:19:41.808    pjsua_acc.c  ..Acc 0: Registration sent

18:19:41.846   sip_parser.c !Error parsing '5901313': String value was greater than the maximum allowed value.

18:19:41.846 sip_transport.  Error processing 455 bytes packet from UDP 177.10.116.7:5060 : PJSIP invalid value error exception when parsing 'Via' header on line 2 col 40:

SIP/2.0 100 Trying

Via: SIP/2.0/UDP 177.35.230.249:5901313;branch=z9hG4bKPj140e7d145e2a426da3a56aa89a9a4582;received=177.35.230.249;rport=59013

From: <sip:9001@177.10.116.7:5060>;tag=1eabb78e743a41a990a03961a9e0eb2a

To: <sip:9001@177.10.116.7:5060>

Call-ID: 6ebf49517aa54692b19de5a5b0d0ca58

CSeq: 26087 REGISTER

User-Agent: snep

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO

Supported: replaces

Content-Length: 0





-- end of packet.

18:19:41.847   sip_parser.c  Error parsing '5901313': String value was greater than the maximum allowed value.

18:19:41.847 sip_transport.  Error processing 552 bytes packet from UDP 177.10.116.7:5060 : PJSIP invalid value error exception when parsing 'Via' header on line 2 col 40:

SIP/2.0 401 Unauthorized

Via: SIP/2.0/UDP 177.35.230.249:5901313;branch=z9hG4bKPj140e7d145e2a426da3a56aa89a9a4582;received=177.35.230.249;rport=59013

From: <sip:9001@177.10.116.7:5060>;tag=1eabb78e743a41a990a03961a9e0eb2a

To: <sip:9001@177.10.116.7:5060>;tag=as16f8acfc

Call-ID: 6ebf49517aa54692b19de5a5b0d0ca58

CSeq: 26087 REGISTER

User-Agent: snep

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO

Supported: replaces

WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="192714f2"

Content-Length: 0





-- end of packet.

18:19:42.308   pjsua_core.c  .TX 488 bytes Request msg REGISTER/cseq=26087 (tdta2747FCC4) to UDP 177.10.116.7:5060:

REGISTER sip:177.10.116.7 SIP/2.0

Via: SIP/2.0/UDP 10.224.100.252:59013;rport;branch=z9hG4bKPj140e7d145e2a426da3a56aa89a9a4582

Max-Forwards: 70

From: <sip:9001@177.10.116.7>;tag=1eabb78e743a41a990a03961a9e0eb2a

To: <sip:9001@177.10.116.7>

Call-ID: 6ebf49517aa54692b19de5a5b0d0ca58

CSeq: 26087 REGISTER

Contact: <sip:9001@10.224.100.252:59013;ob>

Expires: 300

Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS

Content-Length:  0





--end msg--

SIP/2.0 401 Unauthorized

Via: SIP/2.0/UDP 177.35.230.249:5901313;branch=z9hG4bKPj140e7d145e2a426da3a56aa89a9a4582;received=177.35.230.249;rport=59013

From: <sip:9001@177.10.116.7:5060>;tag=1eabb78e743a41a990a03961a9e0eb2a

To: <sip:9001@177.10.116.7:5060>;tag=as16f8acfc

Call-ID: 6ebf49517aa54692b19de5a5b0d0ca58

CSeq: 26087 REGISTER

User-Agent: snep

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO

Supported: replaces

WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="192714f2"

Content-Length: 0





-- end of packet.

18:19:43.308   pjsua_core.c  .TX 488 bytes Request msg REGISTER/cseq=26087 (tdta2747FCC4) to UDP 177.10.116.7:5060:

REGISTER sip:177.10.116.7 SIP/2.0

Via: SIP/2.0/UDP 10.224.100.252:59013;rport;branch=z9hG4bKPj140e7d145e2a426da3a56aa89a9a4582

Max-Forwards: 70

From: <sip:9001@177.10.116.7>;tag=1eabb78e743a41a990a03961a9e0eb2a

To: <sip:9001@177.10.116.7>

Call-ID: 6ebf49517aa54692b19de5a5b0d0ca58

CSeq: 26087 REGISTER

Contact: <sip:9001@10.224.100.252:59013;ob>

Expires: 300

Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS

Content-Length:  0





--end msg--

18:19:43.347   sip_parser.c  Error parsing '5901313': String value was greater than the maximum allowed value.

18:19:43.347 sip_transport.  Error processing 455 bytes packet from UDP 177.10.116.7:5060 : PJSIP invalid value error exception when parsing 'Via' header on line 2 col 40:

SIP/2.0 100 Trying

Via: SIP/2.0/UDP 177.35.230.249:5901313;branch=z9hG4bKPj140e7d145e2a426da3a56aa89a9a4582;received=177.35.230.249;rport=59013

From: <sip:9001@177.10.116.7:5060>;tag=1eabb78e743a41a990a03961a9e0eb2a

To: <sip:9001@177.10.116.7:5060>

Call-ID: 6ebf49517aa54692b19de5a5b0d0ca58

CSeq: 26087 REGISTER

User-Agent: snep

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO

Supported: replaces

Content-Length: 0





-- end of packet.

18:19:43.347   sip_parser.c  Error parsing '5901313': String value was greater than the maximum allowed value.

18:19:43.347 sip_transport.  Error processing 552 bytes packet from UDP 177.10.116.7:5060 : PJSIP invalid value error exception when parsing 'Via' header on line 2 col 40:

SIP/2.0 401 Unauthorized

Via: SIP/2.0/UDP 177.35.230.249:5901313;branch=z9hG4bKPj140e7d145e2a426da3a56aa89a9a4582;received=177.35.230.249;rport=59013

From: <sip:9001@177.10.116.7:5060>;tag=1eabb78e743a41a990a03961a9e0eb2a

To: <sip:9001@177.10.116.7:5060>;tag=as16f8acfc

Call-ID: 6ebf49517aa54692b19de5a5b0d0ca58

CSeq: 26087 REGISTER

User-Agent: snep

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO

Supported: replaces

WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="192714f2"

Content-Length: 0





-- end of packet.

18:19:45.309   pjsua_core.c  .TX 488 bytes Request msg REGISTER/cseq=26087 (tdta2747FCC4) to UDP 177.10.116.7:5060:

REGISTER sip:177.10.116.7 SIP/2.0

Via: SIP/2.0/UDP 10.224.100.252:59013;rport;branch=z9hG4bKPj140e7d145e2a426da3a56aa89a9a4582

Max-Forwards: 70

From: <sip:9001@177.10.116.7>;tag=1eabb78e743a41a990a03961a9e0eb2a

To: <sip:9001@177.10.116.7>

Call-ID: 6ebf49517aa54692b19de5a5b0d0ca58

CSeq: 26087 REGISTER

Contact: <sip:9001@10.224.100.252:59013;ob>

Expires: 300

Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS

Content-Length:  0





--end msg--

18:19:45.345   sip_parser.c  Error parsing '5901313': String value was greater than the maximum allowed value.

18:19:45.345 sip_transport.  Error processing 455 bytes packet from UDP 177.10.116.7:5060 : PJSIP invalid value error exception when parsing 'Via' header on line 2 col 40:

SIP/2.0 100 Trying

Via: SIP/2.0/UDP 177.35.230.249:5901313;branch=z9hG4bKPj140e7d145e2a426da3a56aa89a9a4582;received=177.35.230.249;rport=59013

From: <sip:9001@177.10.116.7:5060>;tag=1eabb78e743a41a990a03961a9e0eb2a

To: <sip:9001@177.10.116.7:5060>

Call-ID: 6ebf49517aa54692b19de5a5b0d0ca58

CSeq: 26087 REGISTER

User-Agent: snep

Allow

: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO

Supported: replaces

Content-Length: 0





-- end of packet.

18:19:45.347   sip_parser.c  Error parsing '5901313': String value was greater than the maximum allowed value.

18:19:45.347 sip_transport.  Error processing 552 bytes packet from UDP 177.10.116.7:5060 : PJSIP invalid value error exception when parsing 'Via' header on line 2 col 40:

SIP/2.0 401 Unauthorized

Via: SIP/2.0/UDP 177.35.230.249:5901313;branch=z9hG4bKPj140e7d145e2a426da3a56aa89a9a4582;received=177.35.230.249;rport=59013

From: <sip:9001@177.10.116.7:5060>;tag=1eabb78e743a41a990a03961a9e0eb2a

To: <sip:9001@177.10.116.7:5060>;tag=as16f8acfc

Call-ID: 6ebf49517aa54692b19de5a5b0d0ca58

CSeq: 26087 REGISTER

User-Agent: snep

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO

Supported: replaces

WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="192714f2"

Content-Length: 0





-- end of packet.

18:19:49.310   pjsua_core.c  .TX 488 bytes Request msg REGISTER/cseq=26087 (tdta2747FCC4) to UDP 177.10.116.7:5060:

REGISTER sip:177.10.116.7 SIP/2.0

Via: SIP/2.0/UDP 10.224.100.252:59013;rport;branch=z9hG4bKPj140e7d145e2a426da3a56aa89a9a4582

Max-Forwards: 70

From: <sip:9001@177.10.116.7>;tag=1eabb78e743a41a990a03961a9e0eb2a

To: <sip:9001@177.10.116.7>

Call-ID: 6ebf49517aa54692b19de5a5b0d0ca58

CSeq: 26087 REGISTER

Contact: <sip:9001@10.224.100.252:59013;ob>

Expires: 300

Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS

Content-Length:  0





--end msg--

18:19:49.347   sip_parser.c  Error parsing '5901313': String value was greater than the maximum allowed value.

18:19:49.347 sip_transport.  Error processing 455 bytes packet from UDP 177.10.116.7:5060 : PJSIP invalid value error exception when parsing 'Via' header on line 2 col 40:

SIP/2.0 100 Trying

Via: SIP/2.0/UDP 177.35.230.249:5901313;branch=z9hG4bKPj140e7d145e2a426da3a56aa89a9a4582;received=177.35.230.249;rport=59013

From: <sip:9001@177.10.116.7:5060>;tag=1eabb78e743a41a990a03961a9e0eb2a

To: <sip:9001@177.10.116.7:5060>

Call-ID: 6ebf49517aa54692b19de5a5b0d0ca58

CSeq: 26087 REGISTER

User-Agent: snep

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO

Supported: replaces

Content-Length: 0





-- end of packet.

18:19:49.348   sip_parser.c  Error parsing '5901313': String value was greater than the maximum allowed value.

18:19:49.348 sip_transport.  Error processing 552 bytes packet from UDP 177.10.116.7:5060 : PJSIP invalid value error exception when parsing 'Via' header on line 2 col 40:

SIP/2.0 401 Unauthorized

Via: SIP/2.0/UDP 177.35.230.249:5901313;branch=z9hG4bKPj140e7d145e2a426da3a56aa89a9a4582;received=177.35.230.249;rport=59013

From: <sip:9001@177.10.116.7:5060>;tag=1eabb78e743a41a990a03961a9e0eb2a

To: <sip:9001@177.10.116.7:5060>;tag=as16f8acfc

Call-ID: 6ebf49517aa54692b19de5a5b0d0ca58

CSeq: 26087 REGISTER

User-Agent: snep

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO

Supported: replaces

WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="192714f2"

Content-Length: 0





-- end of packet.

18:19:53.310   pjsua_core.c  .TX 488 bytes Request msg REGISTER/cseq=26087 (tdta2747FCC4) to UDP 177.10.116.7:5060:

REGISTER sip:177.10.116.7 SIP/2.0

Via: SIP/2.0/UDP 10.224.100.252:59013;rport;branch=z9hG4bKPj140e7d145e2a426da3a56aa89a9a4582

Max-Forwards: 70

From: <sip:9001@177.10.116.7>;tag=1eabb78e743a41a990a03961a9e0eb2a

To: <sip:9001@177.10.116.7>

Call-ID: 6ebf49517aa54692b19de5a5b0d0ca58

CSeq: 26087 REGISTER

Contact: <sip:9001@10.224.100.252:59013;ob>

Expires: 300

Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS

Content-Length:  0
_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

[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