<div>Hi Adriano,</div>
<div> </div>
<div>I agree with Time Bandit - AGI is what you are looking for. I recently had a similar scenario where I had the check the cid of every customer calling to a support qeue and check the payment status against a windows CRM app. if the customer has an unsettled debt the call is redirected to sales rep.
<br>The call flow in your case should be something like this:</div>
<div>- Answer call.</div>
<div>- depending on the API available to the legacy VB app (or AS/400 directly) you can either write a local script on the * server to perform the query or host a FastAGI script on the VB app server (or on any other server that can perform the DB query).
</div>
<div>- The script input is the cid and the "output" should be a channel variable assigned to operator exten.</div>
<div>- Dial the right operator based on the channel variable assigned by the script (you can also dial the operator within the AGI - but it better to keep AGI as simple as possible and run as little time as possible.</div>
<div> </div>
<div>one last tip - keep in mind that cid is not always available (presentation restricted) or customer may be calling from different location (cellphone/office) which is not on your DB - so you might want to present an IVR menu that allows the customer to enter the cid for the requested service.
</div>
<div> </div>
<div>Joss</div>
<div> </div>
<div><span class="gmail_quote">On 4/27/07, <b class="gmail_sendername">adriano ghezzi</b> <<a href="mailto:adriano.ghezzi@gmail.com">adriano.ghezzi@gmail.com</a>> wrote:</span></div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">well more indeep the actual process is<br><br>myparser a php script connected "telnet" to aah manager get and parse events
<br>it grab cid from manager event (incoming call)<br>it passes cid to a legacy visual basic app that query a db on ibm as/400<br>the query return info about customer's status and opened tickets<br>now it should instruct asterisk to send the call to the right operator,
<br>because at the moment I'm not able to do it i do:<br>the call get dispatched "Normal way"<br>i wait the call ends, the php parser inform another (master vb app)<br>that open a pop-up on the pc of the operator that processed the call
<br>and update the customer'ts ticket<br><br>what i would like is to dispatch the call to a specific operator eg<br>the "preferred" customer's operator.<br><br>thanks to Brad.<br>ciao!<br><br><br><br><br>
2007/4/26, adriano ghezzi <<a href="mailto:adriano.ghezzi@gmail.com">adriano.ghezzi@gmail.com</a>>:<br>> Hy all<br>><br>> need to preprocess<br>> 1) incoming call get caller id lookup some info in my db,
<br>> 2) based on the result dispatch the call to the right operator<br>><br>> step 1 is ok I developped a small .php script that connect manager and<br>> parse events, now I have to tell AAH do dispatch call to the right
<br>> operator<br>><br>> questions<br>> 1) is this the right practice ?<br>> 2) where to find a complete manager api reference, (to buy too)<br>><br>> note that<br>> there is a legacy application that query the db actually php script
<br>> send the request to this app and wait for response<br>><br>> I'm a programmer at very first installation of AAH , just testing capabilities<br>><br>> thanks in advance for any help and suggestion.
<br>><br>_______________________________________________<br>--Bandwidth and Colocation provided by <a href="http://Easynews.com">Easynews.com</a> --<br><br>asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:
<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote><br>