jaspreet-eltropy created an issue (kamailio/kamailio#4270)
**I’m running into an issue when using Yealink SIP phones in a setup involving Kamailio + RTPengine + FreeSWITCH/Fusionpbx.** **Setup Overview:** SIP Proxy: Kamailio (handling NAT traversal, registration, and routing) Media Relay: RTPengine (with replace-origin, replace-session-connection, media-address, and other options) Media Server: FreeSWITCH (handles RTP/audio and call logic) Phone: Yealink T54w Series (but likely affects other models too) Transport: UDP (with force_rport() and NAT detection routes in place) Environment: Mixed NAT/public IPs with STUN/TURN enabled on WebRTC clients(SIP.js) (where applicable) Problem Description: When a call is placed from/to a Yealink phone, the call signaling works fine (INVITE, 200 OK, ACK are all seen correctly), but there is no audio or sometimes one-way audio. This only happens with Yealink; other SIP clients (Zoiper, Linphone, SIP.js etc.) work fine with the same setup. From packet captures and Kamailio logs, I can see the following: RTPengine receives the call and processes it. The rtpengine_manage() is called with these flags: May 30 05:38:13 ip-10-7-37-179 /usr/local/sbin/kamailio[62354]: INFO: <script>: BRIDGING: TRYING TO BRIDGE udp sip:5555@192.168.1.10:12561;transport=TCP May 30 05:38:13 ip-10-7-37-179 /usr/local/sbin/kamailio[62354]: INFO: <script>: NATMANAGE branch_id:0 ruri: sip:5555@192.168.1.10:12561;transport=TCP, method:INVITE, status:<null>, extra_id: z9hG4bKcSBpr6vNyyepe0, rtpengine_manage: replace-origin replace-session-connection media-address=52.24.225.81 trust-address via-branch=extra The Yealink phone sends SDP with correct IPs, but it doesn’t receive RTP (confirmed via tcpdump). Interestingly, if I bypass RTPengine + kamilio (media goes directly to/from FreeSWITCH), audio works. What I’ve Tried: Enabling/disabling trust-address and via-branch options. Using set_contact_alias() for REGISTER/NATed clients. Ensured that Contact header aliasing is applied. Verified that Yealink NAT settings are configured correctly. Using force_rport() and fix_nated_register() in Kamailio. Ensured RTP ports are open and media_address in RTPengine is set correctly. My Questions: Is there a known compatibility issue with Yealink phones and RTPengine in relayed mode? Does Yealink require specific NAT handling rules that differ from softphones? Are there any recommended rtpengine_manage() flags or Kamailio routing practices specifically for Yealink endpoints? Any suggestions to debug further — SIP traces seem clean, but RTP is not received by the Yealink. Sample Logs (Kamailio): NATMANAGE branch_id:0 ruri: <null>, method:INVITE, status:100, extra_id: z9hG4bK4b1.ffbb20e21cff840bb08800b46398f55b.00, rtpengine_manage: replace-origin replace-session-connection media-address=52.24.225.81 trust-address via-branch=extra Yealink SIP Config: NAT Traversal: Enabled (STUN) Keep-Alive: 30s UDP port: 5060 SIP registration: works Audio: not working when RTPengine is in the path Any help or suggestions would be greatly appreciated. Let me know if logs or traces are needed. ``` -[ RECORD 1 ]-+---------------------------------------------------------------------- id | 3259 ruid | uloc-683943f5-f3a0-1 username | 5555 domain | contact | sip:5555@192.168.1.10:12561;transport=TCP received | sip:182.77.49.201:12561;transport=tcp path | expires | 2025-05-30 05:44:04 q | -1 callid | [2_689921921@192.168.1.10](mailto:2_689921921@192.168.1.10) cseq | 6 last_modified | 2025-05-30 05:42:04 flags | 0 cflags | 64 user_agent | Yealink SIP-T54W 96.86.0.75 socket | tcp:10.7.37.179:5060 methods | 16383 instance | reg_id | 0 server_id | 0 connection_id | 4 keepalive | 1 partition | 28 ``` Thanks in advance
Can you record PCAP on Kamailio and RTPengine nodes for the same test call. When we can see network packets to/from the caller and the callee, it will be much easy to define what need to check.
On Fri, May 30, 2025 at 11:41 AM jaspreet-eltropy via sr-dev < sr-dev@lists.kamailio.org> wrote:
*jaspreet-eltropy* created an issue (kamailio/kamailio#4270) https://github.com/kamailio/kamailio/issues/4270
*I’m running into an issue when using Yealink SIP phones in a setup involving Kamailio + RTPengine + FreeSWITCH/Fusionpbx.* *Setup Overview:* SIP Proxy: Kamailio (handling NAT traversal, registration, and routing) Media Relay: RTPengine (with replace-origin, replace-session-connection, media-address, and other options) Media Server: FreeSWITCH (handles RTP/audio and call logic) Phone: Yealink T54w Series (but likely affects other models too) Transport: UDP (with force_rport() and NAT detection routes in place) Environment: Mixed NAT/public IPs with STUN/TURN enabled on WebRTC clients(SIP.js) (where applicable) Problem Description: When a call is placed from/to a Yealink phone, the call signaling works fine (INVITE, 200 OK, ACK are all seen correctly), but there is no audio or sometimes one-way audio. This only happens with Yealink; other SIP clients (Zoiper, Linphone, SIP.js etc.) work fine with the same setup.
From packet captures and Kamailio logs, I can see the following:
RTPengine receives the call and processes it. The rtpengine_manage() is called with these flags: May 30 05:38:13 ip-10-7-37-179 /usr/local/sbin/kamailio[62354]: INFO:
<script>: BRIDGING: TRYING TO BRIDGE udp sip:5555@192.168.1.10:12561 ;transport=TCP May 30 05:38:13 ip-10-7-37-179 /usr/local/sbin/kamailio[62354]: INFO: <script>: NATMANAGE branch_id:0 ruri: sip:5555@192.168.1.10:12561;transport=TCP, method:INVITE, status:, extra_id: z9hG4bKcSBpr6vNyyepe0, rtpengine_manage: replace-origin replace-session-connection media-address=52.24.225.81 trust-address via-branch=extra The Yealink phone sends SDP with correct IPs, but it doesn’t receive RTP (confirmed via tcpdump). Interestingly, if I bypass RTPengine + kamilio (media goes directly to/from FreeSWITCH), audio works. What I’ve Tried: Enabling/disabling trust-address and via-branch options. Using set_contact_alias() for REGISTER/NATed clients. Ensured that Contact header aliasing is applied. Verified that Yealink NAT settings are configured correctly. Using force_rport() and fix_nated_register() in Kamailio. Ensured RTP ports are open and media_address in RTPengine is set correctly. My Questions: Is there a known compatibility issue with Yealink phones and RTPengine in relayed mode? Does Yealink require specific NAT handling rules that differ from softphones? Are there any recommended rtpengine_manage() flags or Kamailio routing practices specifically for Yealink endpoints? Any suggestions to debug further — SIP traces seem clean, but RTP is not received by the Yealink. Sample Logs (Kamailio): NATMANAGE branch_id:0 ruri: , method:INVITE, status:100, extra_id: z9hG4bK4b1.ffbb20e21cff840bb08800b46398f55b.00, rtpengine_manage: replace-origin replace-session-connection media-address=52.24.225.81 trust-address via-branch=extra Yealink SIP Config: NAT Traversal: Enabled (STUN) Keep-Alive: 30s UDP port: 5060 SIP registration: works Audio: not working when RTPengine is in the path Any help or suggestions would be greatly appreciated. Let me know if logs or traces are needed. -[ RECORD 1 ]-+---------------------------------------------------------------------- id | 3259 ruid | uloc-683943f5-f3a0-1 username | 5555 domain | contact | sip:5555@192.168.1.10:12561;transport=TCP received | sip:182.77.49.201:12561;transport=tcp path | expires | 2025-05-30 05:44:04 q | -1 callid | [2_689921921@192.168.1.10](mailto:2_689921921@192.168.1.10) cseq | 6 last_modified | 2025-05-30 05:42:04 flags | 0 cflags | 64 user_agent | Yealink SIP-T54W 96.86.0.75 socket | tcp:10.7.37.179:5060 methods | 16383 instance | reg_id | 0 server_id | 0 connection_id | 4 keepalive | 1 partition | 28 Thanks in advance — Reply to this email directly, view it on GitHub <https://github.com/kamailio/kamailio/issues/4270>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABO7UZOMLP4IK7W6EKFJ5OT3BAJK7AVCNFSM6AAAAAB6HPHDSWVHI2DSMVQWIX3LMV43ASLTON2WKOZTGEYDENBYGE2DSNI> . You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/issues/4270@github.com> _______________________________________________ Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org To unsubscribe send an email to sr-dev-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
jaspreet-eltropy left a comment (kamailio/kamailio#4270)
Hi, thanks for the reply.
After adding a STUN server and setting the codec priority to PCMU, PCMA, G722 on the Yealink phone, it started working. Is this the right approach, or should I be looking for another solution?
Even with this setup, it only works one-way when both devices are on the same network, but works fine when the devices are on different networks.
Here is the PCAP from both Kamailio and RTPengine **before adding STUN**.
[pcap.zip](https://github.com/user-attachments/files/20521273/pcap.zip)
I have checked PCAP and it looks like file from the Kamailio does not match files from the RTPengine host. What is need to fix here It looks like 182.77.49.201 and 192.168.1.31 it is the same host. For connectivity to this hosts used both private IP address and public IP address.
[image: image.png] I think you will improve call troubleshooting if you use only one of IP address type public or private.
Also, "200 OK" response contains private address in the SDP
2025/05/30 16:08:42.786225 10.7.37.212:5060 -> 35.88.200.66:5060 SIP/2.0 200 OK Via: SIP/2.0/UDP 35.88.200.66;received=35.88.200.66;rport=5060;branch=z9hG4bKevFgUHF072mDg Record-Route: sip:ka.edevops.org;lr=on From: "Jaspreet User2" sip:2002@35.88.200.66;tag=a2HDB9tc4650H To: sip:2001@ka.edevops.org;tag=708928745 Call-ID: 0cbc81dc-b7fa-123e-c2ae-0a71ca8a0c37 CSeq: 99751468 INVITE Contact: sip:2001@192.168.1.31:5060 Content-Type: application/sdp Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE User-Agent: Yealink SIP-T54W 96.86.0.75 Allow-Events: talk,hold,conference,refer,check-sync Supported: replaces Content-Length: 211
v=0 o=- 20015 20015 IN IP4 192.168.1.31 s=SDP data c=IN IP4 192.168.1.31 t=0 0 m=audio 16394 RTP/AVP 9 101 a=rtpmap:9 G722/8000 a=ptime:20 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=sendrecv
For a host located on the Internet, you should avoid the use of private IP addresses and should use a public IP addresses only.
On Fri, May 30, 2025 at 4:30 PM jaspreet-eltropy via sr-dev < sr-dev@lists.kamailio.org> wrote:
*jaspreet-eltropy* left a comment (kamailio/kamailio#4270) https://github.com/kamailio/kamailio/issues/4270#issuecomment-2922386430
Hi, thanks for the reply.
After adding a STUN server and setting the codec priority to PCMU, PCMA, G722 on the Yealink phone, it started working. Is this the right approach, or should I be looking for another solution?
Even with this setup, it only works one-way when both devices are on the same network, but works fine when the devices are on different networks.
Here is the PCAP from both Kamailio and RTPengine *before adding STUN*.
pcap.zip https://github.com/user-attachments/files/20521273/pcap.zip
— Reply to this email directly, view it on GitHub https://github.com/kamailio/kamailio/issues/4270#issuecomment-2922386430, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABO7UZOJ7RCNUUZ2VFXT3AL3BBLOZAVCNFSM6AAAAAB6HPHDSWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSMRSGM4DMNBTGA . You are receiving this because you commented.Message ID: kamailio/kamailio/issues/4270/2922386430@github.com _______________________________________________ Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org To unsubscribe send an email to sr-dev-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
Closed #4270 as completed.
henningw left a comment (kamailio/kamailio#4270)
Please discuss it further on the sr-users mailing list. This issue tracker is for reporting problems in the source code or documentation.