Re: [Asterisk-java-users] Agi scripts and native transfers
Brought to you by:
srt
From: E. M. <mar...@gm...> - 2008-04-04 14:55:02
|
Finally I can test it. If it is useful for someone, AGI works OK with attended transfers. However, if thereis an attended transfer inside an agi script, AGIChannel.getName() returns the 'old' channel name, and AGIChannel.getVariable("CHANNEL") returns the updated name. In example, figure two phones: SIP/101 and SIP/102 and this code for an AGI script in extension 123: //////////////////////////////////////// package test; import org.asteriskjava.fastagi.*; public class HelloAgiScript extends BaseAgiScript{ public void service(AgiRequest request, AgiChannel channel) throws AgiException { answer(); while(true){ streamFile("tt-monkeys"); System.out.println("Original: "+channel.getName()); System.out.println("New channel: "+channel.getVariable("CHANNEL")); } } ////////////////////////////////////////// If SIP/102 does an attended transfer of SIP/101 to this extension, the output of the program is: Original: SIP/102-xxxxx New channel: SIP/101-xxxxx Original: SIP/102-xxxxx New channel: SIP/101-xxxxx Original: SIP/102-xxxxx New channel: SIP/101-xxxxx On Thu, Mar 27, 2008 at 11:27 PM, Eduard Martínez <mar...@gm...> wrote: > Well in my case I was thinking in SIP attended transfers. With SIP phones > in attended transfers the transfered channel starts doing whathever was > doing the other channel: playing a sound, a bridge with another channel etc. > > > On Thu, Mar 27, 2008 at 9:19 PM, Martin Smith <ma...@be...> > wrote: > > > I haven't been able to do an attended transfer to anything natively. I > > was under the impression that app_transfer does not do attended transfers > > and ONLY transfers to an extension location in the dialplan (NOT an > > extension in progress), and you can only do an attended transfer via the > > features.conf method or a phone which knows how with a given channel > > technology that also supports it i.e. NOT an attended transfer to Voicemail, > > Playback, or any other such app. > > > > Maybe someone else here can comment on this. > > > > Martin Smith, Systems Developer > > ma...@be... > > Bureau of Economic and Business Research > > University of Florida > > (352) 392-0171 Ext. 221 > > > > > > ------------------------------ > > *From:* ast...@li... [mailto: > > ast...@li...] *On Behalf Of *Eduard > > Martínez > > *Sent:* Thursday, March 27, 2008 2:36 PM > > *To:* ast...@li... > > *Subject:* Re: [Asterisk-java-users] Agi scripts and native transfers > > > > > > > > On Thu, Mar 27, 2008 at 2:36 PM, Martin Smith <ma...@be...> > > wrote: > > > > > Can ongoing channel be able to be the target of a transfer? [...] > > > > > > > As far as I know, yes. But that's not the point. Maybe a valid example > > for you is: > > Party A calls Party B. Party B puts the call on hold and calls to the > > AGI script with the monkeys. Then Party B does the atended transfer with > > Party A and the AGI call. > > > > Think in the loop directly in the dialplan: > > > > exten => 1234, 1, PlayBack(tt-monkeys) > > exten => 1234, 2, Goto(1) > > > > If Party B does a native transfer to this extension, Party A starts > > hearing the monkeys and the loop continues with his channel. > > > > > > > > > > As an example, I haven't been able (in my one 5 minute try, anyway) to > > > convince Asterisk to do an attended transfer to voicemail. Asterisk-Java is > > > beside the issue here. I don't think you can have a pre-existing channel as > > > the target of an attended transfer, short of using an app that lets channels > > > comingle, like meet me. > > > > > > Hopefully someone can correct me if I'm wrong. > > > > > > > > > Martin Smith, Systems Developer > > > ma...@be... > > > Bureau of Economic and Business Research > > > University of Florida > > > (352) 392-0171 Ext. 221 > > > > > > > > > ------------------------------ > > > *From:* ast...@li... [mailto: > > > ast...@li...] *On Behalf Of *Eduard > > > Martínez > > > *Sent:* Wednesday, March 26, 2008 6:44 PM > > > *To:* ast...@li... > > > *Subject:* [Asterisk-java-users] Agi scripts and native transfers > > > > > > Hello, > > > I'm going to develop an AGI script but first I want to know if they > > > have problems with attended transfers. For instance, imagine an agi script > > > with a loop playing a sound (tt-monkeys?). Party A calls to Party B. Then > > > Party A also calls to the AGI script and start hearing the monkeys. If Party > > > A transfers Party B to the AGI script call, it will work? Sadly now I can > > > test it because I don't have a phone with attended transfer support. > > > Thank you. > > > > > > > > > > > > ------------------------------------------------------------------------- > > > Check out the new SourceForge.net Marketplace. > > > It's the best place to buy or sell services for > > > just about anything Open Source. > > > > > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > > > _______________________________________________ > > > Asterisk-java-users mailing list > > > Ast...@li... > > > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > > > > > > > > ------------------------------------------------------------------------- > > Check out the new SourceForge.net Marketplace. > > It's the best place to buy or sell services for > > just about anything Open Source. > > > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > > _______________________________________________ > > Asterisk-java-users mailing list > > Ast...@li... > > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > |