I successfully integrate the sip with freepbx.But ...
# telephony
m
I successfully integrate the sip with freepbx.But the issue is that the livekit trunk is reachable and sudennly unrechable again and again and aftre 1 or 2minutes it reachable again. This is working like a loop. Not constently reeachable like other trunk. How can I solve it? On the log i see freepbx sent option method request again and again the livekit do not sent 200 ok. This is the probeble resone. Aftre 1 or 2 minutes it sent 200 and the registration is okay. Please help me fix it. And connect the trunk constently.
r
Can you share the PCAP for a failure. The SIP agent should be sending an
INVITE
not
OPTION
method. This sounds to me like not all the ports are open to your PBX and it is random based using open ports or closed ports on the firewall.
For Option message it is supported for LiveKit outbound but not for inbound at this time.
m
Copy code
== Endpoint AI-Agent-Trunk is now Unreachable
    -- Contact AI-Agent-Trunk/sip:5m5132o2pv8.sip.livekit.cloud:5060 is now Unreachable.  RTT: 0.000 msec
<--- Transmitting SIP request (468 bytes) to UDP:143.223.94.134:5060 --->
OPTIONS sip:5m5132o2pv8.sip.livekit.cloud:5060 SIP/2.0
Via: SIP/2.0/UDP 123.176.58.154:5060;rport;branch=z9hG4bKPj1b05e60f-9437-45b0-a193-3a264c3feb5f
From: <sip:AI-Agent-Trunk@10.1.1.87>;tag=b5d3aa3c-a41e-4efa-a4af-379936f5c569
To: <sip:5m5132o2pv8.sip.livekit.cloud>
Contact: <sip:AI-Agent-Trunk@123.176.58.154:5060>
Call-ID: 59c2b62d-b740-4c57-b689-090c94e6235a
CSeq: 32172 OPTIONS
Max-Forwards: 70
User-Agent: FPBX-17.0.21.7(22.6.0)
Content-Length:  0


<--- Transmitting SIP request (468 bytes) to UDP:143.223.94.134:5060 --->
OPTIONS sip:5m5132o2pv8.sip.livekit.cloud:5060 SIP/2.0
Via: SIP/2.0/UDP 123.176.58.154:5060;rport;branch=z9hG4bKPj1b05e60f-9437-45b0-a193-3a264c3feb5f
From: <sip:AI-Agent-Trunk@10.1.1.87>;tag=b5d3aa3c-a41e-4efa-a4af-379936f5c569
To: <sip:5m5132o2pv8.sip.livekit.cloud>
Contact: <sip:AI-Agent-Trunk@123.176.58.154:5060>
Call-ID: 59c2b62d-b740-4c57-b689-090c94e6235a
CSeq: 32172 OPTIONS
Max-Forwards: 70
User-Agent: FPBX-17.0.21.7(22.6.0)
Content-Length:  0
This is the log when try to connect
Copy code
<--- Received SIP response (389 bytes) from UDP:143.223.91.185:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 123.176.58.154:5060;branch=z9hG4bKPj1cb17c86-c555-4acc-8d01-81b75ca659f9;rport=50239;received=10.60.5.81
From: <sip:AI-Agent-Trunk@10.1.1.87>;tag=d31878e5-3a28-43a5-b629-fb731e3b0046
To: <sip:5m5132o2pv8.sip.livekit.cloud>;tag=de440b3b-0473-4f02-9cd0-bac3d517fad7
Call-ID: 776574a2-3c8b-4750-8bd1-c448d9da7f2d
CSeq: 51353 OPTIONS
Content-Length: 0
And the last log is when it connect means livekit sent 200 OK after 2 minutes. Then the trunk live for 1 minute again unavailable for 2 minutes
I ovsarve that the trunk reachable and then after exect 1 minute it unreachable and after 1 minute it reachable again
r
Can you share a PCAP of a failure case?
Why is the PBX sending
OPTIONS
?
m
I do not know how to shear PCAP. Could you please guide me?
r
You can run
tcpdump
on your pbx to capture the SIP traffic. You can save that to a file called sip_call.pcap. You can filter on port 5060. See the tcpdump man page or you can look at this page on wireshark: https://www.wireshark.org/docs/wsug_html_chunked/AppToolstcpdump.html
r
It's simple, in Freepbx trunk remove or disable qualify parameter. After that livekit trunk will looks unmonitored.