Page 1 of 1

VoIP - Error register device

Posted: Wed Mar 18, 2020 11:30 am
by Ismael

Trying to mix the VoIP example project with a MQTT client I had been problems in program runtime.

The VoIP is executed directly in the main and the MQTT functions are implemented but no used, the program never execute any of them.
The issue is that if I comment all of the espressif mqtt library functions, the example runs perfectly but when at least one functions is not commented ("esp_mqtt_client_stop" for example) the module show a "SIP: Error register device"

Trace is as shown:

Code: Select all

I (6161) event: sta ip:, mask:, gw:
I (6161) MAIN: [ 2 ] Start codec chip
I (6161) gpio: GPIO[19]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:3 
E (6171) gpio: gpio_install_isr_service(394): GPIO isr service already installed
I (6191) gpio: GPIO[21]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (6191) ES8388_DRIVER: init,out:02, in:00
I (6221) AUDIO_HAL: Codec mode is 3, Ctrl:1
I (6221) MAIN: [ 3 ] Create and start input key service
I (6221) MAIN: [ 4 ] Create SIP Service
I (6221) MAIN: [ 5 ] Create decoder and encoder pipelines
I (6231) SIP: Conecting...
tcp_bind: can only bind in state CLOSED
W (6271) SIP: CHANGE STATE FROM 0, TO 1, :func: sip_connect:1319
W (6271) SIP: [1970-01-01/00:00:03]=======WRITE 0580 bytes>>
I (6271) SIP: 

REGISTER sip:1050@ SIP/2.0
Via: SIP/2.0/TCP;branch=z9hG4bK-362257126;rport
From: <sip:1050@>;tag=-1994083768
To: <sip:1050@>
Contact: <sip:1050@>
Max-Forwards: 70
Call-ID: B8904DB40D03D5C2C6E650B19B2E6CAA1761DE07FDD0
Expires: 3600
User-Agent: ESP32 SIP/2.0
Content-Length: 0
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
Allow-Events: presence, kpml

W (6331) SIP: [1970-01-01/00:00:03]=======================>>
W (6411) SIP: [1970-01-01/00:00:03]<<=====READ 0503 bytes==
I (6411) SIP: 

SIP/2.0 401 Unauthorized
Via: SIP/2.0/TCP;rport=61916;received=;branch=z9hG4bK-362257126
Call-ID: B8904DB40D03D5C2C6E650B19B2E6CAA1761DE07FDD0
From: <sip:1050@>;tag=-1994083768
To: <sip:1050@>;tag=z9hG4bK-362257126
WWW-Authenticate: Digest  realm="asterisk",nonce="1584529875/b41745cc2174910c4448fbc178ff06f7",opaque="6239ef3269cc2ae7",algorithm=md5,qop="auth"
Server: FPBX-
Content-Length:  0

W (6451) SIP: [1970-01-01/00:00:03]<<======================
E (6461) SIP: Error register device
W (6461) SIP: CHANGE STATE FROM 1, TO 0, :func: sip_register:1334

Thanks so much.

Re: VoIP - Error register device

Posted: Fri Mar 27, 2020 4:49 am
by jason.mao
Hi Ismael,

Could you provide your IDF and ADF version?


Re: VoIP - Error register device

Posted: Wed Apr 01, 2020 1:28 pm
by Ismael
My ESP-ADF version in not the last one:

Code: Select all


commit cfce657cf6ca6fceb4b165758436c1e0c37b7b69 (origin/master, origin/HEAD)
Merge: 650abf1 d84fe7b
Author: Jason-mao <>
Date:   Wed Oct 23 17:41:20 2019 +0800

    Merge branch 'improve_build_performance' into 'master'
    improve build speed and performance
    See merge request adf/esp-adf-internal!383

ESP-IDF (descargado automaticamente):

commit 4aa1058e8a8f7f3fb17d9ac1158227ad161f2996 (HEAD)
Merge: a08c77ae9 cb20ba50b
Author: Jiang Jiang Jian <>
Date:   Sun Apr 28 22:13:16 2019 +0800

    Merge branch 'feature/himem_readme_backport_v3.2' into 'release/v3.2'
    Proper for himem example (backport v3.2)
    See merge request idf/esp-idf!4304
But, same result when I try with the latest release of the ESP-ADF version.

To simplify the problem I attached some code wrote from the merge of the MQTT (TCP) and the VoIP examples. Here the same result happens.

Please, to get the same result just comment and uncomment the mqtt invocation functions.

Thanks so much.

Re: VoIP - Error register device

Posted: Sat Jan 16, 2021 4:18 pm
by driver401
Does the problem be solved ? plz let me know the following situation, just faced the same issue, thanks