SIP registration failed - too many hops

HN
Hermann Norpois
Thu, Sep 22, 2016 10:59 PM

Hello,

I tried to login in my recently installed sipserver (synth.ddns.net) with
the test account "Johanna" using pjsua command line tool.

Actually the registration failed due to ...

SIP registration failed, status=483 (Too Many Hops)

I guess there is a double edged situation due to the 2 addresses, the local
IP and the external IP. I thought this became an issue in terms of NAT
traversal but it should not be an issue for normal registration testing.
Could anybody give me some hints about the problem I am facing?

Thanks
Hermann

./pjsua --id sip:Johanna@synth.ddns.net --registrar sip:synth.ddns.net
--username "Johanna" --password "12345"
00:43:14.248 os_core_unix.c !pjlib 2.5.5 for POSIX initialized
00:43:14.249 sip_endpoint.c  .Creating endpoint instance...
00:43:14.250          pjlib  .select() I/O Queue created (0x1601780)
00:43:14.250 sip_endpoint.c  .Module "mod-msg-print" registered
00:43:14.250 sip_transport.  .Transport manager created.
00:43:14.250  pjsua_core.c  .PJSUA state changed: NULL --> CREATED
00:43:14.250 sip_endpoint.c  .Module "mod-pjsua-log" registered
00:43:14.250 sip_endpoint.c  .Module "mod-tsx-layer" registered
00:43:14.250 sip_endpoint.c  .Module "mod-stateful-util" registered
00:43:14.250 sip_endpoint.c  .Module "mod-ua" registered
00:43:14.250 sip_endpoint.c  .Module "mod-100rel" registered
00:43:14.250 sip_endpoint.c  .Module "mod-pjsua" registered
00:43:14.250 sip_endpoint.c  .Module "mod-invite" registered
00:43:14.340    alsa_dev.c  ..ALSA driver found 25 devices
00:43:14.340    alsa_dev.c  ..ALSA initialized
00:43:14.340          pjlib  ..select() I/O Queue created (0x162a068)
WARNING: no real random source present!
00:43:14.343 sip_endpoint.c  .Module "mod-evsub" registered
00:43:14.343 sip_endpoint.c  .Module "mod-presence" registered
00:43:14.343 sip_endpoint.c  .Module "mod-mwi" registered
00:43:14.343 sip_endpoint.c  .Module "mod-refer" registered
00:43:14.343 sip_endpoint.c  .Module "mod-pjsua-pres" registered
00:43:14.343 sip_endpoint.c  .Module "mod-pjsua-im" registered
00:43:14.343 sip_endpoint.c  .Module "mod-pjsua-options" registered
00:43:14.343  pjsua_core.c  .1 SIP worker threads created
00:43:14.343  pjsua_core.c  .pjsua version 2.5.5 for
Linux-4.2.0.42/x86_64/glibc-2.19 initialized
00:43:14.343  pjsua_core.c  .PJSUA state changed: CREATED --> INIT
00:43:14.343 sip_endpoint.c  Module "mod-default-handler" registered
00:43:14.343  pjsua_core.c  SIP UDP socket reachable at 192.168.178.26:5060
00:43:14.343  udp0x1669340  SIP UDP transport started, published address
is 192.168.178.26:5060
00:43:14.343    pjsua_acc.c  Adding account: id=sip:192.168.178.26:5060
00:43:14.343    pjsua_acc.c  .Account sip:192.168.178.26:5060 added with
id 0
00:43:14.343    pjsua_acc.c  Modifying account 0
00:43:14.343    pjsua_acc.c  Acc 0: setting online status to 1..
00:43:14.344    tcptp:5060  SIP TCP listener ready for incoming
connections at 192.168.178.26:5060
00:43:14.344    pjsua_acc.c  Adding account: id=<sip:192.168.178.26:5060
;transport=TCP>
00:43:14.344    pjsua_acc.c  .Account sip:192.168.178.26:5060;transport=TCP
added with id 1
00:43:14.344    pjsua_acc.c  Modifying account 1
00:43:14.344    pjsua_acc.c  Acc 1: setting online status to 1..
00:43:14.344    pjsua_acc.c  Adding account: id=sip:Johanna@synth.ddns.net
00:43:14.344    pjsua_acc.c  .Account sip:Johanna@synth.ddns.net added with
id 2
00:43:14.344    pjsua_acc.c  .Acc 2: setting registration..
00:43:14.377  pjsua_core.c  ...TX 560 bytes Request msg
REGISTER/cseq=22734 (tdta0x166fa10) to UDP 52.208.249.214:5060:
REGISTER sip:synth.ddns.net SIP/2.0
Via: SIP/2.0/UDP 192.168.178.26:5060
;rport;branch=z9hG4bKPj-fxB1DzLkc4apn.cD1JJamCs6rzhA6MU
Max-Forwards: 70
From: sip:Johanna@synth.ddns.net;tag=jpJ2nHPa-xrviwkFpm3kVsHxZpDNvCRU
To: sip:Johanna@synth.ddns.net
Call-ID: -FJrZDv9CZF2WgmV7aW-CIIeriW5XM-.
CSeq: 22734 REGISTER
User-Agent: PJSUA v2.5.5 Linux-4.2.0.42/x86_64/glibc-2.19
Contact: sip:Johanna@192.168.178.26:5060;ob
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY,
REFER, MESSAGE, OPTIONS
Content-Length:  0

