Hello, I am a new user of Asterisk server under Ubuntu.
I would like to setup the following system.
- 1 Hikvision Intercom acts as a SIP client
- 1 Asterisk server under Ubuntu (both Intercom and server are on the LAN)
- 1 ISP Modem-router with basic NAT feature
- 1 Android Smartphone (4G thus WAN) registering to the Asterisk server
Here is my sip.conf
[general]
context=default
udpbindaddr=0.0.0.0
tcpenable=no
tcpbindaddr=0.0.0.0
transport=udp
srvlookup=yes
nat=yes
externhost=mysip.synology.me
localnet=192.168.0.0/255.255.255.0
externrefresh=240
register => myuser:mypasswd@mysip.synology.me/1234
[mysipprovider-out]
type=peer
secret=mypasswd
username=myuser
host=mysip.synology.me
fromuser=myuser
canreinvite=no
insecure=invite,port
qualify=yes
nat=yes
context=from-mysipprovider
And my extensions.conf
[from-mysipprovider]
exten => 1234,1,Answer ; 1234 is the contact extension, default contact extension is “s”
exten => 1234,2,Dial(SIP/111,25,Ttr) ; incoming calls are redirected to SIP telephone with number 111
exten => 1234,3,Hangup
My first problem is to register the phone to the SIP server.
I install Mizudroid as SIP client
I enter the host mysip.synology.me, the user myuser, the password mypasswd
But the client is unable to register. I found the following error in the server log:
[Jul 17 22:12:41] DEBUG[20002]: res_pjsip_registrar.c:1248 check_expiration_thread: Woke up at 1563394361 Interval: 30
[Jul 17 22:12:41] DEBUG[20002]: res_pjsip_registrar.c:1255 check_expiration_thread: Expiring 0 contacts
[Jul 17 22:12:43] DEBUG[20006]: chan_sip.c:4409 __sip_autodestruct: Auto destroying SIP dialog '7244a17508a1ff7b69abe0362d76669d@109.89.199.248:5060'
[Jul 17 22:12:43] DEBUG[20006]: chan_sip.c:6643 sip_pvt_dtor: Destroying SIP dialog 7244a17508a1ff7b69abe0362d76669d@109.89.199.248:5060
[Jul 17 22:12:44] DEBUG[20006]: chan_sip.c:9467 __find_call: = Looking for Call ID: 18e425827043412160496k33467rmwp (Checking From) --From tag 20g2204369053623678984m --To-tag
[Jul 17 22:12:44] DEBUG[20006]: chan_sip.c:29071 handle_incoming: **** Received REGISTER (2) - Command in SIP REGISTER
[Jul 17 22:12:44] DEBUG[20006]: netsock2.c:170 ast_sockaddr_split_hostport: Splitting '85.94.240.76:6161' into...
[Jul 17 22:12:44] DEBUG[20006]: netsock2.c:224 ast_sockaddr_split_hostport: ...host '85.94.240.76' and port '6161'.
[Jul 17 22:12:44] DEBUG[20006]: netsock2.c:170 ast_sockaddr_split_hostport: Splitting 'mysip.synology.me' into...
[Jul 17 22:12:44] DEBUG[20006]: netsock2.c:224 ast_sockaddr_split_hostport: ...host 'mysip.synology.me' and port ''.
[Jul 17 22:12:44] DEBUG[20006]: chan_sip.c:3801 __sip_xmit: Trying to put 'SIP/2.0 401' onto UDP socket destined for 85.94.240.76:6161
[Jul 17 22:12:45] DEBUG[20006]: chan_sip.c:9467 __find_call: = Looking for Call ID: 22e5778105715078728106k33468rmwp (Checking From) --From tag 24g5895404795558813274m --To-tag
[Jul 17 22:12:45] DEBUG[20006]: acl.c:990 ast_ouraddrfor: For destination '85.94.240.76', our source address is '192.168.0.16'.
[Jul 17 22:12:45] DEBUG[20006]: chan_sip.c:3925 ast_sip_ouraddrfor: Target address 85.94.240.76:6161 is not local, substituting externaddr
[Jul 17 22:12:45] DEBUG[20006]: chan_sip.c:3958 ast_sip_ouraddrfor: Setting AST_TRANSPORT_UDP with address 109.89.199.248:5060
[Jul 17 22:12:45] DEBUG[20006]: netsock2.c:170 ast_sockaddr_split_hostport: Splitting '85.94.240.76:6161' into...
[Jul 17 22:12:45] DEBUG[20006]: netsock2.c:224 ast_sockaddr_split_hostport: ...host '85.94.240.76' and port '6161'.
[Jul 17 22:12:45] DEBUG[20006]: chan_sip.c:9060 __sip_alloc: Allocating new SIP dialog for 22e5778105715078728106k33468rmwp - REGISTER (No RTP)
[Jul 17 22:12:45] DEBUG[20006]: chan_sip.c:29071 handle_incoming: **** Received REGISTER (2) - Command in SIP REGISTER
[Jul 17 22:12:45] DEBUG[20006]: netsock2.c:170 ast_sockaddr_split_hostport: Splitting '85.94.240.76:6161' into...
[Jul 17 22:12:45] DEBUG[20006]: netsock2.c:224 ast_sockaddr_split_hostport: ...host '85.94.240.76' and port '6161'.
[Jul 17 22:12:45] DEBUG[20006]: netsock2.c:170 ast_sockaddr_split_hostport: Splitting 'mysip.synology.me' into...
[Jul 17 22:12:45] DEBUG[20006]: netsock2.c:224 ast_sockaddr_split_hostport: ...host 'mysip.synology.me' and port ''.
[Jul 17 22:12:45] DEBUG[20006]: chan_sip.c:3801 __sip_xmit: Trying to put 'SIP/2.0 401' onto UDP socket destined for 85.94.240.76:6161
[Jul 17 22:12:45] DEBUG[20006]: chan_sip.c:9467 __find_call: = Looking for Call ID: 22e5778105715078728106k33468rmwp (Checking From) --From tag 24g5895404795558813274m --To-tag
[Jul 17 22:12:45] DEBUG[20006]: chan_sip.c:29071 handle_incoming: **** Received REGISTER (2) - Command in SIP REGISTER
[Jul 17 22:12:45] DEBUG[20006]: netsock2.c:170 ast_sockaddr_split_hostport: Splitting '85.94.240.76:6161' into...
[Jul 17 22:12:45] DEBUG[20006]: netsock2.c:224 ast_sockaddr_split_hostport: ...host '85.94.240.76' and port '6161'.
[Jul 17 22:12:45] DEBUG[20006]: netsock2.c:170 ast_sockaddr_split_hostport: Splitting 'mysip.synology.me' into...
[Jul 17 22:12:45] DEBUG[20006]: netsock2.c:224 ast_sockaddr_split_hostport: ...host 'mysip.synology.me' and port ''.
[Jul 17 22:12:45] DEBUG[20006]: chan_sip.c:3801 __sip_xmit: Trying to put 'SIP/2.0 403' onto UDP socket destined for 85.94.240.76:6161
[Jul 17 22:12:45] NOTICE[20006]: chan_sip.c:28928 handle_request_register: Registration from '<sip:gsm@mysip.synology.me>' failed for '85.94.240.76:6161' - Wrong password
[Jul 17 22:12:45] DEBUG[20006]: chan_sip.c:29374 handle_request_do: SIP message could not be handled, bad request: 22e5778105715078728106k33468rmwp
[Jul 17 22:12:45] DEBUG[20006]: chan_sip.c:9467 __find_call: = Looking for Call ID: 22e5778105715078728106k33468rmwp (Checking From) --From tag 24g5895404795558813274m --To-tag
[Jul 17 22:12:45] DEBUG[20006]: chan_sip.c:29071 handle_incoming: **** Received REGISTER (2) - Command in SIP REGISTER
[Jul 17 22:12:45] DEBUG[20006]: netsock2.c:170 ast_sockaddr_split_hostport: Splitting '85.94.240.76:6161' into...
[Jul 17 22:12:45] DEBUG[20006]: netsock2.c:224 ast_sockaddr_split_hostport: ...host '85.94.240.76' and port '6161'.
[Jul 17 22:12:45] DEBUG[20006]: netsock2.c:170 ast_sockaddr_split_hostport: Splitting 'mysip.synology.me' into...
[Jul 17 22:12:45] DEBUG[20006]: netsock2.c:224 ast_sockaddr_split_hostport: ...host 'mysip.synology.me' and port ''.
[Jul 17 22:12:45] DEBUG[20006]: chan_sip.c:3801 __sip_xmit: Trying to put 'SIP/2.0 401' onto UDP socket destined for 85.94.240.76:6161
[Jul 17 22:12:45] DEBUG[20006]: chan_sip.c:9467 __find_call: = Looking for Call ID: 22e5778105715078728106k33468rmwp (Checking From) --From tag 24g5895404795558813274m --To-tag
[Jul 17 22:12:45] DEBUG[20006]: chan_sip.c:29071 handle_incoming: **** Received REGISTER (2) - Command in SIP REGISTER
[Jul 17 22:12:45] DEBUG[20006]: netsock2.c:170 ast_sockaddr_split_hostport: Splitting '85.94.240.76:6161' into...
[Jul 17 22:12:45] DEBUG[20006]: netsock2.c:224 ast_sockaddr_split_hostport: ...host '85.94.240.76' and port '6161'.
[Jul 17 22:12:45] DEBUG[20006]: netsock2.c:170 ast_sockaddr_split_hostport: Splitting 'mysip.synology.me' into...
[Jul 17 22:12:45] DEBUG[20006]: netsock2.c:224 ast_sockaddr_split_hostport: ...host 'mysip.synology.me' and port ''.
[Jul 17 22:12:45] DEBUG[20006]: chan_sip.c:3801 __sip_xmit: Trying to put 'SIP/2.0 403' onto UDP socket destined for 85.94.240.76:6161
[Jul 17 22:12:45] NOTICE[20006]: chan_sip.c:28928 handle_request_register: Registration from '<sip:gsm@mysip.synology.me>' failed for '85.94.240.76:6161' - Wrong password
[Jul 17 22:12:45] DEBUG[20006]: chan_sip.c:29374 handle_request_do: SIP message could not be handled, bad request: 22e5778105715078728106k33468rmwp
[Jul 17 22:12:45] DEBUG[20006]: chan_sip.c:9467 __find_call: = Looking for Call ID: 22e5778105715078728106k33468rmwp (Checking From) --From tag 24g5895404795558813274m --To-tag
[Jul 17 22:12:45] DEBUG[20006]: chan_sip.c:29071 handle_incoming: **** Received REGISTER (2) - Command in SIP REGISTER
[Jul 17 22:12:45] DEBUG[20006]: netsock2.c:170 ast_sockaddr_split_hostport: Splitting '85.94.240.76:6161' into...
[Jul 17 22:12:45] DEBUG[20006]: netsock2.c:224 ast_sockaddr_split_hostport: ...host '85.94.240.76' and port '6161'.
[Jul 17 22:12:45] DEBUG[20006]: netsock2.c:170 ast_sockaddr_split_hostport: Splitting 'mysip.synology.me' into...
[Jul 17 22:12:45] DEBUG[20006]: netsock2.c:224 ast_sockaddr_split_hostport: ...host 'mysip.synology.me' and port ''.
[Jul 17 22:12:45] DEBUG[20006]: chan_sip.c:3801 __sip_xmit: Trying to put 'SIP/2.0 401' onto UDP socket destined for 85.94.240.76:6161
[Jul 17 22:12:45] DEBUG[20006]: chan_sip.c:9467 __find_call: = Looking for Call ID: 22e5778105715078728106k33468rmwp (Checking From) --From tag 24g5895404795558813274m --To-tag
[Jul 17 22:12:45] DEBUG[20006]: chan_sip.c:29071 handle_incoming: **** Received REGISTER (2) - Command in SIP REGISTER
[Jul 17 22:12:45] DEBUG[20006]: netsock2.c:170 ast_sockaddr_split_hostport: Splitting '85.94.240.76:6161' into...
[Jul 17 22:12:45] DEBUG[20006]: netsock2.c:224 ast_sockaddr_split_hostport: ...host '85.94.240.76' and port '6161'.
[Jul 17 22:12:45] DEBUG[20006]: netsock2.c:170 ast_sockaddr_split_hostport: Splitting 'mysip.synology.me' into...
[Jul 17 22:12:45] DEBUG[20006]: netsock2.c:224 ast_sockaddr_split_hostport: ...host 'mysip.synology.me' and port ''.
[Jul 17 22:12:45] DEBUG[20006]: chan_sip.c:3801 __sip_xmit: Trying to put 'SIP/2.0 401' onto UDP socket destined for 85.94.240.76:6161
[Jul 17 22:12:45] DEBUG[20006]: chan_sip.c:9467 __find_call: = Looking for Call ID: 22e5778105715078728106k33468rmwp (Checking From) --From tag 24g5895404795558813274m --To-tag
[Jul 17 22:12:45] DEBUG[20006]: chan_sip.c:29071 handle_incoming: **** Received REGISTER (2) - Command in SIP REGISTER
[Jul 17 22:12:45] DEBUG[20006]: netsock2.c:170 ast_sockaddr_split_hostport: Splitting '85.94.240.76:6161' into...
[Jul 17 22:12:45] DEBUG[20006]: netsock2.c:224 ast_sockaddr_split_hostport: ...host '85.94.240.76' and port '6161'.
[Jul 17 22:12:45] DEBUG[20006]: netsock2.c:170 ast_sockaddr_split_hostport: Splitting 'mysip.synology.me' into...
[Jul 17 22:12:45] DEBUG[20006]: netsock2.c:224 ast_sockaddr_split_hostport: ...host 'mysip.synology.me' and port ''.
[Jul 17 22:12:45] DEBUG[20006]: chan_sip.c:3801 __sip_xmit: Trying to put 'SIP/2.0 403' onto UDP socket destined for 85.94.240.76:6161
[Jul 17 22:12:45] NOTICE[20006]: chan_sip.c:28928 handle_request_register: Registration from '<sip:gsm@mysip.synology.me>' failed for '85.94.240.76:6161' - Wrong password
[Jul 17 22:12:45] DEBUG[20006]: chan_sip.c:29374 handle_request_do: SIP message could not be handled, bad request: 22e5778105715078728106k33468rmwp
xavan-nas*CLI>
I don’t know where to start to resolve the registration problem
Thank you