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... \""); } $AGI->exec('Dial', "Zap/g2/$dialto|30|C"); } $AGI->hangup(); How do i make AGI dial to g1 in the event that user enter area code 416 ? any assistant is greatly appreciated regards --------------------------------- Do you Yahoo!? Better first dates. More second dates. Yahoo! Personals -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050403/68916c7a/attachment.htm
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 <---