Convert an emergency number into a SIP URLThis pattern could look like this: !^ 911 $!sip:emergency @local !d
|
Separated by the exclamation mark, it contains the pattern for the 911 and the resulting SIP URI. The d flag indicates that there is no need to press the Ok key after dialling this number. Make the phone dial a number when the pound key is pressedThe pattern could look like this: This dial plan entry will look for a pattern ending in a pound symbol and use this as the user name in a SIP URI (not including the pound symbol). Matching an international numberJust put the 011 pattern at the front of the pattern, like in |^ 011 ([ 0 - 9 ]*)$|sip:+\ 1 @\d;phone=yes|
|
This pattern requires that the user presses the Ok key in order to start the call. Area codesExample 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: Make the phone dial a number if a certain number of digits have been reachedThe following dial plan entry could be used: |^ 1 ([ 0 - 9 ]{ 10 })$|sip:+ 1 \ 1 @\d;phone=yes|d
|
This pattern will look for a number starting with 1 and followed by ten digits. It will replace it with a URI that contain the hint to try an ENUM lookup first before sending it to the proxy. Calling a complete URIThis is a little bit more difficult because of the number of allowed characters in the user name. The following character can be base for such a dial plan entry |^([a-zA-Z0- 9 &=+\$,;?\-_.!~*‘()%]+@.+)|sip:\ 1 |
|
Separating * codes from normal numbersThis is sometimes desired e.g. a plan is needed to add a leading 0 to an outgoing number not starting with 0 e.g. 3039833104 should be dialled as 03039833104 but not 03039833104 be converted to 003039833104. One could use the following for this purpose: |^([ 1 - 9 ]{ 2 })([ 0 - 9 ]{ 6 ,})$|sip: 0 \ 1 \ 2 @\d
|
But if a start code is followed by a destination e.g. *7939833452, it is not desired to convert it to 07939833452, because the pbx is expected to get the whole string and use it accordingly. Hence we can concatenate a plan to the one above to look after such exceptions: "|^\*([0-9]*)$|sip:*\1@\d" "|^([1-9]{2})([0-9]{6,})$|sip:0\1\2@\d"
|
Separated by the exclamation mark, it contains the pattern for the 911 and the resulting SIP URI. The d flag indicates that there is no need to press the Ok key after dialling this number. Leading ZerosIf a number starts with 9 and has at least 8 further digits then use a leading Zero |^ 9 ([ 0 - 9 ]{ 8 })$|sip: 09 \ 1 @\d
|
If a number has 2 digits don't use a leading zero. When more than 2 digits use the leading zero |^([ 0 - 9 ]{ 3 ,})$|sip: 0 \ 1 @\d
|
Concatenate dial plansTo concatenate dialplans just write them one after another including "" quotes. You will get after concatenating the above two dialplans. "|^9([0-9]{8})$|sip:09\1@\d" "|^([0-9]{3,})$|sip:0\1@\d"
|
Dial a certain number with another outgoing identity|^ 911 |sip:emergency @provider .de|d
|
To change the + to 00|^\+([ 0 - 9 ]*)$|sip: 00 \ 1 @\d;phone=yes|
|
Allow calls only with a leading stringTo allow only calls to numbers with 9 at the beginning. All other numbers will be blocked. |^[^ 9 ]([ 0 - 9 ]{ 0 ,})$|sip:blocked\@\d
|
|