Hi Peter,<br><br>Thanks for the response and help. Asterisks IS sending the OriginateResponse packet, but for whatever reason it never makes it into the while events loop. I confirmed that the OriginateResponse event is being sent both by ngrep and by manually opening a client connection with asterisks and mimicking a server with a telnet prompt.<br>
<br>the p event never gets fired for the OriginateResponse, so it must be something preventing it from getting to that line of code. The OriginateResponse event contains an ActionID, which I might guess might cause ami_event_handler to treat it as if it were a response from an action, rather than a typical event. could this be a possible cause? Any suggestions on how to fix it? <br>
<br>Again any help would be appreciated.<br><br>--matt<br><br><br>ami_event_server output<br>---------------------<br>cdr {:destination_channel=>"", :destination_context=>"default", :last_application=>"", :duration=>"0", :last_data=>"", :answer_time=>"", :channel=>"**Unknown**", :billable_seconds=>"0", :privilege=>"call,all", :ama_flags=>"DOCUMENTATION", :disposition=>"FAILED", :user_field=>"", :account_code=>"", :destination=>"s", :event=>"Cdr", :caller_id=>"", :source=>"", :start_time=>"2008-05-27 14:37:33", :end_time=>"2008-05-27 14:37:33", :unique_id=>"1211913453.1"}<br>
{:destination_channel=>"", :destination_context=>"default", :last_application=>"", :duration=>"0", :last_data=>"", :answer_time=>"", :channel=>"**Unknown**", :billable_seconds=>"0", :privilege=>"call,all", :ama_flags=>"DOCUMENTATION", :disposition=>"FAILED", :user_field=>"", :account_code=>"", :destination=>"s", :event=>"Cdr", :caller_id=>"", :source=>"", :start_time=>"2008-05-27 14:38:30", :end_time=>"2008-05-27 14:38:30", :unique_id=>"1211913510.2"}<br>
<br>---------------------<br>cdr {:destination_channel=>"", :destination_context=>"default", :last_application=>"", :duration=>"0", :last_data=>"", :answer_time=>"", :channel=>"**Unknown**", :billable_seconds=>"0", :privilege=>"call,all", :ama_flags=>"DOCUMENTATION", :disposition=>"FAILED", :user_field=>"", :account_code=>"", :destination=>"s", :event=>"Cdr", :caller_id=>"", :source=>"", :start_time=>"2008-05-27 14:38:30", :end_time=>"2008-05-27 14:38:30", :unique_id=>"1211913510.2"}<br>
<br><br><br><br><br><br><br>ngrep output<br>------------------------------------------------------------------------------------------------<br><br>##<br>T <a href="http://127.0.0.1:40976">127.0.0.1:40976</a> -> <a href="http://127.0.0.1:9000">127.0.0.1:9000</a> [AP]<br>
......0......".do_action......i....Y..{.:.action:.originate:.priority".1:.channe l".SIP/sr6:<br>exteni.:<br>asyncT:.context".default......0<br>##<br>T <a href="http://127.0.0.1:49436">127.0.0.1:49436</a> -> <a href="http://127.0.0.1:5038">127.0.0.1:5038</a> [AP]<br>
Action: originate.<br><br>##<br>T <a href="http://127.0.0.1:49436">127.0.0.1:49436</a> -> <a href="http://127.0.0.1:5038">127.0.0.1:5038</a> [AP]<br>actionid: 1211913510.22177.<br>channel: SIP/sr6.<br>priority: 1.<br>context: default.<br>
async: true.<br>exten: 1.<br>.<br><br>##<br>T <a href="http://127.0.0.1:5038">127.0.0.1:5038</a> -> <a href="http://127.0.0.1:49436">127.0.0.1:49436</a> [AP]<br>Response: Success.<br><br>##<br>T <a href="http://127.0.0.1:5038">127.0.0.1:5038</a> -> <a href="http://127.0.0.1:49436">127.0.0.1:49436</a> [AP]<br>
ActionID: 1211913510.22177.<br><br>##<br>T <a href="http://127.0.0.1:5038">127.0.0.1:5038</a> -> <a href="http://127.0.0.1:49436">127.0.0.1:49436</a> [AP]<br>Message: Originate successfully queued.<br>.<br><br>##<br>T <a href="http://127.0.0.1:5038">127.0.0.1:5038</a> -> <a href="http://127.0.0.1:49436">127.0.0.1:49436</a> [AP]<br>
Event: Cdr.<br>Privilege: call,all.<br>AccountCode: .<br>Source: .<br>Destination: s.<br>DestinationContext: default.<br>CallerID: .<br>Channel: **Unknown**.<br>DestinationChannel: .<br>LastApplication: .<br>LastData: .<br>
StartTime: 2008-05-27 14:38:30.<br>AnswerTime: .<br>EndTime: 2008-05-27 14:38:30.<br>Duration: 0.<br>BillableSeconds: 0.<br>Disposition: FAILED.<br>AMAFlags: DOCUMENTATION.<br>UniqueID: 1211913510.2.<br>UserField: .<br>.<br>
<br>##<br>T <a href="http://127.0.0.1:5038">127.0.0.1:5038</a> -> <a href="http://127.0.0.1:49436">127.0.0.1:49436</a> [AP]<br>Event: OriginateResponse.<br>
Privilege: call,all.<br>
ActionID: 1211913510.22177.<br>
Response: Failure.<br>
Channel: SIP/sr6.<br>
Context: default.<br>
Exten: 1.<br>
Reason: 0.<br>
Uniqueid: <null>.<br>
CallerID: <unknown>.<br>
CallerIDNum: <unknown>.<br>
CallerIDName: <unknown>.<br>.<br><br>##<br>T <a href="http://127.0.0.1:9000">127.0.0.1:9000</a> -> <a href="http://127.0.0.1:40976">127.0.0.1:40976</a> [AP]<br>......T......o: Telegraph::AsteriskResponse.:.@results[.:.@message""Originate su ccessfully queued:.@attributes{.:.@successF:.@completeT:.@action_idf.1211913510. 22177.1{:.@events[.<br>
#<br>T <a href="http://127.0.0.1:9000">127.0.0.1:9000</a> -> <a href="http://127.0.0.1:40975">127.0.0.1:40975</a> [AP]<br>......T......[.{.:.last_data".:.ama_flags".DOCUMENTATION:.channel".**Unknown**:. destination".s:.start_time".2008-05-27 14:38:30:.unique_id".1211913510.2:.destin ation_context".default:.answer_time".:.privilege".call,all:.user_field".:.caller _id".:.end_time".2008-05-27 14:38:30:.disposition".FAILED:.destination_channel". :.duration".0:.source".:.last_application".:<br>
event".Cdr:.billable_seconds".0:.account_code".<br>##<br>T <a href="http://127.0.0.1:40975">127.0.0.1:40975</a> -> <a href="http://127.0.0.1:9000">127.0.0.1:9000</a> [AP]<br>......0......".get_next_events......i.......0<br>
<br><br><div class="gmail_quote">On Mon, May 26, 2008 at 5:45 AM, Peter P GMX <<a href="mailto:Prometheus001@gmx.net">Prometheus001@gmx.net</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello Matthew,<br>
<br>
can you see if the OriginateResponse event it arriving at your machine by using e.g. ngrep:<br>
<br>
ngrep -d any host <asterisk-ip> -W byline<br>
<br>
I once recognized that it is important to precisely look at the event which is coming from the asterisk in terms on upcase/lowercase letters<br>
<br>
You may also put a puts or p line into ami_server.rb in the watch_for_events method to see if the event is arriving or not<br>
e.g.<br>
while events = @client.get_next_events<br>
for event in events<br>
p event<br>
.<br>
.<br>
.<br>
<br>
Best regards<br>
Peter<br>
<br>
Matthew Fong schrieb:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="Wj3C7c">
I'm trying to access the AMI Event OriginateResponse<br>
<br>
in my ami_logic file I have<br>
<br>
def originate_response<br>
puts '---------------------'<br>
puts "OriginateResponse #{params.inspect}"<br>
end<br>
<br>
but it's not getting fired when it receives an OriginateResponse response. Any ideas why? Other obscure events like JabberEvent works when defined as jabber_event, I can't figure out why OriginateResponse has problems.<br>
<br>
OriginateResponse is an AMI Event triggered by an AMI originate with async set to true<br>
<br>
Any help would be greatly apperciated.<br>
<br>
--matt<br></div></div>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
Telegraph-users mailing list<br>
<a href="mailto:Telegraph-users@rubyforge.org" target="_blank">Telegraph-users@rubyforge.org</a><br>
<a href="http://rubyforge.org/mailman/listinfo/telegraph-users" target="_blank">http://rubyforge.org/mailman/listinfo/telegraph-users</a><br>
<br>
</blockquote>
</blockquote></div><br>