I have an application which receives information from Asterisk’s AMI on socket. But the information of hold event is not coming in, anybody has an idea?
AFAIK currently the only version of Asterisk which sends MoH Stop/Start events to AMI is 1.6.1.
I have the latest version which i downloaded few days ago, from Asterisk
web-site. And i can see MoH Start/Stop event on console, not on AMI socket.
The latest released version is 188.8.131.52. 1.6.1, which you need for this function is still in beta (Beta 4).
I can’t understand, how it is possible that a switch like Asterisk does not provide Hold/Un-hold functionality to its CTI clients.
Also, there must be an event for Hold/Unhold.
Are you looking to place a channel ON-HOLD, or are you simply hoping to be alerted via the AMI as to when a channel has been put on hold?
You are correct, this is what i am trying to do.
My application needs to be notified whenever a channel goes on hold.
Well… you have two options.
1 - you could try out 1.6.1 which (according to david55) is still in beta.
2 - you could dig through some source code and backport the change from 1.6.1 to whatever stable version you are currently using.
I think, I better use 1.6.1. Even if its in beta, my company won’t be using it very soon so most probably by the time our product goes in production 1.6.1 will transition to an established release.
And is there an AMI command for putting calls on hold/unhold?
Not sure what they added in 1.6.1. I would install it and do a “manager show commands” to see if there is anything that sounds like it would work.
I just executed “manager show commands” on my Asterisk installation, it does not contain anything for Hold/Unhold.
I got 184.108.40.206 installed on Fedora Core 4.0.
i thought we just agreed that they added the on-hold stuff in 1.6.1… you should do an install of that and see what shows up.
based on the way on-hold works, i am doubting it was added to 1.6.1. on-hold requires a RE-INVITE to be issued with a special SDP attribute. i suppose this could originate from the asterisk server… who knows, it’s worth a shot.
There is not going to be an AMI command. If there is an event, you will get it automatically, as long as you are logged in with the right permissions.
I am logging in with full permissions. And to resolve this, I’ve decided to add my own commands + events to Manager module by modifying the code.
Actually i am having the exact same problem.
I am working on a CTI Manager Application for Asterisk and the deeper i dig into the “core” of asterisk the more “amazing” things come to the surface.
The hold event is just one of those examples that makes me wonder how asterisk can be called a “carrier grade” voip solution (sorry i am a bit frustrated atm). Or are there other ways to receive the necessary events that i don’t know off? If yes please give a old coder a hint!
@naeem: Did you make any progress on your modification of the Manager Module?