Thread: [Asterisk-java-users] Keeping AgiCahnnel alive for a long time.
Brought to you by:
srt
From: Artur T. <ar...@ca...> - 2014-01-30 13:29:25
|
Hi guys, In our application we want to be able to send commands to a specific asterisk channel during a long period of time. It's a long-lasting call that we want to manipulate (may last for few hours). One of ways of approaching it was to make an AGI call from asterisk which will create an AgiScript that will hold an AgiChannel instance that we'll use to send our commands. I know that the channel is closed once AgiScript#serve() method is finished. As a workaround we pause the serve()'s thread to keep AgiChannel open as long as we need. Should we look out for any timeouts that will eventually close the channel automatically? Do we need to send at least NoOp periodiacally to keep it open? Overall this doesn't look like a good solution anyway so I want to ask if we have any other options to achieve our goal? I can provide more info or code if needed. |
From: Murthy G. <mga...@nt...> - 2014-01-30 18:58:36
|
Hi Artur We faced a similar situation and successfully handled with the channel variable TIMEOUT(absolute). http://www.voip-info.org/wiki/view/Asterisk+cmd+AbsoluteTimeout Hope this helps ________________________________ From: Artur Tamazyan [mailto:ar...@ca...] Sent: Thursday, January 30, 2014 4:40 AM To: ast...@li... Subject: [Asterisk-java-users] Keeping AgiCahnnel alive for a long time. Hi guys, In our application we want to be able to send commands to a specific asterisk channel during a long period of time. It's a long-lasting call that we want to manipulate (may last for few hours). One of ways of approaching it was to make an AGI call from asterisk which will create an AgiScript that will hold an AgiChannel instance that we'll use to send our commands. I know that the channel is closed once AgiScript#serve() method is finished. As a workaround we pause the serve()'s thread to keep AgiChannel open as long as we need. Should we look out for any timeouts that will eventually close the channel automatically? Do we need to send at least NoOp periodiacally to keep it open? Overall this doesn't look like a good solution anyway so I want to ask if we have any other options to achieve our goal? I can provide more info or code if needed. |
From: Yves A. <yv...@gm...> - 2014-01-30 20:52:18
|
Hi, I think, I do not understand your question... could you please explain your scenario a bit more? Holding a seperate channel for controlling another channels seems a bit overkill... so you must have special needs that I do not see abd that prevent you to go the "normal" way via AMI... yves Am 30.01.2014 13:40, schrieb Artur Tamazyan: > Hi guys, > > In our application we want to be able to send commands to a specific > asterisk channel during a long period of time. It's a long-lasting > call that we want to manipulate (may last for few hours). > > One of ways of approaching it was to make an AGI call from asterisk > which will create an AgiScript that will hold an AgiChannel instance > that we'll use to send our commands. > I know that the channel is closed once AgiScript#serve() method is > finished. As a workaround we pause the serve()'s thread to keep > AgiChannel open as long as we need. Should we look out for any > timeouts that will eventually close the channel automatically? Do we > need to send at least NoOp periodiacally to keep it open? > > Overall this doesn't look like a good solution anyway so I want to > ask if we have any other options to achieve our goal? > > I can provide more info or code if needed. > > > > ------------------------------------------------------------------------------ > WatchGuard Dimension instantly turns raw network data into actionable > security intelligence. It gives you real-time visual feedback on key > security issues and trends. Skip the complicated setup - simply import > a virtual appliance and go from zero to informed in seconds. > http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Artur T. <ar...@ca...> - 2014-01-30 22:18:49
|
Let's say we receive a call and answer it. We know that it'll be a long call and that we want to be able to do some things with it, like: join conferences, leave that conferences, play sounds and do other stuff. So ideally we should be able to execute any asterisk application on this call's channel. What's the best way to do this? What I was trying to do is to execute AGI(..) to pass control to java. In normal situation it'll trigger the service() method of some AgiScript and return. But I prevent it from returning to keep the channel open for our commands. Regarding AMI: as I understood we can execute apps or set contexts only during call origination and we can't just execute smth for an already active call. If I'm not right please give an example of how to do it. I hope it makes the question clearer. I can give more details if you need. And thanks for your time. On Thu, Jan 30, 2014 at 10:52 PM, Yves A. <yv...@gm...> wrote: > Hi, > > I think, I do not understand your question... could you please explain > your scenario a bit more? > Holding a seperate channel for controlling another channels seems a bit > overkill... so you must have special needs > that I do not see abd that prevent you to go the "normal" way via AMI... > > yves > > Am 30.01.2014 13:40, schrieb Artur Tamazyan: > > Hi guys, > > In our application we want to be able to send commands to a specific > asterisk channel during a long period of time. It's a long-lasting call > that we want to manipulate (may last for few hours). > > One of ways of approaching it was to make an AGI call from asterisk > which will create an AgiScript that will hold an AgiChannel instance that > we'll use to send our commands. > I know that the channel is closed once AgiScript#serve() method is > finished. As a workaround we pause the serve()'s thread to keep AgiChannel > open as long as we need. Should we look out for any timeouts that will > eventually close the channel automatically? Do we need to send at least > NoOp periodiacally to keep it open? > > Overall this doesn't look like a good solution anyway so I want to ask > if we have any other options to achieve our goal? > > I can provide more info or code if needed. > > > > ------------------------------------------------------------------------------ > WatchGuard Dimension instantly turns raw network data into actionable > security intelligence. It gives you real-time visual feedback on key > security issues and trends. Skip the complicated setup - simply import > a virtual appliance and go from zero to informed in seconds.http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > WatchGuard Dimension instantly turns raw network data into actionable > security intelligence. It gives you real-time visual feedback on key > security issues and trends. Skip the complicated setup - simply import > a virtual appliance and go from zero to informed in seconds. > > http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Yves A. <yv...@gm...> - 2014-01-31 16:00:18
|
Hi, how do you "control", ,, , , Am 30.01.2014 23:18, schrieb Artur Tamazyan: > Let's say we receive a call and answer it. We know that it'll be a > long call and that we want to be able to do some things with it, like: > join conferences, leave that conferences, play sounds and do other > stuff. So ideally we should be able to execute any asterisk > application on this call's channel. What's the best way to do this? > > What I was trying to do is to execute AGI(..) to pass control to java. > In normal situation it'll trigger the service() method of some > AgiScript and return. But I prevent it from returning to keep the > channel open for our commands. > > Regarding AMI: as I understood we can execute apps or set contexts > only during call origination and we can't just execute smth for an > already active call. If I'm not right please give an example of how to > do it. > > I hope it makes the question clearer. I can give more details if you > need. And thanks for your time. > > > On Thu, Jan 30, 2014 at 10:52 PM, Yves A. <yv...@gm... > <mailto:yv...@gm...>> wrote: > > Hi, > > I think, I do not understand your question... could you please > explain your scenario a bit more? > Holding a seperate channel for controlling another channels seems > a bit overkill... so you must have special needs > that I do not see abd that prevent you to go the "normal" way via > AMI... > > yves > > Am 30.01.2014 13:40, schrieb Artur Tamazyan: >> Hi guys, >> >> In our application we want to be able to send commands to a >> specific asterisk channel during a long period of time. It's a >> long-lasting call that we want to manipulate (may last for few >> hours). >> >> One of ways of approaching it was to make an AGI call from >> asterisk which will create an AgiScript that will hold an >> AgiChannel instance that we'll use to send our commands. >> I know that the channel is closed once AgiScript#serve() method >> is finished. As a workaround we pause the serve()'s thread to >> keep AgiChannel open as long as we need. Should we look out for >> any timeouts that will eventually close the channel >> automatically? Do we need to send at least NoOp periodiacally to >> keep it open? >> >> Overall this doesn't look like a good solution anyway so I want >> to ask if we have any other options to achieve our goal? >> >> I can provide more info or code if needed. >> >> >> >> ------------------------------------------------------------------------------ >> WatchGuard Dimension instantly turns raw network data into actionable >> security intelligence. It gives you real-time visual feedback on key >> security issues and trends. Skip the complicated setup - simply import >> a virtual appliance and go from zero to informed in seconds. >> http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk >> >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > ------------------------------------------------------------------------------ > WatchGuard Dimension instantly turns raw network data into actionable > security intelligence. It gives you real-time visual feedback on key > security issues and trends. Skip the complicated setup - simply > import > a virtual appliance and go from zero to informed in seconds. > http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > WatchGuard Dimension instantly turns raw network data into actionable > security intelligence. It gives you real-time visual feedback on key > security issues and trends. Skip the complicated setup - simply import > a virtual appliance and go from zero to informed in seconds. > http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Artur T. <ar...@ca...> - 2014-01-31 16:04:30
|
Hi Yves, please check your last email - it seems corrupt and I'd really like to see what it contained. On Fri, Jan 31, 2014 at 6:00 PM, Yves A. <yv...@gm...> wrote: > Hi, > > how do you "control", > > > > > > > > > > > > > ,, > , > > > , > > > > > > > Am 30.01.2014 23:18, schrieb Artur Tamazyan: > > Let's say we receive a call and answer it. We know that it'll be a long > call and that we want to be able to do some things with it, like: join > conferences, leave that conferences, play sounds and do other stuff. So > ideally we should be able to execute any asterisk application on this > call's channel. What's the best way to do this? > > What I was trying to do is to execute AGI(..) to pass control to java. > In normal situation it'll trigger the service() method of some AgiScript > and return. But I prevent it from returning to keep the channel open for > our commands. > > Regarding AMI: as I understood we can execute apps or set contexts only > during call origination and we can't just execute smth for an already > active call. If I'm not right please give an example of how to do it. > > I hope it makes the question clearer. I can give more details if you > need. And thanks for your time. > > > On Thu, Jan 30, 2014 at 10:52 PM, Yves A. <yv...@gm...> wrote: > >> Hi, >> >> I think, I do not understand your question... could you please explain >> your scenario a bit more? >> Holding a seperate channel for controlling another channels seems a bit >> overkill... so you must have special needs >> that I do not see abd that prevent you to go the "normal" way via AMI... >> >> yves >> >> Am 30.01.2014 13:40, schrieb Artur Tamazyan: >> >> Hi guys, >> >> In our application we want to be able to send commands to a specific >> asterisk channel during a long period of time. It's a long-lasting call >> that we want to manipulate (may last for few hours). >> >> One of ways of approaching it was to make an AGI call from asterisk >> which will create an AgiScript that will hold an AgiChannel instance that >> we'll use to send our commands. >> I know that the channel is closed once AgiScript#serve() method is >> finished. As a workaround we pause the serve()'s thread to keep AgiChannel >> open as long as we need. Should we look out for any timeouts that will >> eventually close the channel automatically? Do we need to send at least >> NoOp periodiacally to keep it open? >> >> Overall this doesn't look like a good solution anyway so I want to ask >> if we have any other options to achieve our goal? >> >> I can provide more info or code if needed. >> >> >> >> ------------------------------------------------------------------------------ >> WatchGuard Dimension instantly turns raw network data into actionable >> security intelligence. It gives you real-time visual feedback on key >> security issues and trends. Skip the complicated setup - simply import >> a virtual appliance and go from zero to informed in seconds.http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk >> >> >> >> _______________________________________________ >> Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> >> ------------------------------------------------------------------------------ >> WatchGuard Dimension instantly turns raw network data into actionable >> security intelligence. It gives you real-time visual feedback on key >> security issues and trends. Skip the complicated setup - simply import >> a virtual appliance and go from zero to informed in seconds. >> >> http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> > > > ------------------------------------------------------------------------------ > WatchGuard Dimension instantly turns raw network data into actionable > security intelligence. It gives you real-time visual feedback on key > security issues and trends. Skip the complicated setup - simply import > a virtual appliance and go from zero to informed in seconds.http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > WatchGuard Dimension instantly turns raw network data into actionable > security intelligence. It gives you real-time visual feedback on key > security issues and trends. Skip the complicated setup - simply import > a virtual appliance and go from zero to informed in seconds. > > http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Artur T. <ar...@ca...> - 2014-01-31 16:11:08
|
The "thing" is a java application. Currently I was able to get the needed channel (it looks like SIP/192.168.220.14:52868-00000008). Can you tell how can I for example play a sound or at least NoOp to it using AMI? should I use OriginateAction to the above channel with NoOp specified as an application? I just don't see the way to send commands to channel using AMI and channel string above. On Fri, Jan 31, 2014 at 6:05 PM, Yves A. <yv...@gm...> wrote: > oops... accidentially sent before finish..... > > so... how do you control the "thing" that should be able to do the call > stuff?? some kind of webservice... anyway... > if such an action is triggered or required I´d just connect to asterisk > and fire any action with the AMI... > the only thing you have to now is the channel of the call, you want to > "manipulate".... you can do anything > (ok... depending on your asterisk version, dialplan, skill etc.). > if you don´t know the call, you can iterate through any open channel to > identify the one you need, or you > store the channel in a variable, that is set upon callstart and that you > can read from another ami connection. > you could use global or channel-variables or db-entrys for this purpose. > > right now, i am going to holidays for 10 days, so i can´t assist you the > next time... if you want further tips on this > topic after that time.... just write to the list.... > > regards, > yves > > Am 31.01.2014 17:00, schrieb Yves A.: > > Hi, > > how do you "control", > > > > > > > > > > > > > ,, > , > > > , > > > > > > > Am 30.01.2014 23:18, schrieb Artur Tamazyan: > > Let's say we receive a call and answer it. We know that it'll be a long > call and that we want to be able to do some things with it, like: join > conferences, leave that conferences, play sounds and do other stuff. So > ideally we should be able to execute any asterisk application on this > call's channel. What's the best way to do this? > > What I was trying to do is to execute AGI(..) to pass control to java. > In normal situation it'll trigger the service() method of some AgiScript > and return. But I prevent it from returning to keep the channel open for > our commands. > > Regarding AMI: as I understood we can execute apps or set contexts only > during call origination and we can't just execute smth for an already > active call. If I'm not right please give an example of how to do it. > > I hope it makes the question clearer. I can give more details if you > need. And thanks for your time. > > > On Thu, Jan 30, 2014 at 10:52 PM, Yves A. <yv...@gm...> wrote: > >> Hi, >> >> I think, I do not understand your question... could you please explain >> your scenario a bit more? >> Holding a seperate channel for controlling another channels seems a bit >> overkill... so you must have special needs >> that I do not see abd that prevent you to go the "normal" way via AMI... >> >> yves >> >> Am 30.01.2014 13:40, schrieb Artur Tamazyan: >> >> Hi guys, >> >> In our application we want to be able to send commands to a specific >> asterisk channel during a long period of time. It's a long-lasting call >> that we want to manipulate (may last for few hours). >> >> One of ways of approaching it was to make an AGI call from asterisk >> which will create an AgiScript that will hold an AgiChannel instance that >> we'll use to send our commands. >> I know that the channel is closed once AgiScript#serve() method is >> finished. As a workaround we pause the serve()'s thread to keep AgiChannel >> open as long as we need. Should we look out for any timeouts that will >> eventually close the channel automatically? Do we need to send at least >> NoOp periodiacally to keep it open? >> >> Overall this doesn't look like a good solution anyway so I want to ask >> if we have any other options to achieve our goal? >> >> I can provide more info or code if needed. >> >> >> >> ------------------------------------------------------------------------------ >> WatchGuard Dimension instantly turns raw network data into actionable >> security intelligence. It gives you real-time visual feedback on key >> security issues and trends. Skip the complicated setup - simply import >> a virtual appliance and go from zero to informed in seconds.http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk >> >> >> >> _______________________________________________ >> Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> >> ------------------------------------------------------------------------------ >> WatchGuard Dimension instantly turns raw network data into actionable >> security intelligence. It gives you real-time visual feedback on key >> security issues and trends. Skip the complicated setup - simply import >> a virtual appliance and go from zero to informed in seconds. >> >> http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> > > > ------------------------------------------------------------------------------ > WatchGuard Dimension instantly turns raw network data into actionable > security intelligence. It gives you real-time visual feedback on key > security issues and trends. Skip the complicated setup - simply import > a virtual appliance and go from zero to informed in seconds.http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > > ------------------------------------------------------------------------------ > WatchGuard Dimension instantly turns raw network data into actionable > security intelligence. It gives you real-time visual feedback on key > security issues and trends. Skip the complicated setup - simply import > a virtual appliance and go from zero to informed in seconds. > > http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |
From: Yves A. <yv...@gm...> - 2014-01-31 16:05:23
|
oops... accidentially sent before finish..... so... how do you control the "thing" that should be able to do the call stuff?? some kind of webservice... anyway... if such an action is triggered or required I´d just connect to asterisk and fire any action with the AMI... the only thing you have to now is the channel of the call, you want to "manipulate".... you can do anything (ok... depending on your asterisk version, dialplan, skill etc.). if you don´t know the call, you can iterate through any open channel to identify the one you need, or you store the channel in a variable, that is set upon callstart and that you can read from another ami connection. you could use global or channel-variables or db-entrys for this purpose. right now, i am going to holidays for 10 days, so i can´t assist you the next time... if you want further tips on this topic after that time.... just write to the list.... regards, yves Am 31.01.2014 17:00, schrieb Yves A.: > Hi, > > how do you "control", > > > > > > > > > > > > > ,, > , > > > , > > > > > > > Am 30.01.2014 23:18, schrieb Artur Tamazyan: >> Let's say we receive a call and answer it. We know that it'll be a >> long call and that we want to be able to do some things with it, >> like: join conferences, leave that conferences, play sounds and do >> other stuff. So ideally we should be able to execute any asterisk >> application on this call's channel. What's the best way to do this? >> >> What I was trying to do is to execute AGI(..) to pass control to >> java. In normal situation it'll trigger the service() method of some >> AgiScript and return. But I prevent it from returning to keep the >> channel open for our commands. >> >> Regarding AMI: as I understood we can execute apps or set contexts >> only during call origination and we can't just execute smth for an >> already active call. If I'm not right please give an example of how >> to do it. >> >> I hope it makes the question clearer. I can give more details if you >> need. And thanks for your time. >> >> >> On Thu, Jan 30, 2014 at 10:52 PM, Yves A. <yv...@gm... >> <mailto:yv...@gm...>> wrote: >> >> Hi, >> >> I think, I do not understand your question... could you please >> explain your scenario a bit more? >> Holding a seperate channel for controlling another channels seems >> a bit overkill... so you must have special needs >> that I do not see abd that prevent you to go the "normal" way via >> AMI... >> >> yves >> >> Am 30.01.2014 13:40, schrieb Artur Tamazyan: >>> Hi guys, >>> >>> In our application we want to be able to send commands to a >>> specific asterisk channel during a long period of time. It's a >>> long-lasting call that we want to manipulate (may last for few >>> hours). >>> >>> One of ways of approaching it was to make an AGI call from >>> asterisk which will create an AgiScript that will hold an >>> AgiChannel instance that we'll use to send our commands. >>> I know that the channel is closed once AgiScript#serve() method >>> is finished. As a workaround we pause the serve()'s thread to >>> keep AgiChannel open as long as we need. Should we look out for >>> any timeouts that will eventually close the channel >>> automatically? Do we need to send at least NoOp periodiacally to >>> keep it open? >>> >>> Overall this doesn't look like a good solution anyway so I want >>> to ask if we have any other options to achieve our goal? >>> >>> I can provide more info or code if needed. >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> WatchGuard Dimension instantly turns raw network data into actionable >>> security intelligence. It gives you real-time visual feedback on key >>> security issues and trends. Skip the complicated setup - simply import >>> a virtual appliance and go from zero to informed in seconds. >>> http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk >>> >>> >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li... <mailto:Ast...@li...> >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> ------------------------------------------------------------------------------ >> WatchGuard Dimension instantly turns raw network data into actionable >> security intelligence. It gives you real-time visual feedback on key >> security issues and trends. Skip the complicated setup - simply >> import >> a virtual appliance and go from zero to informed in seconds. >> http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> <mailto:Ast...@li...> >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> >> ------------------------------------------------------------------------------ >> WatchGuard Dimension instantly turns raw network data into actionable >> security intelligence. It gives you real-time visual feedback on key >> security issues and trends. Skip the complicated setup - simply import >> a virtual appliance and go from zero to informed in seconds. >> http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk >> >> >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > |
From: Yves A. <yv...@gm...> - 2014-01-31 16:48:13
|
Hi, there is no generic approach for any purpose on the channels... it depends. "injecting a sound" in an ongoing call e.g. is "not possible" the easy way... but as always, there are workarounds if you do not want to put hands on asterisk -c-code... (btw.... which asterisk are you using??? take a look at the latest 11.x branch... really nice features are added compared to 1.6 or 1.8) the easiest way for "adding sound" is to transfer both channels into a conference (set with q to be quiet and not to hear meetme announcements)... then you can add any call from your dialplan into this conference and play whatever sound you like and any in the conference can hear ... it would even be possible to play the audio to only one channel.... you can also put your agi-call and the voice call into the meetme room from the beginning... then you do not have to look for channels and some things might become easier... I really have to go now... my bus is leaving in an hour ... see u later... 10 feb. yves Am 31.01.2014 17:11, schrieb Artur Tamazyan: > The "thing" is a java application. Currently I was able to get the > needed channel (it looks like SIP/192.168.220.14:52868-00000008). Can > you tell how can I for example play a sound or at least NoOp to it > using AMI? should I use OriginateAction to the above channel with NoOp > specified as an application? I just don't see the way to send commands > to channel using AMI and channel string above. > > > On Fri, Jan 31, 2014 at 6:05 PM, Yves A. <yv...@gm... > <mailto:yv...@gm...>> wrote: > > oops... accidentially sent before finish..... > > so... how do you control the "thing" that should be able to do the > call stuff?? some kind of webservice... anyway... > if such an action is triggered or required I´d just connect to > asterisk and fire any action with the AMI... > the only thing you have to now is the channel of the call, you > want to "manipulate".... you can do anything > (ok... depending on your asterisk version, dialplan, skill etc.). > if you don´t know the call, you can iterate through any open > channel to identify the one you need, or you > store the channel in a variable, that is set upon callstart and > that you can read from another ami connection. > you could use global or channel-variables or db-entrys for this > purpose. > > right now, i am going to holidays for 10 days, so i can´t assist > you the next time... if you want further tips on this > topic after that time.... just write to the list.... > > regards, > yves > > Am 31.01.2014 17:00, schrieb Yves A.: >> Hi, >> >> how do you "control", >> >> >> >> >> >> >> >> >> >> >> >> >> ,, >> , >> >> >> , >> >> >> >> >> >> >> Am 30.01.2014 23:18, schrieb Artur Tamazyan: >>> Let's say we receive a call and answer it. We know that it'll be >>> a long call and that we want to be able to do some things with >>> it, like: join conferences, leave that conferences, play sounds >>> and do other stuff. So ideally we should be able to execute any >>> asterisk application on this call's channel. What's the best way >>> to do this? >>> >>> What I was trying to do is to execute AGI(..) to pass control to >>> java. In normal situation it'll trigger the service() method of >>> some AgiScript and return. But I prevent it from returning to >>> keep the channel open for our commands. >>> >>> Regarding AMI: as I understood we can execute apps or set >>> contexts only during call origination and we can't just execute >>> smth for an already active call. If I'm not right please give an >>> example of how to do it. >>> >>> I hope it makes the question clearer. I can give more details if >>> you need. And thanks for your time. >>> >>> >>> On Thu, Jan 30, 2014 at 10:52 PM, Yves A. <yv...@gm... >>> <mailto:yv...@gm...>> wrote: >>> >>> Hi, >>> >>> I think, I do not understand your question... could you >>> please explain your scenario a bit more? >>> Holding a seperate channel for controlling another channels >>> seems a bit overkill... so you must have special needs >>> that I do not see abd that prevent you to go the "normal" >>> way via AMI... >>> >>> yves >>> >>> Am 30.01.2014 13:40, schrieb Artur Tamazyan: >>>> Hi guys, >>>> >>>> In our application we want to be able to send commands to a >>>> specific asterisk channel during a long period of time. >>>> It's a long-lasting call that we want to manipulate (may >>>> last for few hours). >>>> >>>> One of ways of approaching it was to make an AGI call from >>>> asterisk which will create an AgiScript that will hold an >>>> AgiChannel instance that we'll use to send our commands. >>>> I know that the channel is closed once AgiScript#serve() >>>> method is finished. As a workaround we pause the serve()'s >>>> thread to keep AgiChannel open as long as we need. Should >>>> we look out for any timeouts that will eventually close the >>>> channel automatically? Do we need to send at least NoOp >>>> periodiacally to keep it open? >>>> >>>> Overall this doesn't look like a good solution anyway so I >>>> want to ask if we have any other options to achieve our goal? >>>> >>>> I can provide more info or code if needed. >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> WatchGuard Dimension instantly turns raw network data into actionable >>>> security intelligence. It gives you real-time visual feedback on key >>>> security issues and trends. Skip the complicated setup - simply import >>>> a virtual appliance and go from zero to informed in seconds. >>>> http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk >>>> >>>> >>>> _______________________________________________ >>>> Asterisk-java-users mailing list >>>> Ast...@li... <mailto:Ast...@li...> >>>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>> >>> >>> ------------------------------------------------------------------------------ >>> WatchGuard Dimension instantly turns raw network data into >>> actionable >>> security intelligence. It gives you real-time visual >>> feedback on key >>> security issues and trends. Skip the complicated setup - >>> simply import >>> a virtual appliance and go from zero to informed in seconds. >>> http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li... >>> <mailto:Ast...@li...> >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> WatchGuard Dimension instantly turns raw network data into actionable >>> security intelligence. It gives you real-time visual feedback on key >>> security issues and trends. Skip the complicated setup - simply import >>> a virtual appliance and go from zero to informed in seconds. >>> http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk >>> >>> >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li... <mailto:Ast...@li...> >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> > > > ------------------------------------------------------------------------------ > WatchGuard Dimension instantly turns raw network data into actionable > security intelligence. It gives you real-time visual feedback on key > security issues and trends. Skip the complicated setup - simply > import > a virtual appliance and go from zero to informed in seconds. > http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > WatchGuard Dimension instantly turns raw network data into actionable > security intelligence. It gives you real-time visual feedback on key > security issues and trends. Skip the complicated setup - simply import > a virtual appliance and go from zero to informed in seconds. > http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Artur T. <ar...@ca...> - 2014-01-31 16:53:14
|
ok, have a good holidays :) I have some time for next question now On Fri, Jan 31, 2014 at 6:48 PM, Yves A. <yv...@gm...> wrote: > Hi, > > there is no generic approach for any purpose on the channels... it depends. > "injecting a sound" in an ongoing call e.g. is "not possible" the easy > way... but as always, there are workarounds if you do not want to put hands > on asterisk -c-code... > (btw.... which asterisk are you using??? take a look at the latest 11.x > branch... really nice features are added compared to 1.6 or 1.8) > the easiest way for "adding sound" is to transfer both channels into a > conference (set with q to be quiet and not to hear meetme announcements)... > then you can > add any call from your dialplan into this conference and play whatever > sound you like and any in the conference can hear ... it would even be > possible to play the > audio to only one channel.... > you can also put your agi-call and the voice call into the meetme room > from the beginning... then you do not have to look for channels and some > things might become > easier... > > I really have to go now... my bus is leaving in an hour ... see u later... > 10 feb. > > yves > > > Am 31.01.2014 17:11, schrieb Artur Tamazyan: > > The "thing" is a java application. Currently I was able to get the needed > channel (it looks like SIP/192.168.220.14:52868-00000008). Can you tell > how can I for example play a sound or at least NoOp to it using AMI? should > I use OriginateAction to the above channel with NoOp specified as an > application? I just don't see the way to send commands to channel using AMI > and channel string above. > > > On Fri, Jan 31, 2014 at 6:05 PM, Yves A. <yv...@gm...> wrote: > >> oops... accidentially sent before finish..... >> >> so... how do you control the "thing" that should be able to do the call >> stuff?? some kind of webservice... anyway... >> if such an action is triggered or required I´d just connect to asterisk >> and fire any action with the AMI... >> the only thing you have to now is the channel of the call, you want to >> "manipulate".... you can do anything >> (ok... depending on your asterisk version, dialplan, skill etc.). >> if you don´t know the call, you can iterate through any open channel to >> identify the one you need, or you >> store the channel in a variable, that is set upon callstart and that you >> can read from another ami connection. >> you could use global or channel-variables or db-entrys for this purpose. >> >> right now, i am going to holidays for 10 days, so i can´t assist you the >> next time... if you want further tips on this >> topic after that time.... just write to the list.... >> >> regards, >> yves >> >> Am 31.01.2014 17:00, schrieb Yves A.: >> >> Hi, >> >> how do you "control", >> >> >> >> >> >> >> >> >> >> >> >> >> ,, >> , >> >> >> , >> >> >> >> >> >> >> Am 30.01.2014 23:18, schrieb Artur Tamazyan: >> >> Let's say we receive a call and answer it. We know that it'll be a long >> call and that we want to be able to do some things with it, like: join >> conferences, leave that conferences, play sounds and do other stuff. So >> ideally we should be able to execute any asterisk application on this >> call's channel. What's the best way to do this? >> >> What I was trying to do is to execute AGI(..) to pass control to java. >> In normal situation it'll trigger the service() method of some AgiScript >> and return. But I prevent it from returning to keep the channel open for >> our commands. >> >> Regarding AMI: as I understood we can execute apps or set contexts only >> during call origination and we can't just execute smth for an already >> active call. If I'm not right please give an example of how to do it. >> >> I hope it makes the question clearer. I can give more details if you >> need. And thanks for your time. >> >> >> On Thu, Jan 30, 2014 at 10:52 PM, Yves A. <yv...@gm...> wrote: >> >>> Hi, >>> >>> I think, I do not understand your question... could you please explain >>> your scenario a bit more? >>> Holding a seperate channel for controlling another channels seems a bit >>> overkill... so you must have special needs >>> that I do not see abd that prevent you to go the "normal" way via AMI... >>> >>> yves >>> >>> Am 30.01.2014 13:40, schrieb Artur Tamazyan: >>> >>> Hi guys, >>> >>> In our application we want to be able to send commands to a specific >>> asterisk channel during a long period of time. It's a long-lasting call >>> that we want to manipulate (may last for few hours). >>> >>> One of ways of approaching it was to make an AGI call from asterisk >>> which will create an AgiScript that will hold an AgiChannel instance that >>> we'll use to send our commands. >>> I know that the channel is closed once AgiScript#serve() method is >>> finished. As a workaround we pause the serve()'s thread to keep AgiChannel >>> open as long as we need. Should we look out for any timeouts that will >>> eventually close the channel automatically? Do we need to send at least >>> NoOp periodiacally to keep it open? >>> >>> Overall this doesn't look like a good solution anyway so I want to >>> ask if we have any other options to achieve our goal? >>> >>> I can provide more info or code if needed. >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> WatchGuard Dimension instantly turns raw network data into actionable >>> security intelligence. It gives you real-time visual feedback on key >>> security issues and trends. Skip the complicated setup - simply import >>> a virtual appliance and go from zero to informed in seconds.http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk >>> >>> >>> >>> _______________________________________________ >>> Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> WatchGuard Dimension instantly turns raw network data into actionable >>> security intelligence. It gives you real-time visual feedback on key >>> security issues and trends. Skip the complicated setup - simply import >>> a virtual appliance and go from zero to informed in seconds. >>> >>> http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> Asterisk-java-users mailing list >>> Ast...@li... >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >>> >>> >> >> >> ------------------------------------------------------------------------------ >> WatchGuard Dimension instantly turns raw network data into actionable >> security intelligence. It gives you real-time visual feedback on key >> security issues and trends. Skip the complicated setup - simply import >> a virtual appliance and go from zero to informed in seconds.http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk >> >> >> >> _______________________________________________ >> Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> >> >> >> >> ------------------------------------------------------------------------------ >> WatchGuard Dimension instantly turns raw network data into actionable >> security intelligence. It gives you real-time visual feedback on key >> security issues and trends. Skip the complicated setup - simply import >> a virtual appliance and go from zero to informed in seconds. >> >> http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> >> > > > ------------------------------------------------------------------------------ > WatchGuard Dimension instantly turns raw network data into actionable > security intelligence. It gives you real-time visual feedback on key > security issues and trends. Skip the complicated setup - simply import > a virtual appliance and go from zero to informed in seconds.http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > WatchGuard Dimension instantly turns raw network data into actionable > security intelligence. It gives you real-time visual feedback on key > security issues and trends. Skip the complicated setup - simply import > a virtual appliance and go from zero to informed in seconds. > > http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |