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

Reply via email to