3

I am using Asterisk and Adhearsion. I have created ahn application and done following things :

Added dialplan.rb to root directory of project. Contents :

adhearsion {
  play 'hello-world'
  hangup
}

Contents of 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 configuration files :

extensions.conf :

[adhearsion]
exten => test,1,AGI(agi://127.0.0.1)                                                                                                                                      

[adhearsion-redirect]

Contents of sip.conf

[general]
context=adhearsion
....

I am getting an error when I call(SIP) from SJPhone application :

== 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'
vedarthk
  • 1,253
  • 1
  • 14
  • 34
  • Please post the appropriate piece from your /log/adhearsion.log so that we can see what is going wrong on the AHN side. – MichelV69 Jan 31 '13 at 19:28

1 Answers1

2

That mean asterisk can't connect adhearsion fastagi script.

Posible issues are:

  • adhearsion is not running. Start it.
  • firewall block adhearsion port. Add into firewall allow rule for port 4573(tcp)
  • some error inside adhearsion framework, see logs.
arheops
  • 15,544
  • 1
  • 21
  • 27