Gateway routing table examples
Dialogic® Vision™ CX Video Gateway Administration Manual
Extracting numbers from incoming SIP numbers
This example shows how to extract numbers from incoming SIP numbers and
convert them, if necessary, to full international (US eleven-digit) format for outgoing
PSTN calls:
•
Eleven-digit numbers are passed through as is.
•
Ten-digit numbers insert the US country code (1).
•
Seven-digit numbers insert both the area code (847) and country code (1).
ID
To incoming
From incoming
Mode
To outgoing
From outgoing
1
sip:(\d{11})@.*
sip:(\d{11})@.*
Route
tel:$1
tel:$1
2
sip:(\d{10})@.*
sip:(\d{10})@.*
Route
tel:1$1
tel:1$1
3
sip:(\d{7})@.*
sip:(\d{7})@.*
Route
tel:1847$1
tel:1847$1
The following rules are used in this example:
Rule
Description
1
Matches and captures any SIP From/To numbers containing exactly eleven digits, and inserts
the numbers into PSTN calling/called numbers/called numbers.
2
Matches and captures any SIP From/To numbers containing exactly ten digits, prefixes one (1),
and inserts the numbers into PSTN calling/called numbers/called numbers.
3
Matches and captures any SIP From/To numbers containing exactly seven digits, prefixes 1847,
and inserts the numbers into PSTN calling/called numbers.
Sample Input/Output: Incoming SIP call
From: sip:[email protected] => tel:18479258900 (rule 2 match)
To: sip:[email protected] => tel:15082711000
From: sip:[email protected] => tel:18479258900 (rule 3 match)
To: sip:[email protected] => tel:18472711000
78
Dialogic