livekit / sip

SIP to WebRTC bridge for LiveKit
124 stars 28 forks source link

outbound error #42

Open Hollymingyi opened 10 months ago

Hollymingyi commented 10 months ago

dear author, when i user outbound api to make call, it worked.but when i hangup the sip endpoint ,the livekit room still exist the sip endpoint ,the logs like below,

2024-01-08T16:32:31.693+0800    INFO    sip sip/client.go:106   Updating SIP participant    {"nodeID": "NE_GA43Q49fw2GT", "roomName": "29156024", "participant": "SP_VkqWhfWLn7iD", "from": "12345", "to": "0019373086225", "address": "10.2.14.199"}
2024-01-08T16:32:31.725+0800    INFO    logger/logger.go:250    received offer for subscriber   {"nodeID": "NE_GA43Q49fw2GT"}
2024-01-08T16:32:31.770+0800    INFO    logger/logger.go:250    ICE connected   {"nodeID": "NE_GA43Q49fw2GT", "iceCandidatePair": "(local) udp4 host 172.28.0.1:40201 <-> (remote) udp4 prflx 10.2.15.102:1544 related :0"}
2024-01-08T16:32:31.779+0800    INFO    logger/logger.go:250    published track {"nodeID": "NE_GA43Q49fw2GT", "name": "zhanghe1", "source": "MICROPHONE"}
2024-01-08T16:32:31.782+0800    INFO    logger/logger.go:250    published track {"nodeID": "NE_GA43Q49fw2GT", "name": "zhanghe1-track", "source": "CAMERA"}
2024-01-08T16:32:31.807+0800    INFO    sip sip/outbound.go:156 Outbound SIP update complete    {"nodeID": "NE_GA43Q49fw2GT", "roomName": "29156024", "from": "12345", "to": "0019373086225", "address": "10.2.14.199"}
2024-01-08T16:32:31.868+0800    INFO    logger/logger.go:250    received offer for subscriber   {"nodeID": "NE_GA43Q49fw2GT"}
2024-01-08T16:32:31.880+0800    INFO    logger/logger.go:250    track subscribed    {"nodeID": "NE_GA43Q49fw2GT", "participant": "admin", "track": "TR_AMPCMfLBPUvhPa", "kind": "audio"}
2024-01-08T16:32:31.900+0800    INFO    logger/logger.go:250    track subscribed    {"nodeID": "NE_GA43Q49fw2GT", "participant": "admin", "track": "TR_VC6L2ZDccZNKHf", "kind": "video"}
2024-01-08T16:32:31.952+0800    INFO    logger/logger.go:250    successfully set publisher answer   {"nodeID": "NE_GA43Q49fw2GT"}
2024-01-08T16:32:32.253+0800    INFO    logger/logger.go:250    received offer for subscriber   {"nodeID": "NE_GA43Q49fw2GT"}
2024-01-08T16:32:52.670+0800    INFO    sip sip/inbound.go:153  BYE {"nodeID": "NE_GA43Q49fw2GT", "tag": "t2Q81Z9UaQ7ra"}

how should i resolve them?

dennwc commented 10 months ago

Do I understand correctly that your issues is that the LiveKit room is not removed after SIP call ends?

Currently it won't automatically delete the LiveKit room. This is by design, because it can be done by your application using LiveKit API.

On the other hand, the SIP participant in that room should disappear after call hangup. If it doesn't happen, then you probably hit a issue with BYE that we are currently fixing.

Hollymingyi commented 10 months ago

"On the other hand, the SIP participant in that room should disappear after call hangup. If it doesn't happen, then you probably hit a issue with BYE that we are currently fixing." yes that is exactly what my issue is , thank you,i will focus on the release log on github

dennwc commented 10 months ago

Call termination should now work properly for calls from SIP to LiveKit. Can you please check if it works on your end?

Hollymingyi commented 9 months ago

termination sh

which release get rid of it? the newest release have error like below:

ERROR livekit service/sip.go:199 cannot update sip participant {"error": "request timed out"} github.com/livekit/livekit-server/pkg/service.(SIPService).updateParticipant /workspace/pkg/service/sip.go:199 github.com/livekit/livekit-server/pkg/service.(SIPService).CreateSIPParticipant /workspace/pkg/service/sip.go:175 github.com/livekit/protocol/livekit.(sIPServer).serveCreateSIPParticipantProtobuf.func2 /go/pkg/mod/github.com/livekit/protocol@v1.9.4-0.20231221100346-e9e5fcd7d371/livekit/livekit_sip.twirp.go:2443 github.com/livekit/protocol/livekit.(sIPServer).serveCreateSIPParticipantProtobuf /go/pkg/mod/github.com/livekit/protocol@v1.9.4-0.20231221100346-e9e5fcd7d371/livekit/livekit_sip.twirp.go:2444 github.com/livekit/protocol/livekit.(sIPServer).serveCreateSIPParticipant /go/pkg/mod/github.com/livekit/protocol@v1.9.4-0.20231221100346-e9e5fcd7d371/livekit/livekit_sip.twirp.go:2305 github.com/livekit/protocol/livekit.(sIPServer).ServeHTTP /go/pkg/mod/github.com/livekit/protocol@v1.9.4-0.20231221100346-e9e5fcd7d371/livekit/livekit_sip.twirp.go:1197 net/http.(ServeMux).ServeHTTP /usr/local/go/src/net/http/server.go:2514 github.com/urfave/negroni/v3.(Negroni).UseHandler.Wrap.func1 /go/pkg/mod/github.com/urfave/negroni/v3@v3.0.0/negroni.go:59 github.com/urfave/negroni/v3.HandlerFunc.ServeHTTP /go/pkg/mod/github.com/urfave/negroni/v3@v3.0.0/negroni.go:33 github.com/urfave/negroni/v3.middleware.ServeHTTP /go/pkg/mod/github.com/urfave/negroni/v3@v3.0.0/negroni.go:51

Hollymingyi commented 9 months ago

Call termination should now work properly for calls from SIP to LiveKit. Can you please check if it works on your end?

did you mean terminate the call manually?

Hollymingyi commented 9 months ago

when i ended the sip call by hangup the sip phone, it still exist in the room. which commit should i checkout to resolve this bug