Share via


SipRoutingClient.GetRoutesForNumberAsync Method

Definition

Gets the list of routes matching the target phone number, ordered by priority.

public virtual System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.Communication.PhoneNumbers.SipRouting.SipTrunkRoute>>> GetRoutesForNumberAsync(string targetPhoneNumber, System.Collections.Generic.IEnumerable<Azure.Communication.PhoneNumbers.SipRouting.SipTrunkRoute> routes, System.Threading.CancellationToken cancellationToken = default);
abstract member GetRoutesForNumberAsync : string * seq<Azure.Communication.PhoneNumbers.SipRouting.SipTrunkRoute> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.Communication.PhoneNumbers.SipRouting.SipTrunkRoute>>>
override this.GetRoutesForNumberAsync : string * seq<Azure.Communication.PhoneNumbers.SipRouting.SipTrunkRoute> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.Communication.PhoneNumbers.SipRouting.SipTrunkRoute>>>
Public Overridable Function GetRoutesForNumberAsync (targetPhoneNumber As String, routes As IEnumerable(Of SipTrunkRoute), Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of IReadOnlyList(Of SipTrunkRoute)))

Parameters

targetPhoneNumber
String

Phone number to test routing patterns against.

routes
IEnumerable<SipTrunkRoute>

New list of SipTrunkRoute.

cancellationToken
CancellationToken

Optional cancellation token.

Returns

Applies to