Asterisk Manager Event order wrong

I have an app who uses Aterisk Manager to make outbound calls (originate command).
Worked fine on 1.2
Now on 1.4 i notice that event DIAL is showing after event OriginateResponse, when it should show first.
Is this a confirmed bug?
I will have to go back to 1.2 if there is no workaround or fix for this.

are you sure it’s a ‘bug’? i have never seen documentation which clearly described the order in which manager messages are supposed to be sent.

i have a feeling that changes to the asterisk core have made things occur in a different order. that being said, i doubt there is going to be a ‘fix’ for this.

perhaps you could evaluate a code modification on your system to deal with the new condition. the features and enhancements in version 1.4 and 1.6 are certainly worth the effort (IMO).

Well, for any Call center Application work fine, events of a call must be in a correct order.
What is the usefull of receiving DIAL event, after get a OriginateResponse (answer, busy,etc).
A call order is: Pickup, dial, call progress (ringing), answer/busy/…, hangup
How can i certify a call was dialed if this event only shows after an OriginateResponse.

OK, I just took a quick look at my application and I have confirmed that I am recieving messages in the order you are EXPECTING them in. Meaning, I am not experiencing the ‘problem’ you have reported. I do have a theory. Here is the order of my messages:

[send originate request via AMI]

[answer the phone]

I dial through Local/ channels, so there are probably a few extra events if you aren’t doing that… but the bottom line is that I received the Dial before the OriginateResponse.

Are you properly using the async=true flag in the originate response? If you don’t set that, all the manager events will be blocked until the OriginateResponse is sent, I assume the Dial is included.

Yes, i’m using async=true.
I confirmed this issue in 2 installation.
Try using direct AMI.
Logon, place an originate command, and dont answer call.
Look for Dial event, will not be ther.
Then answer the call and evend Dial will be generated.
Please test this and if not occurs like i said reply to me.

i got the dial event while my phone was ringing… doesn’t matter if i answer or not, still get the event immediately after the asterisk system receives the Originate request.

Are you dialing through Local/ channels, or are you dialing the extension directly?

Here is a sampe:

Action: Originate
Channel: SIP/300
Context: default
Exten: 200
Priority: 1
Callerid: 200
Timeout: 30000
Async: yes

OK, I have confirmed your scenario. When you dial without the Local/ channels you don’t get the Dial event until there is an answer.

It seems that you have at least one options, which is to Dial using a Local channel… which is the way I do things, but that may be too much of a change for you.

i’m kind a new in asterisk.
What do you mean with local channel?
Thanks a lot … l+channels

read up a bit and then i would be happy to answer specific questions you have.

It works.
Anyway i think this is a bug.

Thanks a lot.

i would tend to agree with you about the bug. you should file it under the digium bugs site.