Skip to content

Instantly share code, notes, and snippets.

@system123
Created February 21, 2014 06:47
Show Gist options
  • Save system123/9129884 to your computer and use it in GitHub Desktop.
Save system123/9129884 to your computer and use it in GitHub Desktop.
Adhearsion event hooks not working call logs
AHN> [2014-02-21 08:48:54.649] INFO CallQueue: CALLING {"call_ref"=>"123", "number"=>"0741******"}
[2014-02-21 08:48:54.675] DEBUG Adhearsion::OutboundCall: @: Executing command #<Punchblock::Command::Dial target_call_id=nil, target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, headers={}, to="SIP/billing/0741******", from="OUTBOUND <123123123>", timeout=nil, join=nil>
[2014-02-21 08:48:54.838] INFO CallQueue: WAITING FOR SOME CALLS
[2014-02-21 08:48:54.885] DEBUG Adhearsion::OutboundCall: 5d8f4200-e4c4-4dd0-b311-593651ce1b3b@: Receiving message: #<Punchblock::Event::Asterisk::AMI::Event target_call_id="5d8f4200-e4c4-4dd0-b311-593651ce1b3b", target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, name="VarSet", headers={"Privilege"=>"dialplan,all", "Channel"=>"SIP/billing-000011d7", "Variable"=>"punchblock_call_id", "Value"=>"5d8f4200-e4c4-4dd0-b311-593651ce1b3b", "Uniqueid"=>"1392965020.62870"}>
[2014-02-21 08:48:54.891] DEBUG Adhearsion::OutboundCall: 5d8f4200-e4c4-4dd0-b311-593651ce1b3b@: Receiving message: #<Punchblock::Event::Asterisk::AMI::Event target_call_id="5d8f4200-e4c4-4dd0-b311-593651ce1b3b", target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, name="NewAccountCode", headers={"Privilege"=>"call,all", "Channel"=>"SIP/billing-000011d7", "Uniqueid"=>"1392965020.62870", "AccountCode"=>"", "OldAccountCode"=>""}>
[2014-02-21 08:48:54.896] DEBUG Adhearsion::OutboundCall: 5d8f4200-e4c4-4dd0-b311-593651ce1b3b@: Receiving message: #<Punchblock::Event::Asterisk::AMI::Event target_call_id="5d8f4200-e4c4-4dd0-b311-593651ce1b3b", target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, name="NewCallerid", headers={"Privilege"=>"call,all", "Channel"=>"SIP/billing-000011d7", "CallerIDNum"=>"123123123", "CallerIDName"=>"OUTBOUND", "Uniqueid"=>"1392965020.62870", "CID-CallingPres"=>"0 (Presentation Allowed, Not Screened)"}>
[2014-02-21 08:49:00.002] DEBUG Adhearsion::OutboundCall: 5d8f4200-e4c4-4dd0-b311-593651ce1b3b@: Receiving message: #<Punchblock::Event::Asterisk::AMI::Event target_call_id="5d8f4200-e4c4-4dd0-b311-593651ce1b3b", target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, name="Newstate", headers={"Privilege"=>"call,all", "Channel"=>"SIP/billing-000011d7", "ChannelState"=>"5", "ChannelStateDesc"=>"Ringing", "CallerIDNum"=>"123123123", "CallerIDName"=>"OUTBOUND", "ConnectedLineNum"=>"123123123", "ConnectedLineName"=>"OUTBOUND", "Uniqueid"=>"1392965020.62870"}>
[2014-02-21 08:49:00.005] DEBUG Adhearsion::OutboundCall: 5d8f4200-e4c4-4dd0-b311-593651ce1b3b@: Receiving message: #<Punchblock::Event::Ringing target_call_id="5d8f4200-e4c4-4dd0-b311-593651ce1b3b", target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, headers={}>
[2014-02-21 08:49:07.626] DEBUG Adhearsion::OutboundCall: 5d8f4200-e4c4-4dd0-b311-593651ce1b3b@: Receiving message: #<Punchblock::Event::Asterisk::AMI::Event target_call_id="5d8f4200-e4c4-4dd0-b311-593651ce1b3b", target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, name="ChannelUpdate", headers={"Privilege"=>"system,all", "Channel"=>"SIP/billing-000011d7", "Channeltype"=>"SIP", "Uniqueid"=>"1392965020.62870", "SIPcallid"=>"5cfa97ad3d71fa82075530000e2cc2da@196.41.122.15:5060", "SIPfullcontact"=>"sip:0741484437@196.41.122.19:5060", "Peername"=>"billing"}>
[2014-02-21 08:49:07.629] DEBUG Adhearsion::OutboundCall: 5d8f4200-e4c4-4dd0-b311-593651ce1b3b@: Receiving message: #<Punchblock::Event::Asterisk::AMI::Event target_call_id="5d8f4200-e4c4-4dd0-b311-593651ce1b3b", target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, name="Newstate", headers={"Privilege"=>"call,all", "Channel"=>"SIP/billing-000011d7", "ChannelState"=>"6", "ChannelStateDesc"=>"Up", "CallerIDNum"=>"123123123", "CallerIDName"=>"OUTBOUND", "ConnectedLineNum"=>"123123123", "ConnectedLineName"=>"OUTBOUND", "Uniqueid"=>"1392965020.62870"}>
[2014-02-21 08:49:07.634] DEBUG Adhearsion::OutboundCall: 5d8f4200-e4c4-4dd0-b311-593651ce1b3b@: Receiving message: #<Punchblock::Event::Asterisk::AMI::Event target_call_id="5d8f4200-e4c4-4dd0-b311-593651ce1b3b", target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, name="OriginateResponse", headers={"Privilege"=>"call,all", "ActionID"=>"e9011c69-0cc1-45a6-8e9f-98626cbc0ee9", "Response"=>"Success", "Channel"=>"SIP/billing-000011d7", "Context"=>"adhearsion-redirect", "Exten"=>"1", "Reason"=>"4", "Uniqueid"=>"1392965020.62870", "CallerIDNum"=>"123123123", "CallerIDName"=>"OUTBOUND"}>
[2014-02-21 08:49:07.637] DEBUG Adhearsion::OutboundCall: 5d8f4200-e4c4-4dd0-b311-593651ce1b3b@: Receiving message: #<Punchblock::Event::Asterisk::AMI::Event target_call_id="5d8f4200-e4c4-4dd0-b311-593651ce1b3b", target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, name="Newexten", headers={"Privilege"=>"dialplan,all", "Channel"=>"SIP/billing-000011d7", "Context"=>"adhearsion-redirect", "Extension"=>"1", "Priority"=>"1", "Application"=>"AGI", "AppData"=>"agi:async", "Uniqueid"=>"1392965020.62870"}>
[2014-02-21 08:49:07.640] DEBUG Adhearsion::OutboundCall: 5d8f4200-e4c4-4dd0-b311-593651ce1b3b@: Receiving message: #<Punchblock::Event::Asterisk::AMI::Event target_call_id="5d8f4200-e4c4-4dd0-b311-593651ce1b3b", target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, name="AsyncAGI", headers={"Privilege"=>"agi,all", "SubEvent"=>"Start", "Channel"=>"SIP/billing-000011d7", "Env"=>"agi_request%3A%20async%0Aagi_channel%3A%20SIP%2Fbilling-000011d7%0Aagi_language%3A%20en%0Aagi_type%3A%20SIP%0Aagi_uniqueid%3A%201392965020.62870%0Aagi_version%3A%2011.5.1%0Aagi_callerid%3A%20123123123%0Aagi_calleridname%3A%20OUTBOUND%0Aagi_callingpres%3A%200%0Aagi_callingani2%3A%200%0Aagi_callington%3A%200%0Aagi_callingtns%3A%200%0Aagi_dnid%3A%20unknown%0Aagi_rdnis%3A%20unknown%0Aagi_context%3A%20adhearsion-redirect%0Aagi_extension%3A%201%0Aagi_priority%3A%201%0Aagi_enhanced%3A%200.0%0Aagi_accountcode%3A%20%0Aagi_threadid%3A%20-1253541008%0A%0A"}>
[2014-02-21 08:49:07.642] DEBUG Adhearsion::OutboundCall: 5d8f4200-e4c4-4dd0-b311-593651ce1b3b@: Receiving message: #<Punchblock::Event::Answered target_call_id="5d8f4200-e4c4-4dd0-b311-593651ce1b3b", target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, headers={}>
[2014-02-21 08:49:07.648] INFO Adhearsion::OutboundCall: 5d8f4200-e4c4-4dd0-b311-593651ce1b3b@: Executing controller #<OutboundController call=5d8f4200-e4c4-4dd0-b311-593651ce1b3b, metadata={:call_ref=>"123", :campaign_ref=>"asd123", :dial_time=>1392965334}>
[2014-02-21 08:49:07.662] INFO Adhearsion::OutboundCall: 5d8f4200-e4c4-4dd0-b311-593651ce1b3b@: WE RUNNING IN THE OUTBOUND CONTROLLER
[2014-02-21 08:49:10.888] DEBUG Adhearsion::OutboundCall: 5d8f4200-e4c4-4dd0-b311-593651ce1b3b@: Receiving message: #<Punchblock::Event::Asterisk::AMI::Event target_call_id="5d8f4200-e4c4-4dd0-b311-593651ce1b3b", target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, name="HangupRequest", headers={"Privilege"=>"call,all", "Channel"=>"SIP/billing-000011d7", "Uniqueid"=>"1392965020.62870"}>
[2014-02-21 08:49:10.894] DEBUG Adhearsion::OutboundCall: 5d8f4200-e4c4-4dd0-b311-593651ce1b3b@: Receiving message: #<Punchblock::Event::Asterisk::AMI::Event target_call_id="5d8f4200-e4c4-4dd0-b311-593651ce1b3b", target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, name="AsyncAGI", headers={"Privilege"=>"agi,all", "SubEvent"=>"End", "Channel"=>"SIP/billing-000011d7"}>
[2014-02-21 08:49:10.903] DEBUG Adhearsion::OutboundCall: 5d8f4200-e4c4-4dd0-b311-593651ce1b3b@: Receiving message: #<Punchblock::Event::Asterisk::AMI::Event target_call_id="5d8f4200-e4c4-4dd0-b311-593651ce1b3b", target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, name="VarSet", headers={"Privilege"=>"dialplan,all", "Channel"=>"SIP/billing-000011d7", "Variable"=>"AGISTATUS", "Value"=>"HANGUP", "Uniqueid"=>"1392965020.62870"}>
[2014-02-21 08:49:10.906] DEBUG Adhearsion::OutboundCall: 5d8f4200-e4c4-4dd0-b311-593651ce1b3b@: Receiving message: #<Punchblock::Event::Asterisk::AMI::Event target_call_id="5d8f4200-e4c4-4dd0-b311-593651ce1b3b", target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, name="SoftHangupRequest", headers={"Privilege"=>"call,all", "Channel"=>"SIP/billing-000011d7", "Uniqueid"=>"1392965020.62870", "Cause"=>"16"}>
[2014-02-21 08:49:10.909] DEBUG Adhearsion::OutboundCall: 5d8f4200-e4c4-4dd0-b311-593651ce1b3b@: Receiving message: #<Punchblock::Event::Asterisk::AMI::Event target_call_id="5d8f4200-e4c4-4dd0-b311-593651ce1b3b", target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, name="Hangup", headers={"Privilege"=>"call,all", "Channel"=>"SIP/billing-000011d7", "Uniqueid"=>"1392965020.62870", "CallerIDNum"=>"123123123", "CallerIDName"=>"OUTBOUND", "ConnectedLineNum"=>"123123123", "ConnectedLineName"=>"OUTBOUND", "AccountCode"=>"", "Cause"=>"16", "Cause-txt"=>"Normal Clearing"}>
[2014-02-21 08:49:10.912] DEBUG Adhearsion::OutboundCall: 5d8f4200-e4c4-4dd0-b311-593651ce1b3b@: Receiving message: #<Punchblock::Event::End target_call_id="5d8f4200-e4c4-4dd0-b311-593651ce1b3b", target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, headers={}, reason=:hangup, platform_code="16">
[2014-02-21 08:49:10.913] INFO Adhearsion::OutboundCall: 5d8f4200-e4c4-4dd0-b311-593651ce1b3b@: Call ended due to hangup
[2014-02-21 08:49:10.917] INFO CallQueue: CALL ENDED VIA INDIRECT METHOD
[2014-02-21 08:49:10.932] INFO Adhearsion::OutboundCall: 5d8f4200-e4c4-4dd0-b311-593651ce1b3b@: CALL ENDED! on before hook
[2014-02-21 08:49:10.934] INFO Adhearsion::OutboundCall: 5d8f4200-e4c4-4dd0-b311-593651ce1b3b@: CALL ENDED! on after hook
[2014-02-21 08:49:11.950] DEBUG OutboundDialerController: Finished executing controller #<OutboundController call=, metadata={:dial_time=>1392965334}>
[2014-02-21 08:46:21.683] INFO CallQueue: CALLING {"call_ref"=>"123", "number"=>"074********"}
[2014-02-21 08:46:22.901] DEBUG Adhearsion::OutboundCall: @: Executing command #<Punchblock::Command::Dial target_call_id=nil, target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, headers={}, to="SIP/billing/0741*******", from="OUTBOUND <123123123>", timeout=nil, join=nil>
[2014-02-21 08:46:24.015] INFO CallQueue: WAITING FOR SOME CALLS
[2014-02-21 08:46:24.691] DEBUG Adhearsion::OutboundCall: 82b2de71-26fe-4b10-bd8a-3825bd45c21c@: Receiving message: #<Punchblock::Event::Asterisk::AMI::Event target_call_id="82b2de71-26fe-4b10-bd8a-3825bd45c21c", target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, name="VarSet", headers={"Privilege"=>"dialplan,all", "Channel"=>"SIP/billing-000011d6", "Variable"=>"punchblock_call_id", "Value"=>"82b2de71-26fe-4b10-bd8a-3825bd45c21c", "Uniqueid"=>"1392964869.62865"}>
[2014-02-21 08:46:24.695] DEBUG Adhearsion::OutboundCall: 82b2de71-26fe-4b10-bd8a-3825bd45c21c@: Receiving message: #<Punchblock::Event::Asterisk::AMI::Event target_call_id="82b2de71-26fe-4b10-bd8a-3825bd45c21c", target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, name="NewAccountCode", headers={"Privilege"=>"call,all", "Channel"=>"SIP/billing-000011d6", "Uniqueid"=>"1392964869.62865", "AccountCode"=>"", "OldAccountCode"=>""}>
[2014-02-21 08:46:24.698] DEBUG Adhearsion::OutboundCall: 82b2de71-26fe-4b10-bd8a-3825bd45c21c@: Receiving message: #<Punchblock::Event::Asterisk::AMI::Event target_call_id="82b2de71-26fe-4b10-bd8a-3825bd45c21c", target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, name="NewCallerid", headers={"Privilege"=>"call,all", "Channel"=>"SIP/billing-000011d6", "CallerIDNum"=>"123123123", "CallerIDName"=>"OUTBOUND", "Uniqueid"=>"1392964869.62865", "CID-CallingPres"=>"0 (Presentation Allowed, Not Screened)"}>
[2014-02-21 08:46:29.754] DEBUG Adhearsion::OutboundCall: 82b2de71-26fe-4b10-bd8a-3825bd45c21c@: Receiving message: #<Punchblock::Event::Asterisk::AMI::Event target_call_id="82b2de71-26fe-4b10-bd8a-3825bd45c21c", target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, name="Newstate", headers={"Privilege"=>"call,all", "Channel"=>"SIP/billing-000011d6", "ChannelState"=>"5", "ChannelStateDesc"=>"Ringing", "CallerIDNum"=>"123123123", "CallerIDName"=>"OUTBOUND", "ConnectedLineNum"=>"123123123", "ConnectedLineName"=>"OUTBOUND", "Uniqueid"=>"1392964869.62865"}>
[2014-02-21 08:46:29.761] DEBUG Adhearsion::OutboundCall: 82b2de71-26fe-4b10-bd8a-3825bd45c21c@: Receiving message: #<Punchblock::Event::Ringing target_call_id="82b2de71-26fe-4b10-bd8a-3825bd45c21c", target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, headers={}>
[2014-02-21 08:46:37.534] DEBUG Adhearsion::OutboundCall: 82b2de71-26fe-4b10-bd8a-3825bd45c21c@: Receiving message: #<Punchblock::Event::Asterisk::AMI::Event target_call_id="82b2de71-26fe-4b10-bd8a-3825bd45c21c", target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, name="Hangup", headers={"Privilege"=>"call,all", "Channel"=>"SIP/billing-000011d6", "Uniqueid"=>"1392964869.62865", "CallerIDNum"=>"123123123", "CallerIDName"=>"OUTBOUND", "ConnectedLineNum"=>"123123123", "ConnectedLineName"=>"OUTBOUND", "AccountCode"=>"", "Cause"=>"17", "Cause-txt"=>"User busy"}>
[2014-02-21 08:46:37.542] DEBUG Adhearsion::OutboundCall: 82b2de71-26fe-4b10-bd8a-3825bd45c21c@: Receiving message: #<Punchblock::Event::End target_call_id="82b2de71-26fe-4b10-bd8a-3825bd45c21c", target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, headers={}, reason=:busy, platform_code="17">
[2014-02-21 08:46:37.544] INFO Adhearsion::OutboundCall: 82b2de71-26fe-4b10-bd8a-3825bd45c21c@: Call ended due to busy
[2014-02-21 08:46:37.549] INFO CallQueue: CALL ENDED VIA INDIRECT METHOD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment