Page 1 of 1

AGI Script on inbound call

PostPosted: Fri Mar 13, 2015 9:43 am
by jshasteen
I would like to have an AGI script run before a call is sent to an InGroup. The simple AGI script will perform a database lookup to see if the caller id exists in the database and play one message if the number exists and another audio message if the number does not exist. If the number does already exist in the database the call will be passed to an InGroup. If the number does not exist that call will get hung up after a brief message is played.

How can I set this up in Vicidial? Do I just need to have the agi script run before AGI(agi-DID_route.agi) in the dialplan?

Re: AGI Script on inbound call

PostPosted: Fri Mar 13, 2015 10:04 am
by mflorell
Yes you can set that up. Just change this:

exten => _X.,1,AGI(agi-DID_route.agi)


to this:

exten => _X.,1,AGI(agi-new.agi)
exten => _X.,n,AGI(agi-DID_route.agi)


in the [trunkinbound] context in extensions.conf, and have the DID route normally from there

Re: AGI Script on inbound call

PostPosted: Fri Mar 13, 2015 10:16 am
by jshasteen
Nice, thanks for the help!