VoIP - Error register device

Ismael
Posts: 20
Joined: Thu Mar 05, 2020 7:35 am

VoIP - Error register device

Postby Ismael » Wed Mar 18, 2020 11:30 am

Hello,

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: 192.168.3.101, mask: 255.255.255.0, gw: 192.168.3.1
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 (6221) MAIN: SIP_EVENT_REQUEST_NETWORK_STATUS
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@192.168.33.151:5060 SIP/2.0
Via: SIP/2.0/TCP 192.168.3.101:5060;branch=z9hG4bK-362257126;rport
From: <sip:1050@192.168.33.151:5060>;tag=-1994083768
To: <sip:1050@192.168.33.151:5060>
Contact: <sip:1050@192.168.3.101:5060>
Max-Forwards: 70
Call-ID: B8904DB40D03D5C2C6E650B19B2E6CAA1761DE07FDD0
CSeq: 1 REGISTER
Expires: 3600
User-Agent: ESP32 SIP/2.0
Content-Length: 0
Allow: INVITE, ACK, CANCEL, BYE, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
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 192.168.3.101:5060;rport=61916;received=192.168.135.150;branch=z9hG4bK-362257126
Call-ID: B8904DB40D03D5C2C6E650B19B2E6CAA1761DE07FDD0
From: <sip:1050@192.168.33.151>;tag=-1994083768
To: <sip:1050@192.168.33.151>;tag=z9hG4bK-362257126
CSeq: 1 REGISTER
WWW-Authenticate: Digest  realm="asterisk",nonce="1584529875/b41745cc2174910c4448fbc178ff06f7",opaque="6239ef3269cc2ae7",algorithm=md5,qop="auth"
Server: FPBX-14.0.13.26(13.22.0)
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.

jason.mao
Posts: 98
Joined: Mon Nov 19, 2018 2:05 am

Re: VoIP - Error register device

Postby jason.mao » Fri Mar 27, 2020 4:49 am

Hi Ismael,

Could you provide your IDF and ADF version?

Thanks.

Ismael
Posts: 20
Joined: Thu Mar 05, 2020 7:35 am

Re: VoIP - Error register device

Postby Ismael » Wed Apr 01, 2020 1:28 pm

My ESP-ADF version in not the last one:

Code: Select all

ESP-ADF:

commit cfce657cf6ca6fceb4b165758436c1e0c37b7b69 (origin/master, origin/HEAD)
Merge: 650abf1 d84fe7b
Author: Jason-mao <maojxsir@qq.com>
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 <jack@espressif.com>
Date:   Sun Apr 28 22:13:16 2019 +0800

    Merge branch 'feature/himem_readme_backport_v3.2' into 'release/v3.2'
   
    Proper README.md 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.
Attachments
voip_mqtt.zip
(14.1 KiB) Downloaded 608 times

driver401
Posts: 1
Joined: Sat Jan 16, 2021 4:14 pm

Re: VoIP - Error register device

Postby driver401 » Sat Jan 16, 2021 4:18 pm

Does the problem be solved ? plz let me know the following situation, just faced the same issue, thanks

Who is online

Users browsing this forum: No registered users and 18 guests