Skip to content

Instantly share code, notes, and snippets.

@elcontrastador
Created November 6, 2010 21:32
Show Gist options
  • Save elcontrastador/665723 to your computer and use it in GitHub Desktop.
Save elcontrastador/665723 to your computer and use it in GitHub Desktop.
redii-mbpro:dog tyler$ ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-darwin10.4.0]
#ahn v1.0.0 - startub.rb
config.asterisk.enable_ami :host => "192.168.1.65", :username => "ahn_ami", :password => "testsecret", :events => true
#dialplan.rb
test_adhearsion {
play "hello-world"
#simon_game
}
redii-mbpro:dog tyler$ ahn start .
INFO ahn: Adhearsion v1.0.0 initialized!
DEBUG ami: Sending AMI action:
>>> Action: login
>>> ActionID: kLADrEhB-dZm6-cc0G-gg8b-CqqAI1YigEqV
>>> Username: ahn_ami
>>> Secret: testsecret
>>> Events: Off
>>>
INFO ami: Successful AMI actions-only connection into [email protected]
DEBUG ami: Sending AMI action:
>>> Action: coresettings
>>> ActionID: 6jX78YhX-IQxw-CloS-cMLF-Fb6i9E6JtUdc
>>>
INFO ami: Successful AMI events-only connection into [email protected]
[Sat Nov 6 14:29:03 2010] Adhearsion::VoIP::Asterisk::AGI::Server::RubyServer 0.0.0.0:4573 start
#asterisk info (192.168.1.65)
mbp-linux*CLI> core show version
Asterisk 1.6.2.7-1ubuntu1 built by buildd @ vernadsky on a i686 running Linux on 2010-06-23 21:08:57 UTC
#extensions.conf
[test_adhearsion]
exten => s,1,AGI(agi://192.168.1.64)
[default]
exten => 999,1,AGI(agi://192.168.1.64)
exten => 999,n,Hangup
;
; By default we include the demo. In a production system, you
; probably don't want to have the demo there.
;
include => demo
exten => 1001,1,Answer()
exten => 1001,2,Playback(hello-world)
exten => 1001,3,Hangup()
exten => 2000,1,Dial(SIP/2000,20)
exten => 2000,2,VoiceMail(2000,u)
#manager.conf
[ahn_ami]
secret = testsecret
read = system,call,log,verbose,agent,user,config,dtmf,reporting,cdr,dialplan
write = system,call,agent,user,config,command,reporting,originate
[Nov 6 14:25:14] NOTICE[2775]: chan_sip.c:20063 handle_request_invite: Call from '2000' to extension '999' rejected because extension not found.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment