[Asterisk-Dev] Route Calls Based on Caller ID [RE-SEND]

Bryce Chidester Bryce at BryceCo.Net
Tue Aug 2 20:54:07 MST 2005


List bounced this, Diagnostic-Code: X-Postfix; mail forwarding loop for
asterisk-dev at lists.digium.com

-------- Forwarded Message --------
From: Bryce Chidester <bryce at rhinoequipment.com>
Reply-To: Asterisk Developers Mailing List
<asterisk-dev at lists.digium.com>
To: Asterisk Developers Mailing List <asterisk-dev at lists.digium.com>,
asterisk at dlogan.net
Subject: Re: [Asterisk-Dev] Route Calls Based on Caller ID
Date: Tue, 02 Aug 2005 12:23:43 -0700

On Tue, 2005-08-02 at 11:46 -0400, Doug Logan wrote:
> Is there a good way to route calls based on CallerID, in an easily updatable format? 
> Eg, maybe a mySQL database where you have two fields, "pattern" and "extension". If the incoming call meets the pattern, then it is automatically sent to the given extension.
> 
> I'd like to use this to be able to, for example, route all incoming calls from 336 to the NC rep group, 860 to the CT reg group. I'd also like to be able to route a call from one of our big buyers, directly to a specific rep.
> 
> Ideally it would be great to have this in some sort of mySQL database that could be updated whenever, and the effects take place immediately, and a web interface could be built for.
> 
> 
> Are there any add-ons that do this, or something similiar I could modify? Thanks!
> 
> Doug Logan

Without moving to RealTime, you could send all incoming calls to a Macro
(or it could be done inside a context) that would take the area code
from ${CALLERIDNUM}, perform a MySQL fetch with the MySQL addon, and the
data returned from the database could be the name of a context to go to
to process the call for that destination, or even as simple as the
phones to ring. Then you'd just have the bailout priority go to a
default call-handling routine. I'd write up a brief example but things
are too busy here. Nonetheless, that should help you get started.




More information about the asterisk-dev mailing list