Hello,
I made an concept with originate and Local channel in asterisk and it would work, but there is small bug in Adhearsion, related to the Local channel
Shortly, when Asterisk dial to the local channel, after bridge, another call leg will be created and it should be tracked, or something like this happen (below)
Channel Local/d2450c9eb93499608f29d1e2e96f4a2f@adhearsion-originate-00000002;1 but at the moment, Local/d2450c9eb93499608f29d1e2e96f4a2f@adhearsion-originate-00000002;2 should be tracked.
I will try to work on this and get it solved.
By now Ben, maybe you could help with this question:
How I can invoke AMI originate within Adhearsion without using originate command?
I just want to send AMI action, same way as it's made in lib/adhearsion/translator/asterisk/call.rb.
I have tried this from adhearsion CLI, but something is missing:
originate_action = Adhearsion::Rayo::Component::Asterisk::AMI::Action.new :name => 'Originate', :params => {:async=>true, :context=>"default", :exten=>"1", :priority=>"1", :channel=>"SIP/aaa", :callerid => "12345", :timeout => 30000}
originate_action.request!
Regards,
Andrius
[2016-12-15 09:39:37.774] DEBUG Adhearsion::OutboundCall: f559727e-7217-4628-b73e-e64d4f1d39c2@: Executing command #<Adhearsion::Rayo::Command::Join target_call_id=nil, target_mix
er_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, timestamp=Thu, 15 Dec 2016 09:39:37 +0000, request_id="7ca5aec6-ca2a-47be-add5-de2522e1a3e9", call_uri="f
559727e-7217-4628-b73e-e64d4f1d39c2", mixer_name=nil, direction=nil, media=nil>
[2016-12-15 09:39:37.776] TRACE Adhearsion::Rayo::Connection::Asterisk: [SEND] Action: agi
ActionID: a9f31819-11f6-4bb3-b6f2-d7428006afa2
Channel: Local/d2450c9eb93499608f29d1e2e96f4a2f@adhearsion-originate-00000002;1
Command: EXEC Bridge "Local/d2450c9eb93499608f29d1e2e96f4a2f@adhearsion-originate-00000002;1,F(adhearsion-redirect,1,1)"
CommandID: c95392dc-d23d-448e-8867-bd494c1a9b83
[2016-12-15 09:39:37.776] TRACE Adhearsion::Rayo::Connection::Asterisk: [RECV] Response: Error
ActionID: a9f31819-11f6-4bb3-b6f2-d7428006afa2
Message: Channel Local/d2450c9eb93499608f29d1e2e96f4a2f@adhearsion-originate-00000002;1 does not exist.