Question

i have VoIP infrastructure in company, end points can dial mobile numbers in this case:

they call 9... they wait for pstn dial ton...after dial-ton they can dial their number.

i do this in this way:

exten => 9,1,dial(sip/8003)

witch sip/8003 is a sip account that is connected to FXO gateway and connected to asterisk via sip trunk.

i want to do this: the end points dial:

909121111111

instead of

9... after-dialton.... 09121111111

Was it helpful?

Solution

Without having seen more of your dial plan, typically what you can do is, in an accessible context, a way to dial the whole thing -- and then use a substring to strip out parts of it.

exten => _9XXXXXXXXXX,1,Dial(SIP/8003/${EXTEN:1})

The first part of the extension matches a 10-digit number prefixed with a 9: _9XXXXXXXXXX. Check out the article on pattern matching on the Asterisk wiki

Next, on our dial application, what we do is dial your sip device, but, we pass it back the dialed extension, but, notice the colon? Like ${EXTEN:1} That's to strip digits. Namely it strips the first digit. You can learn more about manipulating variables on the wiki, too.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top