Re: [Asterisk-java-users] OriginateAction.setVariable
Brought to you by:
srt
From: Stefan R. <sr...@re...> - 2005-09-07 00:21:49
|
On Tue, 2005-09-06 at 17:56 +0200, Tobias Wolf wrote: > first of all i am still using asterisk-java-0.1 because i didn't want to=20 > disturb the AGIs presently in use :-S You can still use your "old" AGIs with Asterisk-Java 0.2-rc1 though you will get a compile time warning about using a deprecated API. > The call is executed correctly and the sound is streamed into the=20 > conference, but the channel variable is not. When originating a call two channels are involved. Let's asume you originate a call from A to B then what happens looks like: A channel is created to A: ----> A A is ringing When A is answered the second channel is created: ----> A ----> B The channel variables are set on the channel from A to B only. So when you change your example to OriginateAction originateAction =3D new OriginateAction(); originateAction.setChannel("Local/5000@test"); originateAction.setVariable("var1=3DTEST"); originateAction.setExten("5001"); originateAction.setContext("test"); originateAction.setPriority(new Integer(1)); originateAction.setTimeout(new Integer(30000)); and your extensions.conf to [test] exten =3D> 5000,1,Answer() exten =3D> 5000,2,NoOp(Our var is not printed here: ${var1}) exten =3D> 5000,3,Playback(demo-abouttotry) exten =3D> 5000,4,Hangup() exten =3D> 5001,1,NoOp(Our var is printed here: ${var1}) exten =3D> 5001,2,MeetMe(1) you will see that your channel variable is actually set on the channel to the MeetMe room. Does that help in your case? =3DStefan |