clever-spoon-27564
08/18/2025, 8:43 AMinbound_numbers parameter.
The documentation for inbound_numbers states: “if set, the dispatch rule only accepts calls made to numbers in the list”. However, what I’m observing is that calls are being filtered by the calling number, not the called number.
Should the documentation instead read “the dispatch rule only accepts calls made from numbers in the list”, or is this a possible implementation issue?
This behavior was also reported here: https://github.com/livekit/sip/issues/362refined-appointment-81829
08/18/2025, 12:59 PMST_ and SD_clever-spoon-27564
08/18/2025, 1:24 PMrefined-appointment-81829
08/18/2025, 1:25 PMrefined-appointment-81829
08/18/2025, 1:27 PMclever-spoon-27564
08/18/2025, 1:32 PMinbound_numbers parameter, but from my tests it seems it is checking the calling number (i.e. the user's number) and not the called number (i.e. the agent's number).refined-appointment-81829
08/18/2025, 1:43 PMrefined-appointment-81829
08/18/2025, 1:44 PMclever-spoon-27564
08/18/2025, 1:46 PMclever-spoon-27564
08/18/2025, 1:48 PMrefined-appointment-81829
08/18/2025, 1:54 PMclever-spoon-27564
08/18/2025, 1:59 PMinbound_numbers parameter. Am I supposed to use that to associate a number to a dispatch rule which in turn is associated to an agent?refined-appointment-81829
08/18/2025, 5:24 PMinbound_numbers field in the SIP dispatch rule is used to specify which phone numbers the dispatch rule will accept calls from. This means that the numbers listed in inbound_numbers are the phone numbers that the dispatch rule will respond to when a call is made.
In the context of your question, the inbound_numbers are for the caller's phone numbers, not the agent's number. If a call comes in from a number that is not included in the inbound_numbers list, the dispatch rule will not accept that call.
Here is a relevant excerpt from the documentation:
| inbound_numbers | array<string> | If this list is included, the dispatch rule only accepts calls made to the numbers in the list. |
This indicates that the dispatch rule will only accept calls from the numbers specified in the inbound_numbers array.
Example of Handling Inbound Numbers
When creating a dispatch rule, you might specify the `inbound_numbers`like this:
{
"name": "My Dispatch Rule",
"inbound_numbers": [
"+14155550100",
"+17145550100"
],
"hide_phone_number": false,
"metadata": "example-metadata"
}
In this example, only calls coming from +14155550100 or +17145550100 will be accepted by this dispatch rule.
Code Handling
The actual handling of the inbound_numbers would typically occur in the backend logic where the dispatch rules are evaluated. For example, when a call is received, the system checks if the calling number is in the inbound_numbers list before proceeding with the dispatch logic.
Here is a simplified example of how this might look in code:
func EvaluateDispatchRule(call Call) (DispatchResult, error) {
for _, number := range dispatchRule.InboundNumbers {
if call.CallingNumber == number {
// Accept the call
return DispatchResult{Accepted: true}, nil
}
}
// Reject the call
return DispatchResult{Accepted: false}, nil
}
In this code, the EvaluateDispatchRule function checks if the CallingNumber from the incoming call matches any of the numbers in the InboundNumbers list.
Conclusion
To summarize, the inbound_numbers are for the caller's phone numbers, and they determine which calls the dispatch rule will accept. The handling of these numbers occurs in the backend logic that evaluates incoming calls against the dispatch rules.refined-appointment-81829
08/18/2025, 5:45 PMclever-spoon-27564
08/19/2025, 7:04 AM