Phone won’t register with Asterisk server

asterisksipvoip

I'm trying to register a Grandstream phone on our asterisk server. We've done this tens of times, have documented how to do this, and recently it doesn't work anymore… I've tried with several phones – they all refuse. Installed phones work and reboot without a problem.

Asterisk is installed on an old server that needs to be migrated to a new one, updating Asterisk 1.4 at the same time. For now it's the old server.

For the Grandstream phone we use a script that generates a config file that is downloaded by the phone. The Apache logs show that this file is downloaded. The phone connects to the network, gets an IP address, downloads the config file, and shows the right phone number when picking up the hook.

In sip.conf the phone is configured, sip and the dialplan are reloaded.

The config file is downloaded from another server, a webserver. This server is updated, and should run the script that generates the config files. This doesn't work anymore on this server. On the old asterisk server, the script does run. When we execute it there, it generates the file. We copy that to the other server, where it it is downloaded and used by the phone, showing an updated configuration like a different phone number.

So it seems like this works, except, the phones won't register.

Any ideas what the problem might be?


Update

Below the output of asterisk -r after setting the verbose and debug level to 5. The phone here on my desk has ip address 192.168.1.35 in the display, yet I don't see that anywhere in the logs.

asterisk01*CLI> core set verbose 5
Verbosity was 3 and is now 5
asterisk01*CLI> core set debug 5
Core debug was 0 and is now 5
Really destroying SIP dialog '52b8582e7218fed92bdd58db35ac477e@100.1.2.3' Method: OPTIONS
Really destroying SIP dialog '0e7e9d1034abcebd6949e1cb459d87a3@100.1.2.3' Method: OPTIONS
Really destroying SIP dialog '76a6eb0a37efaec065d5a9d04a113bf7@100.1.2.3' Method: OPTIONS
Really destroying SIP dialog '47a09781040504e214255c8b4e180422@100.1.2.3' Method: OPTIONS
Really destroying SIP dialog '51dcc8d92495210716ae1fe0428b78bb@100.1.2.3' Method: OPTIONS
Really destroying SIP dialog '10d552824581213f2ecb030b74688aae@100.1.2.3' Method: OPTIONS
Really destroying SIP dialog '7b18bd6b203a44d351f702a725a8a7dc@100.1.2.3' Method: OPTIONS
Really destroying SIP dialog '23cb9717004156f26da28d9f5de60193@100.1.2.3' Method: OPTIONS
Really destroying SIP dialog '270f864b04225b3c73a1bac0558ffe70@100.1.2.3' Method: OPTIONS
Really destroying SIP dialog '211c62621704df0e4015002254b88116@100.1.2.3' Method: REGISTER
Really destroying SIP dialog '27d3e1c93e8201a9010d7a6579453a9f@100.1.2.3' Method: OPTIONS
asterisk01*CLI> module reload logger
  == Parsing '/etc/asterisk/logger.conf': Found
Asterisk Event Logger restarted
Asterisk Queue Logger restarted
Really destroying SIP dialog '935f319873f8b64c@192.168.1.26' Method: REGISTER
Really destroying SIP dialog '0867da6333ffd1f33fe0a03a33fe19cb@100.1.2.3' Method: OPTIONS
Really destroying SIP dialog '0afcaa63507dcba27f48cead73b1595c@100.1.2.3' Method: OPTIONS
Really destroying SIP dialog '2d695efc77d1123d280e6f4f225d0858@100.1.2.3' Method: OPTIONS
Really destroying SIP dialog '4fa21bed44ecff1c01d879cc42c8f95e@100.1.2.3' Method: OPTIONS
Really destroying SIP dialog '1e2612cd082d70286677dc2175bc424b@100.1.2.3' Method: OPTIONS
Really destroying SIP dialog '2daf9dafe3e68588@192.168.1.12' Method: SUBSCRIBE
Really destroying SIP dialog 'ba642c4b669c2138@192.168.0.100' Method: REGISTER
Really destroying SIP dialog '1ae57b0b6cabe2dd@192.168.1.12' Method: SUBSCRIBE
Really destroying SIP dialog '14ddfaf63647f28a@192.168.1.11' Method: REGISTER
Really destroying SIP dialog '779c270421e56b02@192.168.1.14' Method: REGISTER
[2016-03-15 09:40:32] NOTICE[22537]: chan_sip.c:7392 sip_reregister:    -- Re-registration for  127500001@bd.abcvoip.test
    -- ast_get_srv: SRV lookup for '_sip._udp.bd.abcvoip.test' mapped to host sipproxy.tc2.bd.abcvoipsrv.test, port 5060
REGISTER attempt 1 to 127500001@bd.abcvoip.test
REGISTER attempt 2 to 127500001@bd.abcvoip.test
[2016-03-15 09:40:32] NOTICE[22537]: chan_sip.c:12475 handle_response_register: Outbound Registration: Expiry for bd.abcvoip.test is 120 sec (Scheduling reregistration in 105 s)
[2016-03-15 09:40:32] NOTICE[22537]: chan_sip.c:7392 sip_reregister:    -- Re-registration for  126950001@bd.abcvoip.test
    -- ast_get_srv: SRV lookup for '_sip._udp.bd.abcvoip.test' mapped to host sipproxy.sig.bd.abcvoipsrv.test, port 6060
