Re: IAX2 Java library (was Re: [Asterisk-Users] New IAX software phone (for WIndows platform))

2003-11-04 Thread Steven J. Sobol
On Mon, 3 Nov 2003, Steven Critchfield wrote:

 So you bought that line of Marketecture didn't you. I think there are
 several large open source projects that prove that C is maintainable.
 Maintainability is really a function of organization. If you can't be
 organized, you will not produce very maintainable C code. 

s/C code/code/g

Java might force organization somewhat, but if you're not organized, you 
still can make the code look like a complete mess.

-- 
JustThe.net Internet  New Media Services
22674 Motnocab Road * Apple Valley, CA 92307-1950 
Steve Sobol, Proprietor 
888.480.4NET (4638) * 248.724.4NET * [EMAIL PROTECTED]

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


IAX2 Java library (was Re: [Asterisk-Users] New IAX software phone (for WIndows platform))

2003-11-03 Thread Alastair Maw
On 03/11/03 00:25, Mark Spencer wrote:

As a side note, I strongly would like to see someone implement a
client using libiax2 which implements IAX2 instead of the (now
obsolescent) IAX version 1.
I'm implementing a Java-based IVR server (and yes, I know Asterisk does
IVR, and no, it's not flexible enough to do what I want and no, it
doesn't integrate well with the Java systems we have, etc. hence my
doing this).
Currently it uses SIP (using the NIST JAIN-SIP stack) and JMF to handle
RTP/audio stuff. I've found that JMF/RTP doesn't scale very well, as it
spawns a *lot* of threads, and can't reliably handle more than 20
simultaneous calls.
So, I'm investigating the possibility of writing an IAX library for
Java. Searching the archives, it seems various other people would be
interested in this. So, my questions are:
 - Should I implement IAX or IAX2? What's the main difference, other
   than IAX2 supporting trunking (which according to the docs needs a
   Zaptel timing source).
 - Has anyone else made any headway with this?

 - Is anyone else interested in making this an LGPL or even a GPL
   project and helping me with it? I'm likely to implement just the
   call management/DTMF/audio type stuff required for IVR initially
   (i.e. not worry about call xfer, etc.). It'll also be geared towards
   handling the hundreds of simultaneous calls required in a server
   environment, although there'll be no reason not to use it for IAX
   clients too.
Obviously such a library would enable a nice GUI cross-platform IAX(2?)
client to be easily created, which would be a nice by-product.
--
Alastair Maw
MX Telecom
http://www.mxtelecom.com
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


Re: IAX2 Java library (was Re: [Asterisk-Users] New IAX software phone (for WIndows platform))

2003-11-03 Thread Jeremy McNamara
Alastair Maw wrote:

On 03/11/03 00:25, Mark Spencer wrote:

As a side note, I strongly would like to see someone implement a
client using libiax2 which implements IAX2 instead of the (now
obsolescent) IAX version 1.


I'm implementing a Java-based IVR server (and yes, I know Asterisk does
IVR, and no, it's not flexible enough to do what I want and no, it
doesn't integrate well with the Java systems we have, etc. hence my
doing this).


Are you mad?  What is not flexable enough for you? Java knows what STDIN 
and STDOUT is, right?  What more do you need?



Jeremy McNamara

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


Re: IAX2 Java library (was Re: [Asterisk-Users] New IAX software phone (for WIndows platform))

2003-11-03 Thread Alastair Maw
On 03/11/03 16:35, Jeremy McNamara wrote:

I'm implementing a Java-based IVR server (and yes, I know Asterisk does
IVR, and no, it's not flexible enough to do what I want and no, it
doesn't integrate well with the Java systems we have, etc. hence my
doing this).
Are you mad?  What is not flexable enough for you? Java knows what STDIN 
and STDOUT is, right?  What more do you need?
Not wanting to start a flamewar, but...

  - I can't possibly fork a whole JVM process for each caller. It's much
too inefficient. This needs to support hundreds of simultaneous
calls, and the GNU Java compiler just isn't good enough for our
needs. I guess I could write an AGI wrapper script which connected
to the Java server over a TCP connection or something and piped the
stdin/out down the line to it.
  - We'd like to use Java because:
- Need to do RMI to existing systems. Can't be bothered with all
  the CORBA nonsense.
- It's more maintainable within our organization.
- We have lots of existing components to support.
- It does all the interoperability stuff we need very nicely,
  so we save time once the system is built (XML, etc.).
- We like it. :)
  - I need access to the raw audio streams in realtime for various
reasons (need to do DSP stuff for some clients, etc). Can I get this
easily with AGI? Along with this, I need to be able to play audio
from a URL. I don't want to have to download the whole file from the
URL in order to play it - it wants to be streamed. Is this possible
with AGI? The docs aren't very good for AGI, so I don't really
know...
  - I need to be able to generate large amounts of audio in realtime,
