Re: [Asterisk-java-users] setVarAction Issue
Brought to you by:
srt
From: Rounak S. <rou...@gm...> - 2013-06-13 10:03:40
|
Hii, yes I want to call the party and play a sound but the sound varies for different party. -If you want to make all fully automagic system... you have to create some kind of dialer, use TTS and some other enhanced techniques. Not to hard to do, but maybe to difficult for a novice... yes I am aware that I will have to use TTS and other enhanced technique.I could not get that "you have to create a dialer"? In my system patient can call system and get redirected to java program using agi , get information about health,bills etc (this will be conveyed using tts). Moreover I am creating another program using java manager AMI(my mentor suggested me to use this) where hospital can call every patient from database and play voice file which is different for different patients. originateAction = new OriginateAction(); originateAction.setChannel("dahdi/g0/01234567"); As I have to dial 01234567 I doubt if setting channel to dahdi/go/01234567 will call 01234567.Will it? originateAction.setContext("medicine"); originateAction.setExten("s"); originateAction.setPriority(1); originateAction.setTimeout(30000l); originateAction.setAsync(true); and have the following context in your asterisk: [medicine] exten => s,1,Answer() exten => s,n,*Playback(your voicefile goes here)* exten => s,n,Hangup() How will I change the filename under Playback?.Therefore I need some variable that can be used through manager AMI. As I want to call many patients at a time I also cant replace the file to other each time but under same name. This idea come to my mind.Is it good?Is there any better way? [medicine] exten=>_XX,1,Answer() same=>n,Playback(${EXTEN}) same=>n,Hangup(); And I will store file name in that format from java accordingly. Please let me know if there is any better way. Moreover how many call can I make together in asterisk? Thanks fro helping me. On Thu, Jun 13, 2013 at 2:43 PM, Yves A. <yv...@gm...> wrote: > > > pls. see inline. > > regards, > yves > > Am 13.06.2013 10:44, schrieb Rounak Saha: > > Hii yves, > Sorry am new to Asterisk and Asterisk-java. > > > dont worry, we all have been beginners someday.. > > > > just after posting I realised that I havenot set the channel correct and > have not send it through manager connection. > I guessed it should be setChannel("incoming-call").But now it seems its > incorrect. > > > unfortunately not... "incoming-call" is one of your contexts. > > > > Actually I am working under a software for Hospital where I have to call > patients(as max as possible at a time) and remind them to take > medicine.Numbers and medicine to take will be extracted from hospital > Database > If you can suggest a good way to do it,then it will be great > > > this is too little info to make a qualified suggestion... If you want to > make all fully automagic system... you have to create some kind of dialer, > use TTS and some other enhanced techniques. > Not to hard to do, but maybe to difficult for a novice... > > > What I though of doing was: > > [incoming-call] > exten,300,1,Answer() > same=>n,Dial(DAHDI/GO/${number}) where number will be set using AMI > under a for loop,each time changing the number value. > > > > Now I am just testing the various commands in Asterisk-Java. > > This works fine in asterisk though. > > *[incoming-call]* > exten=>300,1,Answer() > same=>n,Set(number="incoming-call,301,1") > same=>n,Goto(${number}) > > exten=>301,1,Playback(b) > > So is there not a way to set variable in context? > I tried originateAction.setvariable("number",""value") but it didnot work > also.Whats the use of originateAction.setVariable command then? > > > A call usually has two channels involved... with setVariable you set the > variable on the first (initiating) channel. If you need to access these > variables > on the second channel, you must go another way. But again... you´re trying > the wrong approach. This way you would connect the extension 300 with > the dialled party, but as far as I understood, you want to call the party > and play a soundfile...? > Lets say you want to call 01-234567 and play the voicefile after pickup... > try this: > > originateAction = new OriginateAction(); > originateAction.setChannel("dahdi/g0/01234567"); > originateAction.setContext("medicine"); > originateAction.setExten("s"); > originateAction.setPriority(1); > originateAction.setTimeout(30000l); > originateAction.setAsync(true); > > and have the following context in your asterisk: > > [medicine] > exten => s,1,Answer() > exten => s,n,Playback(your voicefile goes here) > exten => s,n,Hangup() > > > > > - for these kind of experiments I´d recommend using an AGI... > As directed from my mentor(am doing GSOC http://www.google-melange.com/) > I can use AMI only. > > Please help. > > >> > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Windows: > > Build for Windows Store. > http://p.sf.net/sfu/windows-dev2dev > > > > _______________________________________________ > Asterisk-java-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Windows: > > Build for Windows Store. > > http://p.sf.net/sfu/windows-dev2dev > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |