Applying call whisper for all calls

We use an asterisk system for my company, and it works great. But part of our business is done by forwarding phone calls from customers to clients. We tag all our calls that are for this purpose ( we use unique toll-free numbers for each client) with a little sound byte that is played to the client. This sound byte lets the client know that this customer is coming from us, and gives them an immediate felling of “I’m getting my money’s worth.” Currently I edit the config’s every time we add or drop a client. The code snippet looks like such:

; Call forwarding for Client (ID# 393)
exten => 8005555555,1,Noop(Client Company 1)
exten => 8005555555,2,Dial(ZAP/g3/5555555555,,A(/var/lib/asterisk/whisper))
exten => 8005555555,3,Hangup()

The 800 number is the one customer’s call, and the 555 is the client’s number. This code lets incoming calls to be connected to the right client, and play the “whisper” before they’re connected.

Problem is, load is increasing from several angels, and I want to move this call forwarding service to its own dedicated box. Sense it is going to be dedicated, I would like to just have the box apply this to ANY calls made from it. This way I can use an interface like asteriskNOW and just use the GUI to right incoming call rules instead of copy/pasting code several times a day.

Thanks in advance for any pointers.

:smile:

Do you have a database which has the mappings somewhere? If so you can either use func_odbc or AGI to do the lookups dynamically.

For example:

exten => _NXXNXXXXXX,1,AGI(destination_lookup.agi) exten => _NXXNXXXXXX,n,NoOp(${CUSTOMER}) ; Which is set in the agi exten => _NXXNXXXXXX,n,Dial(ZAP/g3/${DESTINATION},,A(/var/lib/asterisk/whisper)); DESTINATION is also set in the AGI exten => _NXXNXXXXXX,n,Hangup()

[quote=“davevg”]Do you have a database which has the mappings somewhere? If so you can either use func_odbc or AGI to do the lookups dynamically.

For example:

exten => _NXXNXXXXXX,1,AGI(destination_lookup.agi) exten => _NXXNXXXXXX,n,NoOp(${CUSTOMER}) ; Which is set in the agi exten => _NXXNXXXXXX,n,Dial(ZAP/g3/${DESTINATION},,A(/var/lib/asterisk/whisper)); DESTINATION is also set in the AGI exten => _NXXNXXXXXX,n,Hangup()[/quote]

Wow, that would be awesome! Could you point me in the general direction of any AGI script tutorials? Thanks!

The wiki has some links to some examples. voip-info.org/wiki-Asterisk+AGI

The “Asterisk: The Future of Telephony” book touches on it quite a bit as well in chapter 9.
oreilly.com/catalog/9780596510480/