Hi,
I am working on ARI API in trying to test the API in postman , but the this message occur “message”: “Channel not in Stasis application”.
My Code are given below
ari.cong
[general]
enabled = yes
pretty = yes
[asterisk]
type = user
read_only = no
password = asterisk
password_format = plain
http.conf
[general]
servername=asterisk
enabled = yes
bindaddr=asterisk mechine ip address (192.168.x.x)
;I also try below line
;bindaddr=0.0.0.0
bindport=8088
The message means what it says, you can only put a channel on hold that is in your ARI application. If you can’t do that - then it’s not in the ARI application.
so then what is ARI application?, I can’t understand what are Stasts applications and how they work. I just try how I can hold the call through ARI API. but really I don’t know what is hello-world, where it is exist .
“hello-world” is something that is written and running outside of Asterisk, but connected to it. This wiki page[1] gives background on ARI and what it is intended for.
but I did not write any application name as hello-world. There are any sample applications are available in stasts and where the path(directory) of stasts application in asterisk ?,
We don’t include any examples, it’s up to you to write one in your language to do what you want using the primitives available. There is no default path for such things because it’s up to you to run the application, and place it where you want.
At the moment you seem to be insisting on using ARI without really having an understanding of what it does. ARI may be the wrong solution (even Asterisk may be the wrong solution). You need to explain the real world objective, not the coding technique you think might achieve it.
That is not the overall goal, unless this is a student exercise. Using ARI should never be appearing in the real world requirement, as it an implementation detail.
Ignoring all the implementation detail constraints, you are applying to the requirement, and trying to guess one stage back towards the real requirement, I’d suggest looking into the m option in Dial. (With your current solution, I’m not convinced the channel would ever get an AST_CONTROL_UNHOLD.)
Also you need to be more clear about what you mean by hold. The default meaning of hold in Asterisk is Re-INVITE medial back in, in if necessary, then play music on hold as sendrecv media. I think chan_pjsip has some options to vary this.
The real requirement includes why you need to put on hold.
As to the specific APIs, you should be asking the person who specified their use. They really ought to have some understanding of how they are used before they specify them, in order to know whether it is appropriate to specify them.
You appear to want third party control, which is something that would indicate the use of AMI.
When the company I worked for did something like this, they used parking to achieve the hold, and had a priority queue for getting the caller back to the agent. ARI didn’t exist at that time. With hindsight, I might have redirected the call to an application playing music on hold.