REGISTER attempt 1 to 126950001@bd.abcvoip.test
REGISTER attempt 2 to 126950001@bd.abcvoip.test
[2016-03-15 09:40:32] NOTICE[22537]: chan_sip.c:12475 handle_response_register: Outbound Registration: Expiry for bd.abcvoip.test is 120 sec (Scheduling reregistration in 105 s)
Really destroying SIP dialog '37df2740a103c2f1@192.168.1.24' Method: REGISTER
Really destroying SIP dialog '758fa91f28f0f36f@192.168.1.23' Method: REGISTER
Really destroying SIP dialog '5529bbf1f7f1b5e4@192.168.1.12' Method: REGISTER
Really destroying SIP dialog '208c036d74daffd9@192.168.1.36' Method: REGISTER
Really destroying SIP dialog 'fb772e776bc9b6a8@192.168.2.1' Method: REGISTER
Really destroying SIP dialog 'ZDEyMzJjY2E1Nzk2NTY2YzUyY2M2MGVkZWExNzQ1NGU' Method: REGISTER
Really destroying SIP dialog 'b21ca35c2fdeb8fd@192.168.1.14' Method: REGISTER
Really destroying SIP dialog '61d66fac6776922f735e88ef22ed60a2@100.1.2.3' Method: OPTIONS
  == Parsing '/etc/asterisk/manager.conf': Found
  == Manager 'fpbphp' logged on from 54.228.185.179
Really destroying SIP dialog '2408998e33792f6c270090d467815e14@100.1.2.3' Method: OPTIONS
Really destroying SIP dialog '547cc0ec0fbda2e5390aae74710b6e94@100.1.2.3' Method: OPTIONS
Really destroying SIP dialog '5e477bd31d699ba5655d340b4733a3b7@100.1.2.3' Method: OPTIONS
Really destroying SIP dialog '007e36387d264ea7233a65134742fea1@100.1.2.3' Method: OPTIONS
Really destroying SIP dialog '11343658319afdbf717d368d36c5722e@100.1.2.3' Method: OPTIONS
Really destroying SIP dialog '53a7e8e91dcc9b98596172c62dde33b3@100.1.2.3' Method: OPTIONS
       > Channel SIP/511-090f9bf0 was answered.
  == Manager 'fpbphp' logged off from 54.228.185.179
    -- Executing [0034123456789@office:1] Goto("SIP/511-090f9bf0", "office-out|0034123456789|1") in new stack
    -- Goto (office-out,0034123456789,1)
    -- Executing [0034123456789@office-out:1] Set("SIP/511-090f9bf0", "CLID=") in new stack
    -- Executing [0034123456789@office-out:2] Set("SIP/511-090f9bf0", "CALLERID(number)=") in new stack
    -- Executing [0034123456789@office-out:3] NoOp("SIP/511-090f9bf0", "") in new stack
    -- Executing [0034123456789@office-out:4] GotoIf("SIP/511-090f9bf0", "0?dial") in new stack
    -- Executing [0034123456789@office-out:5] Set("SIP/511-090f9bf0", "CALLERID(number)=+34123456789") in new stack
Really destroying SIP dialog '68ffbaaa3042b94b2afee7594cbba63b@100.1.2.3' Method: OPTIONS
Really destroying SIP dialog '7ed096356886d08d79bb06e52b5604a4@100.1.2.3' Method: OPTIONS
Really destroying SIP dialog '3b9593e2411217415008dfd435814f1c@100.1.2.3' Method: OPTIONS
Really destroying SIP dialog '62ac88ea31b11bc7760492470b2c39b6@100.1.2.3' Method: REGISTER
Really destroying SIP dialog '5f271031175a10f53643447a25a5a80f@100.1.2.3' Method: REGISTER
Really destroying SIP dialog '2a04fa5b57e32e0e157f04a60c2589b3@100.1.2.3' Method: OPTIONS
Really destroying SIP dialog '1edf7b2d45aa7f1f233f79be5f1bf030@100.1.2.3' Method: OPTIONS
Really destroying SIP dialog '935f319873f8b64c@192.168.1.26' Method: REGISTER
Really destroying SIP dialog '2c8a83c56b3457e969a4462a65606ea2@100.1.2.3' Method: OPTIONS
Really destroying SIP dialog '22dc609d75e59e63057a64de180f7cb1@100.1.2.3' Method: OPTIONS
Really destroying SIP dialog '6c598605092cc1365cc56e96047da86e@100.1.2.3' Method: OPTIONS

Best Answer

I've managed to get the compile script working again, after installing an old java version. I don't understand how it makes a difference with the other server, as this script is created on the webserver, not the asterisk server, and is just a config file for the phone. Anyway, it works, and that's what counts!

Related Topic