Closed Gorbas closed 2 days ago
Hello @Gorbas, Thank you for taking time to report a problem with Flexisip.
Can you please provide Flexisip debug logs of the processing of these requests? I would like to see how Flexisip received the ACK and how it processed it.
Sincerely, Félix.
Hi @Failxxx and thank you for your prompt response
I have attached the Flexisip logs during my call session: flexisip.log
If I have understood correctly you wanted the following?
SIP/2.0 200 OK
Via: SIP/2.0/TLS 192.168.28.150:51381;branch=z9hG4bK.XdNqP-CSR;rport=51381;received=79.107.55.147
Record-Route: <sip:10.255.0.1;transport=tcp;r2=on;lr;ftag=6G4pA6kpY>
Record-Route: <sip:192.76.120.10;transport=tcp;r2=on;lr;ftag=6G4pA6kpY>
Record-Route: <sip:siptst.4freedommobile.com:5060;lr>
Record-Route: <sips:siptst.4freedommobile.com:5061;lr>
From: <sip:+447457412240@siptst.4freedommobile.com>;tag=6G4pA6kpY
To: "+18004444444" <sip:+18004444444@sip.telnyx.com>;tag=7UDrBvHmKKKKB
Call-ID: Kb7RPjkhZa
CSeq: 21 INVITE
Contact: <sip:+18004444444@192.76.120.10:5060;transport=tcp>
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REFER, NOTIFY
Supported: path
Allow-Events: talk, hold, conference, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 274
v=0
o=FreeSWITCH 1732693980 1732693981 IN IP4 50.114.150.12
s=FreeSWITCH
c=IN IP4 5.78.119.75
t=0 0
m=audio 12586 RTP/AVP 0 100
a=rtpmap:0 PCMU/8000
a=rtpmap:100 telephone-event/8000
a=fmtp:100 0-15
a=silenceSupp:off - - - -
a=ptime:20
a=mid:audio
a=rtcp:12587
2024-11-27 15:59:58:810 flexisip-debug- Response is sent through an incoming transaction.
2024-11-27 15:59:58:811 flexisip-debug- nta: sent 200 OK for INVITE (21)
2024-11-27 15:59:58:811 flexisip-debug- nta_incoming_destroy: 0x5582f77350b0
2024-11-27 15:59:58:811 flexisip-debug- Delete IncomingTransaction 0x5582f76f93e0
2024-11-27 15:59:58:811 flexisip-debug- Terminate SipEvent 0x5582f77e4790
2024-11-27 15:59:58:811 flexisip-debug- Destroy SipEvent 0x5582f77e4790
2024-11-27 15:59:59:207 flexisip-debug- RelayChannel [0x5582f76897c0] destination address updated for [RTCP]: local=[5.78.119.75:12587] remote=[79.107.55.147:7231]
2024-11-27 15:59:59:208 flexisip-debug- RelayChannel [0x5582f76897c0] destination address updated for [RTP]: local=[5.78.119.75:12586] remote=[79.107.55.147:7230]
2024-11-27 15:59:59:212 flexisip-debug- nta: received ACK sip:+18004444444@192.76.120.10:5060;transport=tcp SIP/2.0 (CSeq 21)
2024-11-27 15:59:59:213 flexisip-debug- nta: Via check: received=79.107.55.147
2024-11-27 15:59:59:213 flexisip-debug- nta: ACK (21) to message callback
2024-11-27 15:59:59:213 flexisip-debug- New SipEvent 0x5582f7708d20 - msg 0x5582f7834b90
2024-11-27 15:59:59:213 flexisip-debug- Receiving new Request SIP message ACK from sip:+447457412240@siptst.4freedommobile.com :
ACK sip:+18004444444@192.76.120.10:5060;transport=tcp SIP/2.0
Via: SIP/2.0/TLS 192.168.28.150:51381;rport=51381;branch=z9hG4bK.rtZI1rfNr;received=79.107.55.147
From: <sip:+447457412240@siptst.4freedommobile.com>;tag=6G4pA6kpY
To: "+18004444444" <sip:+18004444444@sip.telnyx.com>;tag=7UDrBvHmKKKKB
CSeq: 21 ACK
Call-ID: Kb7RPjkhZa
Max-Forwards: 70
Route: <sips:siptst.4freedommobile.com:5061;lr>
Route: <sip:siptst.4freedommobile.com:5060;lr>
Route: <sip:192.76.120.10;transport=tcp;r2=on;lr;ftag=6G4pA6kpY>
Route: <sip:10.255.0.1;transport=tcp;r2=on;lr;ftag=6G4pA6kpY>
Proxy-Authorization: Digest realm="siptst.4freedommobile.com", nonce="WqTx6gAAAADSP2bzAAAz7d3wDdkAAAAA", algorithm=SHA-256, opaque="+GNywA==", username="+447457412240", uri="sip:+18004444444@sip.telnyx.com", response="676d7fc1fb87a198f3a6db7b6b18cf7835cd557362aaa425e79775d8ed8a4531", cnonce="YWRUzOy7hj~llMyz", nc=00000001, qop=auth
User-Agent: 4Freedom MobileiOS/5.2.3 (iPhone) LinphoneSDK/5.3.91
Content-Length: 0
Thank you very much for the logs. I guess this issue is related to NATs because I see local IP addresses (192.xx.xx.xx). Can you please retry with the following configuration for the NatHelper module :
[module::NatHelper]
enabled=true
filter= !(user-agent contains 'No NatHelper')
# Strategy to manage client-initiated connections when SIP messages
# are routed through NATs. You can choose between "contact-correction"
# and "flow-token".
# Default: contact-correction
nat-traversal-strategy=flow-token
# Boolean expression in order to force the use of flow-token under
# specific conditions. This expression is only evaluated if the
# "flow-token" strategy is used.
#
# Default: user-agent contains 'Linphone'
force-flow-token=user-agent contains 'MyApp' || user-agent contains '4Freedom'
fix-record-routes=false
fix-record-routes-policy=safe
Thank you very much @Failxxx.
It works fine now and it does use the correct IP & Port.
THE PROBLEM
Outbound calls hang up within 30-32 seconds
THE ROOT CAUSE
ACK message sent by Flexisip do not use the IP & Port that Telynx speicfies in the Contact header of the 200 OK message, but the IP & Port of the route specified in routes.conf (sip.telnyx.com:5060 => 192.76.120.10:5060)
Sends: ACK sip:+18004444444@192.76.120.10:5060;transport=tcp SIP/2.0 Instead of: ACK sip:+18004444444@10.239.216.224:5070;transport=tcp SIP/2.0
Notes for the messages:
200 OK Message
ACK Message (WRONG)
ACK Message (EXPECTED)
FLEXISIP INSTALLATION
routes.conf
flexisip.conf