Dial Plans
37
Numbers are back references to match-groups of the regEx part accord-
ing to RFC2915.
Example
:
!(.+)!sip:\1!
inserts a
sip:
before the string (which is
the first match).
•
Flags
: Flags set additional processing attributes. The following flags are available:
Flag
Definition
d
Indicates that the number is complete and can be dialed.
Example
:
|([0-9]{5})|sip:\[email protected]|d
means that a number
with five digits will be dialed automatically.
i
Indicates that the comparisons should be done case-insensitive.
Dail Plan Examples
Table 1
Examples of Dial Plans
Goal
Pattern and Result
To make the phone dial a num-
ber when the pound (#) key is
pressed.
!([^#]+)#!sip:\1@\d!d
The dial plan entry will look for a pattern ending in a pound (#)
symbol and will use this as the user name in a SIP URI (not in-
cluding the # symbol).
To match an international number Put the
011
pattern at the front of the pattern:
|^011([0-9]*)$|sip:+\1@\d;phone=yes|
To add area codes
Example 1
: If the phone number has digits between 3 and 6,
then use an area code:
|^([0-9]{3,4})$|sip:030\1@\d””|^([0-9]
{5,6})$|sip:030\1@\d
Example 2
: Use an area code all the time:
|^([0-9])$|sip:030\1@\d
To call a complete URI
This is a little bit more difficult because of the number of allowed
characters in the user name. The following characters can be a
base for such a dial plan entry:
|^([a-zA-Z0-9&=+\$,;?\-_.!~*‘()%]+@.+)|sip:\1|
www.InternetVoipPhone.co.uk | [email protected] | 0800 088 48 46