[Asterisk-Dev] Asterisk AGI Script using Java - Help Needed
Pathuri
hanu at jwcc.net
Wed Aug 20 19:29:11 MST 2003
I managed to fix it by chaning the prinln to print there by avoiding
two new line statements.
Best Regards.
Hanu
-----Original Message-----
From: asterisk-dev-admin at lists.digium.com
[mailto:asterisk-dev-admin at lists.digium.com]On Behalf Of Pathuri
Sent: Tuesday, August 19, 2003 3:31 PM
To: asterisk-dev at lists.digium.com
Subject: [Asterisk-Dev] Asterisk AGI Script using Java - Help Needed
Hello there,
I am trying to get my sample java program working but get the following
errors.
I am not sure why? However if I run the sample perl script that comes with
asterisk
I hear the audio and all the tests passes.
Please help.
Best Regards.
Hanu
------------------Java code -----------------
import java.lang.*;
import java.io.*;
public class AgiAdapter {
public static void main( String[] args ) {
System.err.println ("The numbe of Arguments are :" +
args.length);
for (int i = 0; i < args.length; i++ ) {
System.err.println (args[i]);
}
try {
String linea;
LineNumberReader in = new LineNumberReader( new
InputStreamReader( System.in ) );
do { //read AGI environmet
linea = in.readLine();
System.err.println ("ENV:" + linea);
} while ( linea.length() > 0 );
System.out.println ("SAY NUMBER 192837465 \"\"\n");
linea = in.readLine();
System.err.println("Received "+linea);
System.out.println ("SAY NUMBER 192837465 \"\"\n");
linea = in.readLine();
System.err.println("Received "+linea);
System.exit( 0 );
} catch( Exception ex ) {
System.err.println("Error: "+ex.getMessage());
}
}
}
-----------------error messages from
Asterisk------------------------------------
ENV:agi_request: test-java.agi
ENV:agi_channel: SIP/1000-158c
ENV:agi_language: en
ENV:agi_type: sip
ENV:agi_callerid: 1001
ENV:agi_dnid:
ENV:agi_rdnis:
ENV:agi_context: from-sip
ENV:agi_extension: 1000
ENV:agi_priority: 1
ENV:agi_enhanced: 0.0
ENV:
Received 510 Invalid or unknown command
Received 510 Invalid or unknown command
-----Original Message-----
From: asterisk-dev-admin at lists.digium.com
[mailto:asterisk-dev-admin at lists.digium.com]On Behalf Of Steve
Sent: Monday, August 18, 2003 10:28 AM
To: asterisk-dev at lists.digium.com
Subject: Re: [Asterisk-Dev] New gastman clone + what else?
On Tuesday 12 August 2003 09:57 am, Adam Goryachev wrote:
> I have hired someone to do some work on asterisk for me over the next
> couple of months, before they start, I would like to get a better idea of
> what other people need, which I can then dovetail into what I think my
> own 'requirements' are...
My observations with mice shows that under normal use people every now and
then drop things in the wrong location. I could just wonder how many
erronious drops a receptionist would do.
Personally got a firm belief that it should be done with keyboard.
At least there should be a keyboard option to run it from a keyboard. Having
a nice GUI could not hurt...
--
Steve
______________________________________
This sig is pending approval
_______________________________________________
Asterisk-Dev mailing list
Asterisk-Dev at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-dev
_______________________________________________
Asterisk-Dev mailing list
Asterisk-Dev at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-dev
More information about the asterisk-dev
mailing list