conference people together but then only play an audio file to one
person within the conference, etc. I don't think AGI is flexible
enough to do this.
  - I'd like to be able to move from Asterisk to something else if I
need to. This is why originally I was doing things using SIP/RTP.
  - The documentation for AGI is very poor. I know it is for IAX, too,
but I can see a Java IAX library being useful for client development
too, and I'd like to give a little back to the * community, you
know?
There are other reasons, but I haven't the time to explain right now. 
The above are the most important.

--
Alastair Maw
MX Telecom
http://www.mxtelecom.com
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


Re: IAX2 Java library (was Re: [Asterisk-Users] New IAX software phone (for WIndows platform))

2003-11-03 Thread Alastair Maw
On 03/11/03 18:02, Alastair Maw wrote:
I'm implementing a Java-based IVR server (and yes, I know Asterisk does
IVR, and no, it's not flexible enough to do what I want and no, it
doesn't integrate well with the Java systems we have, etc. hence my
doing this).


Are you mad?  What is not flexable enough for you? Java knows what 
STDIN and STDOUT is, right?  What more do you need?

snip
There are other reasons, but I haven't the time to explain right now. 
The above are the most important.
Additionally, I'd like to spread the load across two machines - one for 
the PSTN/SIP/IAX routing and one for the IVR software.

--
Alastair Maw
MX Telecom
http://www.mxtelecom.com
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


Re: IAX2 Java library (was Re: [Asterisk-Users] New IAX software phone (for WIndows platform))

2003-11-03 Thread Steven Critchfield
On Mon, 2003-11-03 at 12:02, Alastair Maw wrote:
 On 03/11/03 16:35, Jeremy McNamara wrote:
 
  I'm implementing a Java-based IVR server (and yes, I know Asterisk does
  IVR, and no, it's not flexible enough to do what I want and no, it
  doesn't integrate well with the Java systems we have, etc. hence my
  doing this).
  
  Are you mad?  What is not flexable enough for you? Java knows what STDIN 
  and STDOUT is, right?  What more do you need?
 
 Not wanting to start a flamewar, but...

Awww, come on, they are fun, right? (more below that isn't joking
around)

- I can't possibly fork a whole JVM process for each caller. It's much
  too inefficient. This needs to support hundreds of simultaneous
  calls, and the GNU Java compiler just isn't good enough for our
  needs. I guess I could write an AGI wrapper script which connected
  to the Java server over a TCP connection or something and piped the
  stdin/out down the line to it.

Good reason maybe not to support Java, but you are correct in the
potential interface.

- We'd like to use Java because:
  - Need to do RMI to existing systems. Can't be bothered with all
the CORBA nonsense.
  - It's more maintainable within our organization.
  - We have lots of existing components to support.
  - It does all the interoperability stuff we need very nicely,
so we save time once the system is built (XML, etc.).
  - We like it. :)

Ohhh, Java weenies stick together. ;) 

- I need access to the raw audio streams in realtime for various
  reasons (need to do DSP stuff for some clients, etc). Can I get this
  easily with AGI? Along with this, I need to be able to play audio
  from a URL. I don't want to have to download the whole file from the
  URL in order to play it - it wants to be streamed. Is this possible
  with AGI? The docs aren't very good for AGI, so I don't really
  know...

No, you can not get to this all easily with AGI. AGI currently will play
files on a currently mounted filesystem. Audio can be gotten out of it,
but it is in a strange manner, and is only half of the requirement you
listed. Sounds like you really need a C programmer and get into the guts
of asterisk. Can't get more flexible than having the source code
yourself to do anything you want. You could add your DSP routines into
the dsp.c file and call them when needed. You can also write a asterisk
application and have direct access to all the audio in every direction
just as you want it.

- I need to be able to generate large amounts of audio in realtime,
  conference people together but then only play an audio file to one
  person within the conference, etc. I don't think AGI is flexible
  enough to do this.

Meetme is doing the conferencing real well already, maybe needs a little
tweeking to fully meet your needs, but it is a known working bit of
code.

- I'd like to be able to move from Asterisk to something else if I
  need to. This is why originally I was doing things using SIP/RTP.

What else is there worth using??? Are you one of those people who always
develops apps thinking, what if someone buys this and wants to run it on
Oracle? or atleast something to that idea. 

- The documentation for AGI is very poor. I know it is for IAX, too,
  but I can see a Java IAX library being useful for client development
  too, and I'd like to give a little back to the * community, you
  know?

Actually they documentation is just programmer oriented. The
documentation is included as example scripts and the section of
apps/app_agi.c that contains a nice description of each function that is
available. You can even do the following from the CLI, show agi to
give you a list of agi commands, and show agi command to get the
paragraph or more of description of what each command does. This is one
of the few parts of asterisk where the documentation actually shines
pretty well.

 There are other reasons, but I haven't the time to explain right now. 
 The above are the most important.
-- 
Steven Critchfield  [EMAIL PROTECTED]

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


Re: IAX2 Java library (was Re: [Asterisk-Users] New IAX software phone (for WIndows platform))

2003-11-03 Thread Steven Critchfield
On Mon, 2003-11-03 at 13:49, Alastair Maw wrote:
 On 03/11/03 18:02, Alastair Maw wrote:
  I'm implementing a Java-based IVR server (and yes, I know Asterisk does
  IVR, and no, it's not flexible enough to do what I want and no, it
  doesn't integrate well with the Java systems we have, etc. hence my
  doing this).
 
 
  Are you mad?  What is not flexable enough for you? Java knows what 
  STDIN and STDOUT is, right?  What more do you need?
  
 snip
  There are other reasons, but I haven't the time to explain right now. 
  The above are the most important.
 
 Additionally, I'd like to spread the load across two machines - one for 
 the PSTN/SIP/IAX routing and one for the IVR software.

Unless the IVR is way over bloated, or the routing you mention incurs
heavy codec costs, one machine is fine. 

-- 
Steven Critchfield  [EMAIL PROTECTED]

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


Re: IAX2 Java library (was Re: [Asterisk-Users] New IAX software phone (for WIndows platform))

2003-11-03 Thread Mark Spencer
   - Should I implement IAX or IAX2? What's the main difference, other
 than IAX2 supporting trunking (which according to the docs needs a
 Zaptel timing source).

IAX2 without any question.  You will not be required to run trunk mode in
your case, especially if you're just doing it locally, but IAX2 is highly
consistent and can be very easily parsed (see iax-parser.c in libiax2 /
asterisk)

Mark

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


Re: IAX2 Java library (was Re: [Asterisk-Users] New IAX software phone (for WIndows platform))

2003-11-03 Thread Alastair Maw
On 03/11/03 20:03, Steven Critchfield wrote:

Sounds like you really need a C programmer and get into the guts
of asterisk. Can't get more flexible than having the source code
yourself to do anything you want. You could add your DSP routines into
the dsp.c file and call them when needed. You can also write a asterisk
application and have direct access to all the audio in every direction
just as you want it.
But C isn't as maintainable as nice Java apps, and it's as simple as 
that. Basically, I'm after the most powerful interface possible to 
Asterisk, but trying to make it as friendly as possible to code things 
against. As far as our organization is concerned, that pretty much means 
Java objects.

  - I'd like to be able to move from Asterisk to something else if I
need to. This is why originally I was doing things using SIP/RTP.
What else is there worth using??? Are you one of those people who always
develops apps thinking, what if someone buys this and wants to run it on
Oracle? or atleast something to that idea. 
There isn't anything else worth using. :)
But there might be in six months' time. Or we might want to plug the IVR 
into something with far more channels than an E1 that has a Cisco badge 
on the front and talks SS7 (although I guess we can always break that 
into a T1 channel bank or whatever and plug T1s into the TE405Ps we have 
on order).

  - The documentation for AGI is very poor.
Actually they documentation is just programmer oriented. The
documentation is included as example scripts and the section of
apps/app_agi.c that contains a nice description of each function that is
available. snip
I shall look into that. Thanks. :)

--
Alastair Maw
MX Telecom
http://www.mxtelecom.com
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


Re: IAX2 Java library (was Re: [Asterisk-Users] New IAX software phone (for WIndows platform))

2003-11-03 Thread Steven Critchfield
On Mon, 2003-11-03 at 16:27, Alastair Maw wrote:
 On 03/11/03 20:03, Steven Critchfield wrote:
 
  Sounds like you really need a C programmer and get into the guts
  of asterisk. Can't get more flexible than having the source code
  yourself to do anything you want. You could add your DSP routines into
  the dsp.c file and call them when needed. You can also write a asterisk
  application and have direct access to all the audio in every direction
  just as you want it.
 
 But C isn't as maintainable as nice Java apps, and it's as simple as 
 that. Basically, I'm after the most powerful interface possible to 
 Asterisk, but trying to make it as friendly as possible to code things 
 against. As far as our organization is concerned, that pretty much means 
 Java objects.

So you bought that line of Marketecture didn't you. I think there are
several large open source projects that prove that C is maintainable.
Maintainability is really a function of organization. If you can't be
organized, you will not produce very maintainable C code. 

I'll point out that I am not a C programmer, but making patches to
asterisk isn't that difficult.  I have also made patches to the kernel
without too much hair pulling. 

-- 
Steven Critchfield [EMAIL PROTECTED]

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users