--end msg--
00:43:14.377    pjsua_acc.c  ..Acc 2: Registration sent
00:43:14.377    pjsua_acc.c  Acc 2: setting online status to 1..
00:43:14.377  pjsua_core.c  PJSUA state changed: INIT --> STARTING
00:43:14.377 sip_endpoint.c  .Module "mod-unsolicited-mwi" registered
00:43:14.377  pjsua_core.c  .PJSUA state changed: STARTING --> RUNNING
00:43:14.377        main.c  Ready: Success

Account list:
[ 0] sip:192.168.178.26:5060: does not register
Online status: Online
[ 1] sip:192.168.178.26:5060;transport=TCP: does not register
Online status: Online
*[ 2] sip:Johanna@synth.ddns.net: 100/In Progress (expires=0)
Online status: Online
Buddy list:
-none-


---===========+
|      Call Commands:        |  Buddy, IM & Presence:  |
Account:      |
|                              |
|                  |
|  m  Make new call            | +b  Add new buddy      .| +a  Add new
accnt |
|  M  Make multiple calls      | -b  Delete buddy        | -a  Delete
accnt. |
|  a  Answer call              |  i  Send IM              | !a  Modify
accnt. |
|  h  Hangup call  (ha=all)    |  s  Subscribe presence  | rr
(Re-)register |
|  H  Hold call                |  u  Unsubscribe presence | ru
Unregister    |
|  v  re-inVite (release hold) |  t  ToGgle Online status |  >  Cycle next
ac.|
|  U  send UPDATE              |  T  Set online status    |  <  Cycle prev
ac.|
| ],[ Select next/prev call
+--------------------------+-------------------+
|  x  Xfer call                |      Media Commands:    |  Status &
Config: |
|  X  Xfer with Replaces      |
|                  |
|  #  Send RFC 2833 DTMF      | cl  List ports          |  d  Dump
status  |
|  *  Send DTMF with INFO      | cc  Connect port        | dd  Dump
detailed |
| dq  Dump curr. call quality  | cd  Disconnect port      | dc  Dump
config  |
|                              |  V  Adjust audio Volume  |  f  Save
config  |
|  S  Send arbitrary REQUEST  | Cp  Codec priorities
|                  |
+-----------------------------------------------------------------------------+
|  q  QUIT  L  ReLoad  sleep MS  echo [0|1|txt]    n: detect NAT
type    |
+

---===========+
You have 0 active call

00:43:14.877  pjsua_core.c  .TX 560 bytes Request msg

REGISTER/cseq=22734 (tdta0x166fa10) to UDP 52.208.249.214:5060:
REGISTER sip:synth.ddns.net SIP/2.0
Via: SIP/2.0/UDP 192.168.178.26:5060
;rport;branch=z9hG4bKPj-fxB1DzLkc4apn.cD1JJamCs6rzhA6MU
Max-Forwards: 70
From: sip:Johanna@synth.ddns.net;tag=jpJ2nHPa-xrviwkFpm3kVsHxZpDNvCRU
To: sip:Johanna@synth.ddns.net
Call-ID: -FJrZDv9CZF2WgmV7aW-CIIeriW5XM-.
CSeq: 22734 REGISTER
User-Agent: PJSUA v2.5.5 Linux-4.2.0.42/x86_64/glibc-2.19
Contact: sip:Johanna@192.168.178.26:5060;ob
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY,
REFER, MESSAGE, OPTIONS
Content-Length:  0

--end msg--
00:43:15.606  pjsua_core.c  .RX 425 bytes Response msg
483/REGISTER/cseq=22734 (rdata0x166adc8) from UDP 52.208.249.214:5060:
SIP/2.0 483 Too Many Hops
Via: SIP/2.0/UDP 192.168.178.26:5060
;received=188.174.175.27;rport=5060;branch=z9hG4bKPj-fxB1DzLkc4apn.cD1JJamCs6rzhA6MU
From: sip:Johanna@synth.ddns.net;tag=jpJ2nHPa-xrviwkFpm3kVsHxZpDNvCRU
To: sip:Johanna@synth.ddns.net;tag=b27e1a1d33761e85846fc98f5f3a7e58.96de
Call-ID: -FJrZDv9CZF2WgmV7aW-CIIeriW5XM-.
CSeq: 22734 REGISTER
Server: kamailio (4.3.6 (x86_64/linux))
Content-Length: 0

--end msg--
00:43:15.606    pjsua_acc.c  ....IP address change detected for account 2 (
192.168.178.26:5060 --> 188.174.175.27:5060). Updating registration (using
method 4)
00:43:15.606    pjsua_acc.c  ....SIP registration failed, status=483 (Too
Many Hops)

Hello, I tried to login in my recently installed sipserver (synth.ddns.net) with the test account "Johanna" using pjsua command line tool. Actually the registration failed due to ... SIP registration failed, status=483 (Too Many Hops) I guess there is a double edged situation due to the 2 addresses, the local IP and the external IP. I thought this became an issue in terms of NAT traversal but it should not be an issue for normal registration testing. Could anybody give me some hints about the problem I am facing? Thanks Hermann ./pjsua --id sip:Johanna@synth.ddns.net --registrar sip:synth.ddns.net --username "Johanna" --password "12345" 00:43:14.248 os_core_unix.c !pjlib 2.5.5 for POSIX initialized 00:43:14.249 sip_endpoint.c .Creating endpoint instance... 00:43:14.250 pjlib .select() I/O Queue created (0x1601780) 00:43:14.250 sip_endpoint.c .Module "mod-msg-print" registered 00:43:14.250 sip_transport. .Transport manager created. 00:43:14.250 pjsua_core.c .PJSUA state changed: NULL --> CREATED 00:43:14.250 sip_endpoint.c .Module "mod-pjsua-log" registered 00:43:14.250 sip_endpoint.c .Module "mod-tsx-layer" registered 00:43:14.250 sip_endpoint.c .Module "mod-stateful-util" registered 00:43:14.250 sip_endpoint.c .Module "mod-ua" registered 00:43:14.250 sip_endpoint.c .Module "mod-100rel" registered 00:43:14.250 sip_endpoint.c .Module "mod-pjsua" registered 00:43:14.250 sip_endpoint.c .Module "mod-invite" registered 00:43:14.340 alsa_dev.c ..ALSA driver found 25 devices 00:43:14.340 alsa_dev.c ..ALSA initialized 00:43:14.340 pjlib ..select() I/O Queue created (0x162a068) WARNING: no real random source present! 00:43:14.343 sip_endpoint.c .Module "mod-evsub" registered 00:43:14.343 sip_endpoint.c .Module "mod-presence" registered 00:43:14.343 sip_endpoint.c .Module "mod-mwi" registered 00:43:14.343 sip_endpoint.c .Module "mod-refer" registered 00:43:14.343 sip_endpoint.c .Module "mod-pjsua-pres" registered 00:43:14.343 sip_endpoint.c .Module "mod-pjsua-im" registered 00:43:14.343 sip_endpoint.c .Module "mod-pjsua-options" registered 00:43:14.343 pjsua_core.c .1 SIP worker threads created 00:43:14.343 pjsua_core.c .pjsua version 2.5.5 for Linux-4.2.0.42/x86_64/glibc-2.19 initialized 00:43:14.343 pjsua_core.c .PJSUA state changed: CREATED --> INIT 00:43:14.343 sip_endpoint.c Module "mod-default-handler" registered 00:43:14.343 pjsua_core.c SIP UDP socket reachable at 192.168.178.26:5060 00:43:14.343 udp0x1669340 SIP UDP transport started, published address is 192.168.178.26:5060 00:43:14.343 pjsua_acc.c Adding account: id=<sip:192.168.178.26:5060> 00:43:14.343 pjsua_acc.c .Account <sip:192.168.178.26:5060> added with id 0 00:43:14.343 pjsua_acc.c Modifying account 0 00:43:14.343 pjsua_acc.c Acc 0: setting online status to 1.. 00:43:14.344 tcptp:5060 SIP TCP listener ready for incoming connections at 192.168.178.26:5060 00:43:14.344 pjsua_acc.c Adding account: id=<sip:192.168.178.26:5060 ;transport=TCP> 00:43:14.344 pjsua_acc.c .Account <sip:192.168.178.26:5060;transport=TCP> added with id 1 00:43:14.344 pjsua_acc.c Modifying account 1 00:43:14.344 pjsua_acc.c Acc 1: setting online status to 1.. 00:43:14.344 pjsua_acc.c Adding account: id=sip:Johanna@synth.ddns.net 00:43:14.344 pjsua_acc.c .Account sip:Johanna@synth.ddns.net added with id 2 00:43:14.344 pjsua_acc.c .Acc 2: setting registration.. 00:43:14.377 pjsua_core.c ...TX 560 bytes Request msg REGISTER/cseq=22734 (tdta0x166fa10) to UDP 52.208.249.214:5060: REGISTER sip:synth.ddns.net SIP/2.0 Via: SIP/2.0/UDP 192.168.178.26:5060 ;rport;branch=z9hG4bKPj-fxB1DzLkc4apn.cD1JJamCs6rzhA6MU Max-Forwards: 70 From: <sip:Johanna@synth.ddns.net>;tag=jpJ2nHPa-xrviwkFpm3kVsHxZpDNvCRU To: <sip:Johanna@synth.ddns.net> Call-ID: -FJrZDv9CZF2WgmV7aW-CIIeriW5XM-. CSeq: 22734 REGISTER User-Agent: PJSUA v2.5.5 Linux-4.2.0.42/x86_64/glibc-2.19 Contact: <sip:Johanna@192.168.178.26:5060;ob> Expires: 300 Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Content-Length: 0 --end msg-- 00:43:14.377 pjsua_acc.c ..Acc 2: Registration sent 00:43:14.377 pjsua_acc.c Acc 2: setting online status to 1.. 00:43:14.377 pjsua_core.c PJSUA state changed: INIT --> STARTING 00:43:14.377 sip_endpoint.c .Module "mod-unsolicited-mwi" registered 00:43:14.377 pjsua_core.c .PJSUA state changed: STARTING --> RUNNING 00:43:14.377 main.c Ready: Success >>>> Account list: [ 0] <sip:192.168.178.26:5060>: does not register Online status: Online [ 1] <sip:192.168.178.26:5060;transport=TCP>: does not register Online status: Online *[ 2] sip:Johanna@synth.ddns.net: 100/In Progress (expires=0) Online status: Online Buddy list: -none- +=============================================================================+ | Call Commands: | Buddy, IM & Presence: | Account: | | | | | | m Make new call | +b Add new buddy .| +a Add new accnt | | M Make multiple calls | -b Delete buddy | -a Delete accnt. | | a Answer call | i Send IM | !a Modify accnt. | | h Hangup call (ha=all) | s Subscribe presence | rr (Re-)register | | H Hold call | u Unsubscribe presence | ru Unregister | | v re-inVite (release hold) | t ToGgle Online status | > Cycle next ac.| | U send UPDATE | T Set online status | < Cycle prev ac.| | ],[ Select next/prev call +--------------------------+-------------------+ | x Xfer call | Media Commands: | Status & Config: | | X Xfer with Replaces | | | | # Send RFC 2833 DTMF | cl List ports | d Dump status | | * Send DTMF with INFO | cc Connect port | dd Dump detailed | | dq Dump curr. call quality | cd Disconnect port | dc Dump config | | | V Adjust audio Volume | f Save config | | S Send arbitrary REQUEST | Cp Codec priorities | | +-----------------------------------------------------------------------------+ | q QUIT L ReLoad sleep MS echo [0|1|txt] n: detect NAT type | +=============================================================================+ You have 0 active call >>> 00:43:14.877 pjsua_core.c .TX 560 bytes Request msg REGISTER/cseq=22734 (tdta0x166fa10) to UDP 52.208.249.214:5060: REGISTER sip:synth.ddns.net SIP/2.0 Via: SIP/2.0/UDP 192.168.178.26:5060 ;rport;branch=z9hG4bKPj-fxB1DzLkc4apn.cD1JJamCs6rzhA6MU Max-Forwards: 70 From: <sip:Johanna@synth.ddns.net>;tag=jpJ2nHPa-xrviwkFpm3kVsHxZpDNvCRU To: <sip:Johanna@synth.ddns.net> Call-ID: -FJrZDv9CZF2WgmV7aW-CIIeriW5XM-. CSeq: 22734 REGISTER User-Agent: PJSUA v2.5.5 Linux-4.2.0.42/x86_64/glibc-2.19 Contact: <sip:Johanna@192.168.178.26:5060;ob> Expires: 300 Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Content-Length: 0 --end msg-- 00:43:15.606 pjsua_core.c .RX 425 bytes Response msg 483/REGISTER/cseq=22734 (rdata0x166adc8) from UDP 52.208.249.214:5060: SIP/2.0 483 Too Many Hops Via: SIP/2.0/UDP 192.168.178.26:5060 ;received=188.174.175.27;rport=5060;branch=z9hG4bKPj-fxB1DzLkc4apn.cD1JJamCs6rzhA6MU From: <sip:Johanna@synth.ddns.net>;tag=jpJ2nHPa-xrviwkFpm3kVsHxZpDNvCRU To: <sip:Johanna@synth.ddns.net>;tag=b27e1a1d33761e85846fc98f5f3a7e58.96de Call-ID: -FJrZDv9CZF2WgmV7aW-CIIeriW5XM-. CSeq: 22734 REGISTER Server: kamailio (4.3.6 (x86_64/linux)) Content-Length: 0 --end msg-- 00:43:15.606 pjsua_acc.c ....IP address change detected for account 2 ( 192.168.178.26:5060 --> 188.174.175.27:5060). Updating registration (using method 4) 00:43:15.606 pjsua_acc.c ....SIP registration failed, status=483 (Too Many Hops)