Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

publish error #41

Open
Hollymingyi opened this issue Jan 5, 2024 · 3 comments
Open

publish error #41

Hollymingyi opened this issue Jan 5, 2024 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@Hollymingyi
Copy link

Hollymingyi commented Jan 5, 2024

dear author,
when i try to call into livekit server via sip , sip message all is well ,but there have no rtp, and then i found some error at livekit server logs like below:

ERROR	livekit	supervisor/participant_supervisor.go:156	supervisor error on publication	{"room": "61292176", "roomID": "RM_NTkKjFfcxNWu", "participant": "Phone 019373086225", "pID": "PA_jCqLtQ6xKU9i", "remote": false, "trackID": "TR_AMiP8T369YkEsV", "error": "publish time out"}
github.com/livekit/livekit-server/pkg/rtc/supervisor.(*ParticipantSupervisor).checkPublications
	/workspace/pkg/rtc/supervisor/participant_supervisor.go:156
github.com/livekit/livekit-server/pkg/rtc/supervisor.(*ParticipantSupervisor).checkState
	/workspace/pkg/rtc/supervisor/participant_supervisor.go:145

could u give me some advice to solve them ?

@dennwc dennwc self-assigned this Jan 5, 2024
@dennwc
Copy link
Contributor

dennwc commented Jan 8, 2024

Did you solve this one? It may be an issue with communication between LiveKit server and SIP bridge.

@dennwc dennwc added the question Further information is requested label Jan 11, 2024
@baozaolaoba-top
Copy link

@dennwc hello, i have the same problem.
image

image

env:

  1. sip device(just one button)(192.168.210.216, number:100), push button will call 102.
  2. livekit and livekit-sip, 192.168.210.218, sip device connect livekit-sip directly.

sipTrunk.json:

{
  "outbound_address": "192.168.210.218",
  "outbound_number": "102",
  "outbound_username": "102",
  "outbound_password": "102",
  "inbound_addresses": [],
  "inbound_numbers_regex": [],
  "inbound_username": "",
  "inbound_password": ""
}

sipDispatchRule.json:

{
	"trunk_ids": [],
	"hide_phone_number": false,
	"rule": {
		"dispatchRuleDirect": {
			"roomName": "room",
			"pin": ""
		}
	}
}

btw: i add regisiter method for sip device.

	s.sipSrv.OnRegister(s.onRegister)

func (s *Server) onRegister(req *sip.Request, tx sip.ServerTransaction) {
	tx.Respond(sip.NewResponseFromRequest(req, 200, "OK", nil))
}

offer

v=0
o=- 6568413396674405344 1710322239 IN IP4 0.0.0.0
s=-
t=0 0
a=fingerprint:sha-256 BA:14:34:BC:59:E2:E2:0C:CB:57:C2:38:77:C0:5A:0B:12:F9:05:52:72:8F:0F:F1:F3:00:A1:7F:6F:29:DE:A2
a=extmap-allow-mixed
a=group:BUNDLE 0 1
m=audio 9 UDP/TLS/RTP/SAVPF 111 9 0 8
c=IN IP4 0.0.0.0
a=setup:actpass
a=mid:0
a=ice-ufrag:hyihwHBfyrlkscFN
a=ice-pwd:kEWuOtclnwQAOUTsKgMKnQuuINXZZvAC
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:111 opus/48000/2
a=fmtp:111 minptime=10;useinbandfec=1
a=rtcp-fb:111 transport-cc 
a=rtpmap:9 G722/8000
a=rtcp-fb:9 transport-cc 
a=rtpmap:0 PCMU/8000
a=rtcp-fb:0 transport-cc 
a=rtpmap:8 PCMA/8000
a=rtcp-fb:8 transport-cc 
a=extmap:4 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=ssrc:4020137994 cname:pion
a=ssrc:4020137994 msid:pion audio
a=ssrc:4020137994 mslabel:pion
a=ssrc:4020137994 label:audio
a=msid:pion audio
a=sendonly
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=setup:actpass
a=mid:1
a=sendrecv
a=sctp-port:5000
a=ice-ufrag:hyihwHBfyrlkscFN
a=ice-pwd:kEWuOtclnwQAOUTsKgMKnQuuINXZZvAC

answer:

v=0
o=- 7234587461013722888 1710322239 IN IP4 0.0.0.0
s=-
t=0 0
a=fingerprint:sha-256 0E:12:6F:7F:E6:DA:3F:7B:03:9A:95:32:BC:D6:BF:F7:2D:B6:B3:B4:22:BF:7B:69:89:14:56:E3:C1:15:39:C3
a=extmap-allow-mixed
a=group:BUNDLE 0 1
m=audio 9 UDP/TLS/RTP/SAVPF 111
c=IN IP4 0.0.0.0
a=setup:active
a=mid:0
a=ice-ufrag:lkCwUJEldimiIeTD
a=ice-pwd:VvIJuvOkJzsQmlWuaZsNLRMsPmloVOIC
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:111 opus/48000/2
a=fmtp:111 minptime=10;useinbandfec=1;usedtx=1
a=rtcp-fb:111 transport-cc 
a=rtcp-fb:111 nack 
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=recvonly
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=setup:active
a=mid:1
a=sendrecv
a=sctp-port:5000
a=ice-ufrag:lkCwUJEldimiIeTD
a=ice-pwd:VvIJuvOkJzsQmlWuaZsNLRMsPmloVOIC

no media data from sip device to livekit-sip.


question 1: sipTrunk.json, is the config file correct?
question 2: Whether additional logic is required for sip devices to connect to livekit-sip directly?
question 3: What other information do I need to provide if I want to solve this problem?

I've been a big fan of yours since the beginning of 2019 and thank you for your contributions.

@dennwc
Copy link
Contributor

dennwc commented Mar 13, 2024

btw: i add register method for sip device.

I didn't look into this yet, tbh. I think it might work because your device doesn't need to accept calls, but it won't work for other use cases that imply REGISTER. We could probably merge this change under some temporary flag and do proper REGISTER support later.

sipTrunk.json, is the config file correct?

Yes, looks correct.

Whether additional logic is required for sip devices to connect to livekit-sip directly?

Not really. Your device can send username/password too, right? That should be enough.

What other information do I need to provide if I want to solve this problem?

At the moment I suspect the issue may be because of some firewall rules. On your screenshot, there's an ICMP packet from x.x.x.216 (the button) to x.x.x.218 (server) saying "destination port unreachable". So something is preventing proper communication between the two.

SIP server specifically check if RTP packets are flowing. If it detects that they don't, it may drop the call, which may later result in "publish time out" error, I believe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants