Re: [asterisk-users] call dispatching - legacy application
need to preprocess 1) incoming call get caller id lookup some info in my db, 2) based on the result dispatch the call to the right operator step 1 is ok I developped a small .php script that connect manager and parse events, now I have to tell AAH do dispatch call to the right operator From your incoming context, call an AGI and pass it the CallerID. In the AGI, query your DB to find your destination then set an Asterisk variable with the destination. In your dialplan, take that destination and dial it. Something like exten = s,1,Answer ; Answer the line exten = s,n,Wait,1 exten = s,n,AGI(aginame.php,${CALLERID(num)}) exten = s,n,Dial(Local/${MYDESTINATION}) exten = s,n,Hangup() N.B.: Code not tested and written from the top of my head N.B.2: Since you're using AAH, you should put that in extension_custom.conf Also, have a look at the PHPAGI class : http://phpagi.sourceforge.net/ hth ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] call dispatching - legacy application
Hy all need to preprocess 1) incoming call get caller id lookup some info in my db, 2) based on the result dispatch the call to the right operator step 1 is ok I developped a small .php script that connect manager and parse events, now I have to tell AAH do dispatch call to the right operator questions 1) is this the right practice ? 2) where to find a complete manager api reference, (to buy too) note that there is a legacy application that query the db actually php script send the request to this app and wait for response I'm a programmer at very first installation of AAH , just testing capabilities thanks in advance for any help and suggestion. ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
RE: [asterisk-users] call dispatching - legacy application
Then you take the number you get from your database and put it into the asterisk spooler. Remember, the temp file you create has to be moved to the spooler using the mv command. Nothing else works. There might be one other step, I am not sure with Asterisk 1.4. I had a friend help me do it before and he said he had to write a little piece of python code to make it work properly (we were making asterisk call phone automatically). I am not sure if you will need this or not. I know the process because I had it done for me before. I am at the beginning trying to do the same thing, though my php is rusty. Maybe you can hook a brother up with the proper code to grab caller id and query mysql? To answer your question, Yes, you are on the right track! Brad [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of adriano ghezzi Sent: Wednesday, April 25, 2007 6:13 PM To: asterisk users Subject: [asterisk-users] call dispatching - legacy application Hy all need to preprocess 1) incoming call get caller id lookup some info in my db, 2) based on the result dispatch the call to the right operator step 1 is ok I developped a small .php script that connect manager and parse events, now I have to tell AAH do dispatch call to the right operator questions 1) is this the right practice ? 2) where to find a complete manager api reference, (to buy too) note that there is a legacy application that query the db actually php script send the request to this app and wait for response I'm a programmer at very first installation of AAH , just testing capabilities thanks in advance for any help and suggestion. ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users