Re: [Asterisk-java-users] getOptionCommand Issue
Brought to you by:
srt
From: Miguel S. <m.s...@gm...> - 2013-06-06 17:54:20
|
Hi, getOption returns a primitive java char. You can provide a third parameter : Timeout (milliseconds) Then you can implement your switch statement using the char returned value. char option=getOption("mainmenu","12349",10000); switch(option){ case '1': ... break; case '2' : ... break; . . . else ...; } El 06/06/2013 11:48, "Atul Agrawal" <adi...@gm...> escribió: > Hello everyone, > This is my asterisk extension conf file as soon as caller calls handle > call to Java. > I want to know if the following will work. > > Asterisk extension.conf > exten=>100,Answer() > same=>n,AGI(agi://127.0.0.1/hello.agi) > > Java file > > > public void service(AgiRequest request, AgiChannel channel) throws AgiException > > { > > streamFile("welcome"); > */**Now I will play a main menu and it will ask user to choose.I then > *want to save it and perform action based on that.I*s the use correct? > * variable option should be string or int? > / > int option=getOption("mainmenu","12349"); > switch(option){ > > //will perform function based on what > user pressed > } > > hangup(); > } > > > ------------------------------------------------------------------------------ > How ServiceNow helps IT people transform IT departments: > 1. A cloud service to automate IT design, transition and operations > 2. Dashboards that offer high-level views of enterprise services > 3. A single system of record for all IT processes > http://p.sf.net/sfu/servicenow-d2d-j > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |