SIP call is rejected with an asterisk
I am using Asterisk and Adhearsion. I created an application ahn
and followed these steps:
Added dialplan.rb
to the root directory of the project. Content:
adhearsion {
play 'hello-world'
hangup
}
Contents config/adhearsion.rb
:
...
##
# Use with Asterisk
#
config.punchblock.platform = :asterisk # Use Asterisk
config.punchblock.username = "myuser" # Your AMI username
config.punchblock.password = "mypassword" # Your AMI password
config.punchblock.host = "127.0.0.1" # Your AMI host
...
Asterisk config files:
extensions.conf
:
[adhearsion]
exten => test,1,AGI(agi://127.0.0.1)
[adhearsion-redirect]
Content sip.conf
[general] context=adhearsion ....
I am getting an error when calling (SIP) from SJPhone app:
== Manager 'myuser' logged on from 127.0.0.1
== Manager 'myuser' logged on from 127.0.0.1
-- Added extension '1' priority 1 to adhearsion-redirect
== Using SIP RTP CoS mark 5
-- Executing [test@adhearsion:1] AGI("SIP/127.0.0.1-00000000", "agi://127.0.0.1") in new stack
[Jan 30 12:02:26] ERROR[4211]: utils.c:1164 ast_carefulwrite: write() returned error: Connection refused
[Jan 30 12:02:26] WARNING[4211]: res_agi.c:1509 launch_netscript: Connect to 'agi://127.0.0.1' failed: Connection refused
-- Auto fallthrough, channel 'SIP/127.0.0.1-00000000' status is 'UNKNOWN'
+3
source to share