[Asterisk-Users] AGI Dial Plan

Jean-Michel Hiver jhiver at ykoz.net
Mon Apr 4 00:00:41 MST 2005


Lee Lee wrote:

> Hi everyone
>  
> Presently all our calls are channel to one provider and we would like 
> to change that based on LCR.
>  
> the following is what we have presently;
>  


> # Dial the requested number, if we got something from the caller.
> if ($dialto != "")
> {
>         $AGI->exec('SetAccount', $accountnum);
>         if ($debug) { $AGI->exec('NoOp', "\"Dialing $dialto... \""); }

            if ($dialto =~ /^416/) {

>         $AGI->exec('Dial', "Zap/g2/$dialto|30|C");

            } else { $AGI->exec('Dial', "Zap/g1/$dialto|30|C") }

> }
> $AGI->hangup();


Cheers,
Jean-Michel.

-- 
Ykoz Un Max - La VoIP en pré-payé!
Essayez gratuitement - 5 crédits offerts.
---> http://ykoz.net/voip/max <---






More information about the asterisk-users mailing list