[Asterisk-Users] cepstral integration with * using AGI?

John Millican john at millican.us
Mon Jan 24 14:42:19 MST 2005


On Monday January 24 2005 3:29 pm, John Middleton wrote:
> Hi, I've looked at the Wiki for this, have seen the Swift.agi
> details, but has anyone got a current script for Cepstral and an
> example of integraton in * please?
>
> I'm a * and linux newbie, so please be gentle ;-)
>
> Thanks
>
> John

I just put swift.agi in agi-bin and used a c++ script to do a db 
look-up in postgres for the information that i wanted read to the 
user, i.e user name and other info based on caller id number. I pass 
calleridnum to the c++ script and then use SETVAR in the script to 
get the info back and read it to the user. recfound is set to 1 if 
any record in the db.
 Extensions .conf look somewhat like this:

[answerMain]
exten => s,1,Ringing()			; Send Ring tone to caller
exten => s,2,Wait,5				; Wait a 5 seconds to get a ring or two
exten => s,3,Answer				; Answer the line
exten => s,4,DigitTimeout,5		; Set Digit Timeout to 5 seconds
exten => s,5,ResponseTimeout,10	; Set Response Timeout to 10 seconds
exten => s,6,PrivacyManager
exten => s,7,agi,c++script.cpp|${CALLERIDNUM}; //does db lookup
exten => s,8,GoToIf($[${RECFOUND} > 0]?9:17); // if found a record 
exten => s,9,agi,swift.agi|Welcome to the Reservation System.  We will 
be placing a reservation for  ${varname}.; 
exten => s,10,read(foo,static recording,1); //wait for user input of 1 
digit

I us QT for writting the script but it is just a simple C++ script, 
subject for different mail list.
John M




More information about the asterisk-users mailing list