ESP32-LyraT V4.3: Voip Example Problem

shadow.yang
Posts: 4
Joined: Mon Mar 22, 2021 8:28 am

ESP32-LyraT V4.3: Voip Example Problem

Postby shadow.yang » Thu Mar 25, 2021 3:39 am

ADF V2.2. Have Asterisk working with one ESP32 and Android phone. But there is no sound with ESP32 to ESP32, any idea?

kentavr
Posts: 7
Joined: Fri Nov 08, 2019 2:39 pm

Re: ESP32-LyraT V4.3: Voip Example Problem

Postby kentavr » Thu Mar 25, 2021 1:06 pm

Hi.

If each esp32 work with Android, they must work between themselves too.

Also, have you noticed low quality sound from speakers connected to esp32?

shadow.yang
Posts: 4
Joined: Mon Mar 22, 2021 8:28 am

Re: ESP32-LyraT V4.3: Voip Example Problem

Postby shadow.yang » Fri Mar 26, 2021 1:24 am

Yes, it should be work between two ESP32, but fail now. If I use voip example from ADF, it also failed with Android. I use g711enc_pipeline_open() and g711dec_pipeline_open() from OLIMEX sip_phone_example project to replace recorder_pipeline_open() and player_pipeline_open(), it works with Android, and gets low quality speaker in ESP32 side. For low quality issue, do you have any suggestion? I attached the voip_main.c, thanks in advanced.

https://github.com/OLIMEX/sip_phone_exa ... voip_app.c
Attachments
voip_app.c
voip_app.c
(16.39 KiB) Downloaded 14 times

kentavr
Posts: 7
Joined: Fri Nov 08, 2019 2:39 pm

Re: ESP32-LyraT V4.3: Voip Example Problem

Postby kentavr » Fri Mar 26, 2021 4:06 am

The "voip_example" code must work from the box, I checked it for different boards. You should try to run it, too.

Decoding one channel stream into two channel works incorrectly, IMHO. It is the reason for low quality of speakers sound.

And it is the question for ADF support team ))

kentavr
Posts: 7
Joined: Fri Nov 08, 2019 2:39 pm

Re: ESP32-LyraT V4.3: Voip Example Problem

Postby kentavr » Sun Apr 04, 2021 10:01 am

Dear ESP-ADF Support Team,

Could you please help with "voip_example"-s poor speakers quality issue?

shadow.yang
Posts: 4
Joined: Mon Mar 22, 2021 8:28 am

Re: ESP32-LyraT V4.3: Voip Example Problem

Postby shadow.yang » Wed Apr 07, 2021 12:54 am

Hi,

I attached two ESP32 logs, one is working with Android and another is NG without voice.
The NG log lacks "SIP_RTP: send task, remote addr=192.168.5.152" in the line 276.

SIP/2.0 486 Busy Here
Via: SIP/2.0/UDP 192.168.5.152:5060;branch=z9hG4bK7fb44041;rport
Contact: <sip:200@192.168.5.10:19092>
From: <sip:201@192.168.5.152:5060>;tag=as2f4add90
To: <sip:200@192.168.5.152:5060>;tag=469904015;tag=524195928
Call-ID: E7B68E16E76F1F98FB376216FBE92550389B5BBB79CB
CSeq: 102 INVITE
Server: ESP32 SIP/2.0
Allow: ACK, INVITE, BYE, UPDATE, CANCEL, OPTIONS, INFO
Content-Length: 0


:13652457) SIP_RTP: send task, remote addr=192.168.5.152
I (247587) SIP: [1970-01-01/00:04:03]=======================>>
I (247617) SIP: [1970-01-01/00:04:03]<<=====READ 0386 bytes==
I (247617) SIP:

ACK sip:200@192.168.5.10:19092 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.152:5060;branch=z9hG4bK7fb44041;rport
Max-Forwards: 70
From: <sip:201@192.168.5.152:5060>;tag=as2f4add90
To: <sip:200@192.168.5.152:5060>;tag=469904015
Contact: <sip:201@192.168.5.152:5060>
Call-ID: E7B68E16E76F1F98FB376216FBE92550389B5BBB79CB
CSeq: 102 ACK
User-Agent: Asterisk PBX 13.9.1
Content-Length: 0


I (247647) SIP: [1970-01-01/00:04:03]<<======================
I (253697) VOIP_EXAMPLE: [ * ] [Set] input key event
I (253697) SIP: User call sip BYE
I (253757) SIP: [1970-01-01/00:04:06]=======WRITE 0599 bytes>>
I (253757) SIP:
Attachments
usb1.log
voip abnormal log
(32.57 KiB) Downloaded 40 times
usb1_phone.log
voip OK with Android phone
(35.89 KiB) Downloaded 54 times

shadow.yang
Posts: 4
Joined: Mon Mar 22, 2021 8:28 am

Re: ESP32-LyraT V4.3: Voip Example Problem

Postby shadow.yang » Wed Apr 07, 2021 1:32 am

Hi kentavr,

What's the version of ADF and voip you test? There is a AEC function added in voip example two months ago. I do not sure if this is the problem in my ESP32-Lyrat board.


Acoustic Echo Cancellation (AEC) :
Software AEC
only support MINI board with our algorithm stream
Hardware AEC
You can use MSC board or other board that support AEC features

kentavr
Posts: 7
Joined: Fri Nov 08, 2019 2:39 pm

Re: ESP32-LyraT V4.3: Voip Example Problem

Postby kentavr » Sun Apr 11, 2021 6:32 am

Hi Shadow.Yang.

I noticed "401 Unauthorized" errors in your logs. You should check origin of those errors.

Also, you use PCMU(ulaw) codec in your code, try to use PCMA instead. I had problems with PCMU implementation of ESP32 voip.

Rebuild "voip_example" with PCMA, and don't forget to make changes on SIP server too, to accept alaw codec from extensions.

I use latest version of ADF(and examples) from here: https://github.com/espressif/esp-adf.
Thanks for AEC advice. Unfortunately it is for microphone part, not for speakers. And I'm sure it is decoding problem: one channel -> two channel.

Who is online

Users browsing this forum: No registered users and 4 guests