When I Originate over the AMI (Asterisk 1.4) I don’t see any state/event changes over the same socket until the call is actually answered - which makes it really hard to pull out uniqueid. This is the command I’m passing in:
Action: Login UserName: baidkal Secret: 2coools Action: Events EventMask: on Action: Originate Channel: IAX2/test/4479143.... <--- full phone number here WaitTime: 0 Context: conferences Exten: 123434 Priority: 1
At this point the phone starts ringing, the CLI shows the call going up, another screen I have with a telnet connection to :5038 shows the events flowing past, but ^^this screen just blocks until the call is actualy answered - at which point all the Newchannel and Event messages all pile in at the same time. Ultimately I want to drive AMI with some perl/IO, but it will fail to register the initial change in call status and the call’s uniqueid until I can find a fix to this problem.
I would be grateful if somebody could try telnetting to their port 5038 and stuffing anoriginate in to see if you get ‘State: Ringing’ back over the wire before picking up? However, be sure to watch the same connection - it seems to be fine on a secondary listening connection.
Thanks for any ideas,
[edit - typo in the subject line is really annoying me now]