sip icon indicating copy to clipboard operation
sip copied to clipboard

Rejecting inbound flood

Open skotow opened this issue 6 months ago • 1 comments

Starting SIP server sip --config=config.yaml

Everything was working great . Now suddenly getting
DEBUG sip sip/inbound.go:429 Rejecting inbound flood {"nodeID": "NE_5LFaTYmsatTj", "callID": "SCL_9BZYVhVbWg8s", "fromIP": "xxxxxxx" I tried allow specific IP , also all IPs still same result .

Is there a bug or something missing ? Also creating new SipTrunkID returning same result

skotow avatar May 18 '25 18:05 skotow

I have made type in Dispatch rule with number and that was cause me issues . But I figure out that you have typo in docs

https://docs.livekit.io/sip/api/#createsipdispatchrule

inbound_numbers array If set, the dispatch rule only accepts calls made to numbers in the list.

If set, the dispatch rule only accepts calls made to numbers in the list. - is misleading instate of to numbers is should be from numbers

Please update

From If set, the dispatch rule only accepts calls made to numbers in the list.

To If set, the dispatch rule only accepts calls made from numbers in the list.

skotow avatar May 18 '25 19:05 skotow

Is it a typo in the docs or inbound_numbers should actually filter by the callee number?

arpesenti avatar Jul 31 '25 04:07 arpesenti

In https://github.com/livekit/protocol/blob/f44a41e4fd30e487f3e4dd94044104db9f48a7d3/sip/sip.go#L733 The check is on the CallingNumber. Shouldn’t be on the CalledNumber? If we assume the documentation is correct.

arpesenti avatar Jul 31 '25 04:07 arpesenti

any updates in this issue

yasserkh2 avatar Aug 12 '25 08:08 yasserkh2

I have opened a pull request for trying to fix this (livekit/protocol#1162) but the tests are failing. I am not sure which is the expected behaviour, if the one from the documentation or the one from the current implementation.

arpesenti avatar Aug 18 '25 07:08 arpesenti

Thank you all for raising this issue. The check is for "from numbers" here -> https://github.com/livekit/protocol/blob/main/sip/sip.go#L733 . The filter for called numbers happens at the Trunk level. So that PR though very appreciated @arpesenti is not needed. We've gone ahead and updated the docs. I'm going to go ahead and close this.

nishadmusthafa avatar Aug 19 '25 02:08 nishadmusthafa

Understood, thanks for clarifying.

arpesenti avatar Aug 19 '25 07:08 arpesenti

@nishadmusthafa Was the documentation updated?

I still see the confusing message in LiveKit cloud Image

The current behavior is that the dispatch rule with inboundNumbers matches only calls made FROM numbers in the list.

yaniv-peretz avatar Sep 09 '25 14:09 yaniv-peretz

Hey @yaniv-peretz , yupp, we did update the docs. Image

That doesn't sound right. @rektdeckard , would you be able to help fix that in Livekit Cloud ?

nishadmusthafa avatar Sep 09 '25 14:09 nishadmusthafa

👍 , same, not update here as well

Image

yaniv-peretz avatar Sep 09 '25 16:09 yaniv-peretz