VoIP example error: can't connect to SIP-PBX

liugyer
Posts: 11
Joined: Mon Oct 18, 2021 3:23 am

VoIP example error: can't connect to SIP-PBX

Postby liugyer » Wed Oct 20, 2021 2:13 pm

Hi guys,

When I use the VoIP example of esp-adf, my board can't be connected with FreePBX.
I have tested with my FreePBX by using phone, so how to fix this issue or how can I debug?
The log as following:

Code: Select all

REGISTER sip:123@192.168.137.171:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.10:17020;branch=z9hG4bK-1368558991;rport
From: <sip:123@192.168.137.171:5060>;tag=1702888966
To: <sip:123@192.168.137.171:5060>
Contact: <sip:123@192.168.1.10:17020>
Max-Forwards: 70
Call-ID: 4DBB8AC91A42A982B455520F903F926E5501F7BBC611
CSeq: 4 REGISTER
Expires: 3600
User-Agent: ESP32 SIP/2.0
Content-Length: 0
Allow: INVITE, ACK, CANCEL, BYE, UPDATE, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
Allow-Events: presence, kpml


I (63377) SIP: [1970-01-01/00:01:01]=======================>>
W (65387) SIP: Retransmit again
I (65387) SIP: [1970-01-01/00:01:02]=======WRITE 0587 bytes>>
I (65387) SIP: 

REGISTER sip:123@192.168.137.171:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.10:17020;branch=z9hG4bK-1368558991;rport
From: <sip:123@192.168.137.171:5060>;tag=1702888966
To: <sip:123@192.168.137.171:5060>
Contact: <sip:123@192.168.1.10:17020>
Max-Forwards: 70
Call-ID: 4DBB8AC91A42A982B455520F903F926E5501F7BBC611
CSeq: 4 REGISTER
Expires: 3600
User-Agent: ESP32 SIP/2.0
Content-Length: 0
Allow: INVITE, ACK, CANCEL, BYE, UPDATE, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
Allow-Events: presence, kpml


I (65437) SIP: [1970-01-01/00:01:02]=======================>>
W (67447) SIP: Retransmit again
I (67447) SIP: [1970-01-01/00:01:03]=======WRITE 0587 bytes>>
I (67447) SIP: 

REGISTER sip:123@192.168.137.171:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.10:17020;branch=z9hG4bK-1368558991;rport
From: <sip:123@192.168.137.171:5060>;tag=1702888966
To: <sip:123@192.168.137.171:5060>
Contact: <sip:123@192.168.1.10:17020>
Max-Forwards: 70
Call-ID: 4DBB8AC91A42A982B455520F903F926E5501F7BBC611
CSeq: 4 REGISTER
Expires: 3600
User-Agent: ESP32 SIP/2.0
Content-Length: 0
Allow: INVITE, ACK, CANCEL, BYE, UPDATE, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
Allow-Events: presence, kpml


I (67497) SIP: [1970-01-01/00:01:03]=======================>>
W (69507) SIP: read timeout
E (69507) SIP: Error register device
W (69507) SIP: CHANGE STATE FROM 1, TO 0, :func: sip_register:1682

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

Re: VoIP example error: can't connect to SIP-PBX

Postby kentavr » Sat Dec 04, 2021 5:45 am

To: <sip:123@192.168.137.171:5060>
Contact: <sip:123@192.168.1.10:17020>
Your SIP server and ESP32 device are on different networks. Check if you can ping from one network to another.

liugyer
Posts: 11
Joined: Mon Oct 18, 2021 3:23 am

Re: VoIP example error: can't connect to SIP-PBX

Postby liugyer » Wed Dec 22, 2021 12:30 pm

Hi

When I use esp-adf with esp-idf V3.2 which is the submodule of esp-adf repo. It can work, but if I use esp-idf v4.x, the sip server can't be accessed.
And I'm sure that my Lyrat-mini board and FreePBx Server were connected with the same wifi. They should be in a same network.

Who is online

Users browsing this forum: No registered users and 22 guests