[asterisk-dev] Using PreDial to modify destination number
Richard Mudgett
rmudgett at digium.com
Fri Sep 7 09:58:37 CDT 2012
> I just noticed the new cool PreDial feature in Asterisk 11 from
> ASTERISK-19548.
>
> I was thinking if I could use it to do target number mangling on
> per-target channel basis.
>
> The idea is that if I have multiple VoIP providers, one requires
> national format destination number and others international format. I
> could just in the sip.conf peer config block have something like
> "setvar=number_format=national", and then use that channel variable
> to
> define how a PreDial on callee channel would mangle the destination
> number.
>
> It would appear this is not (yet) possible. The question is if this a
> good or bad idea?
If I understand your idea, that is not valid. The dialed number is
a parameter to the Dial() application and not handled by the channel
itself. You have to do the target number mangling before the Dial().
Predial is intended to setup the outgoing channel with channel
variables and other channel parameters.
Richard
More information about the asterisk-dev
mailing list