20 Apr
2010
20 Apr
'10
5:34 p.m.
For outbound calls to the PSTN, we might need to strip a leading "9". For inbound calls, we might need to convert 10 digit DID's to internal 4 digit directory numbers.
Those are two of the most common examples we encounter.
Regex group matches? That's how I do it... <condition field="destination_number" expression="^(?:1{0,1})(403|587)(\d{7})$"> ... <action application="bridge" data="sofia/gateway/foo.ca/1$1$2|$1$2@bar.local:5060"/> Just an example how I dial as needed from a more flexible input...