VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
mgandikota at nts.net Guest
|
Posted: Fri Oct 24, 2014 1:20 pm Post subject: [asterisk-users] Asterisk 12 Dialplan |
|
|
In
https://wiki.asterisk.org/wiki/display/AST/Introduction+to+ARI+and+Chann
els
it is stated:
channel-dump.js in action
Here's sample output from channel-dump.js. When it first connects there
are no channels in Asterisk - (sad) - but afterwards a PJSIP channel
from Alice enters into extension 1000. This prints out all the
information about her channels. After hearing silence for a while, she
hangs up - and our script notifies us that her channel has left the
application.
<end of quote>
Is there some way the call can be moved to the next priority or context
in the dial plan from the stasis app? It seems the caller is stuck in
stasis.
Thanks
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
rmudgett at digium.com Guest
|
Posted: Fri Oct 24, 2014 2:01 pm Post subject: [asterisk-users] Asterisk 12 Dialplan |
|
|
On Fri, Oct 24, 2014 at 1:19 PM, Murthy Gandikota <mgandikota@nts.net (mgandikota@nts.net)> wrote:
Quote: |
In
https://wiki.asterisk.org/wiki/display/AST/Introduction+to+ARI+and+Chann
els
it is stated:
channel-dump.js in action
Here's sample output from channel-dump.js. When it first connects there
are no channels in Asterisk - (sad) - but afterwards a PJSIP channel
from Alice enters into extension 1000. This prints out all the
information about her channels. After hearing silence for a while, she
hangs up - and our script notifies us that her channel has left the
application.
<end of quote>
Is there some way the call can be moved to the next priority or context
in the dial plan from the stasis app? It seems the caller is stuck in
stasis.
|
Once a channel hangs up it is controlled by hangup handlers and h extens.
If however you want to kick an active channel out of your stasis application
to run dialplan then you use the
POST /channels/{channelId}/continue
ARI command.
Richard
[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+Channels+REST+API#Asterisk12ChannelsRESTAPI-continueInDialplan |
|
Back to top |
|
|
mgandikota at nts.net Guest
|
Posted: Mon Oct 27, 2014 10:56 am Post subject: [asterisk-users] Asterisk 12 Dialplan |
|
|
From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Richard Mudgett
Sent: Friday, October 24, 2014 12:02 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Asterisk 12 Dialplan
On Fri, Oct 24, 2014 at 1:19 PM, Murthy Gandikota <mgandikota@nts.net (mgandikota@nts.net)> wrote:
In
https://wiki.asterisk.org/wiki/display/AST/Introduction+to+ARI+and+Chann
els
it is stated:
channel-dump.js in action
Here's sample output from channel-dump.js. When it first connects there
are no channels in Asterisk - (sad) - but afterwards a PJSIP channel
from Alice enters into extension 1000. This prints out all the
information about her channels. After hearing silence for a while, she
hangs up - and our script notifies us that her channel has left the
application.
<end of quote>
Is there some way the call can be moved to the next priority or context
in the dial plan from the stasis app? It seems the caller is stuck in
stasis.
Once a channel hangs up it is controlled by hangup handlers and h extens.
If however you want to kick an active channel out of your stasis application
to run dialplan then you use the
POST /channels/{channelId}/continue
ARI command.
Richard
[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+Channels+REST+API#Asterisk12ChannelsRESTAPI-continueInDialplan
Thanks, Richard. How do I get manager events such as VarSetEvent (https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+ManagerEvent_VarSet) using ARI? |
|
Back to top |
|
|
mjordan at digium.com Guest
|
|
Back to top |
|
|
mgandikota at nts.net Guest
|
Posted: Mon Oct 27, 2014 2:40 pm Post subject: [asterisk-users] Asterisk 12 Dialplan |
|
|
From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Matthew Jordan
Sent: Monday, October 27, 2014 10:44 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Asterisk 12 Dialplan
On Mon, Oct 27, 2014 at 10:56 AM, Murthy Gandikota <mgandikota@nts.net (mgandikota@nts.net)> wrote:
Thanks, Richard. How do I get manager events such as VarSetEvent (https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+ManagerEvent_VarSet) using ARI?
Events are provided by your WebSocket connection - a good overview of how this works is provided on the wiki [1]. You will receive events for resources that you are subscribed to; you are automatically subscribed to any channel that enters your Stasis application [2]. You can create subscriptions to things outside of your application using the applications resource [3]. The possible events are all documented in the data models [4].
Specifically, however, an AMI VarSet event corresponds to an ARI ChannelVarSet event [5].
[1] https://wiki.asterisk.org/wiki/display/AST/Getting+Started+with+ARI
[2] https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_Stasis
[3] https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Applications+REST+API
[4] https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+REST+Data+Models
[5] https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+REST+Data+Models#Asterisk13RESTDataModels-ChannelVarset
--
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
I am unable to detect the Manager_Setvar event using ARI.
Can you please let me know, in ARI lingo, the curl or javascript code to detect the AMI Manager_Setvar event for myvar in the following dialplan:
[default]
exten => 1000,1,NoOp()
same => n,Answer()
same => n,set(myvar=test)
same => n,Stasis(hello-world)
same => n,Hangup()
Thanks |
|
Back to top |
|
|
mjordan at digium.com Guest
|
Posted: Mon Oct 27, 2014 5:15 pm Post subject: [asterisk-users] Asterisk 12 Dialplan |
|
|
On Mon, Oct 27, 2014 at 2:40 PM, Murthy Gandikota <mgandikota@nts.net (mgandikota@nts.net)> wrote:
Quote: |
I am unable to detect the Manager_Setvar event using ARI.
Can you please let me know, in ARI lingo, the curl or javascript code to detect the AMI Manager_Setvar event for myvar in the following dialplan:
[default]
exten => 1000,1,NoOp()
same => n,Answer()
same => n,set(myvar=test)
same => n,Stasis(hello-world)
same => n,Hangup()
Thanks
|
Perhaps it would be easier if you provided some information about the ARI application you've written. Have you connected a WebSocket? Are you receiving other ARI events?
--
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org |
|
Back to top |
|
|
mgandikota at nts.net Guest
|
Posted: Mon Oct 27, 2014 9:54 pm Post subject: [asterisk-users] Asterisk 12 Dialplan |
|
|
From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Matthew Jordan
Sent: Monday, October 27, 2014 3:15 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Asterisk 12 Dialplan
On Mon, Oct 27, 2014 at 2:40 PM, Murthy Gandikota <mgandikota@nts.net (mgandikota@nts.net)> wrote:
I am unable to detect the Manager_Setvar event using ARI.
Can you please let me know, in ARI lingo, the curl or javascript code to detect the AMI Manager_Setvar event for myvar in the following dialplan:
[default]
exten => 1000,1,NoOp()
same => n,Answer()
same => n,set(myvar=test)
same => n,Stasis(hello-world)
same => n,Hangup()
Thanks
Perhaps it would be easier if you provided some information about the ARI application you've written. Have you connected a WebSocket? Are you receiving other ARI events?
--
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
I am using ari4java to capture stasis events like StasisStart, StatisEnd, etc. However, I am unable to capture the Varset event as explained before. In particular the myvar variable is not associated with any app It is perhaps a channel variable. |
|
Back to top |
|
|
mgandikota at nts.net Guest
|
Posted: Tue Oct 28, 2014 4:49 pm Post subject: [asterisk-users] Asterisk 12 Dialplan |
|
|
Tried this:
wscat -c "ws://myhost.mydomain.net:8090/ari/events?api_key=secret:secret&app=hello-world"
It is only showing the stasis related events. I am interested in AMI events, specifically Varset.
Thanks
From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Murthy Gandikota
Sent: Monday, October 27, 2014 7:54 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Asterisk 12 Dialplan
From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Matthew Jordan
Sent: Monday, October 27, 2014 3:15 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Asterisk 12 Dialplan
On Mon, Oct 27, 2014 at 2:40 PM, Murthy Gandikota <mgandikota@nts.net (mgandikota@nts.net)> wrote:
I am unable to detect the Manager_Setvar event using ARI.
Can you please let me know, in ARI lingo, the curl or javascript code to detect the AMI Manager_Setvar event for myvar in the following dialplan:
[default]
exten => 1000,1,NoOp()
same => n,Answer()
same => n,set(myvar=test)
same => n,Stasis(hello-world)
same => n,Hangup()
Thanks
Perhaps it would be easier if you provided some information about the ARI application you've written. Have you connected a WebSocket? Are you receiving other ARI events?
--
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
I am using ari4java to capture stasis events like StasisStart, StatisEnd, etc. However, I am unable to capture the Varset event as explained before. In particular the myvar variable is not associated with any app It is perhaps a channel variable. |
|
Back to top |
|
|
mgandikota at nts.net Guest
|
Posted: Wed Oct 29, 2014 1:21 pm Post subject: [asterisk-users] Asterisk 12 Dialplan |
|
|
I am happy to report that https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+Applications+REST+API has the answer to my dilemma. It seems an app has to subscribe to channel events before it can receive the events like ChannelVarset...
From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Murthy Gandikota
Sent: Tuesday, October 28, 2014 2:49 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Asterisk 12 Dialplan
Tried this:
wscat -c "ws://myhost.mydomain.net:8090/ari/events?api_key=secret:secret&app=hello-world"
It is only showing the stasis related events. I am interested in AMI events, specifically Varset.
Thanks
From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Murthy Gandikota
Sent: Monday, October 27, 2014 7:54 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Asterisk 12 Dialplan
From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Matthew Jordan
Sent: Monday, October 27, 2014 3:15 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Asterisk 12 Dialplan
On Mon, Oct 27, 2014 at 2:40 PM, Murthy Gandikota <mgandikota@nts.net (mgandikota@nts.net)> wrote:
I am unable to detect the Manager_Setvar event using ARI.
Can you please let me know, in ARI lingo, the curl or javascript code to detect the AMI Manager_Setvar event for myvar in the following dialplan:
[default]
exten => 1000,1,NoOp()
same => n,Answer()
same => n,set(myvar=test)
same => n,Stasis(hello-world)
same => n,Hangup()
Thanks
Perhaps it would be easier if you provided some information about the ARI application you've written. Have you connected a WebSocket? Are you receiving other ARI events?
--
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
I am using ari4java to capture stasis events like StasisStart, StatisEnd, etc. However, I am unable to capture the Varset event as explained before. In particular the myvar variable is not associated with any app It is perhaps a channel variable. |
|
Back to top |
|
|
mjordan at digium.com Guest
|
|
Back to top |
|
|
mgandikota at nts.net Guest
|
Posted: Fri Oct 31, 2014 12:59 pm Post subject: [asterisk-users] Asterisk 12 Dialplan |
|
|
-----Original Message-----
From: asterisk-users-bounces@lists.digium.com
[mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Matthew
Jordan
Sent: Wednesday, October 29, 2014 11:37 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Asterisk 12 Dialplan
On Wed, Oct 29, 2014 at 1:21 PM, Murthy Gandikota <mgandikota@nts.net>
wrote:
Quote: | I am happy to report that
| https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+Applications+REST
+API
Quote: | has the answer to my dilemma. It seems an app has to subscribe to
| channel
Quote: | events before it can receive the events like ChannelVarset...
|
That's correct. You are only implicitly subscribed to channels that
are in the Stasis application your websocket is for (in your case,
'hello-world'). Otherwise, you have to subscribe to various event
sources through the applications resource.
The "Introduction to ARI and Channels" page on the wiki has more on this
here:
https://wiki.asterisk.org/wiki/display/AST/Introduction+to+ARI+and+Chann
els#IntroductiontoARIandChannels-ChannelsinaStasisApplication
--
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Thank you, Matt. I am still at loss to know how to generate a
StatusEvent. The AMI connnections had a StatusEvent that was used thus
in Java:
StatusAction statusAction = new StatusAction();
statusAction.setVariables(vars);
managerConnection.sendAction(statusAction);
The response to the StatusAction was in the form of events for each of
the channels, along with a map of variables requested as a comma
separated list in the "vars".
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|