AMI Architecture

I have run into an unexpected behaivor of the AMI. I was expecting my AMI connection to be a free flowing stream of data in/out of the * system. What I just experienced leads me to believe that I actually need multiple AMI connections. Here is what happened:

I have my AGI client system setup to trap and deal with hangup events generated from *.

This all works fine, until i do an ORIGINATE via the AMI while I am on another call. If I hangup the first call before the ORIGINATE has finished my hangup packet doesn’t come until AFTER the result of the ORIGINATE.

It seems like it’s doing some type of internal queing on these messages:

Step1: INBOUND CALL
Step2: ORIGINATE OUTBOUND (send to AMI)
Step3: HANGUP INBOUND CALL (should receive event from AMI)
Step4: ORIGINATE SUCCEEED) (recieve result from AMI)
Step5: (now I receive the hangup from step 2)

anyone have any suggestions on how to deal with this?

thanks,

I’m an ami newb, but have you tried in your ami originiate the asynch = yes (or true?) command? Have a look at this setting at voipinfo.org. it may be what you are looking for.

Also is your client multi-threaded and coded to deal with asynchronous events?