Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] AGI asterisk high balance


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
miles.chet at gmail.com
Guest





PostPosted: Sun May 04, 2008 3:21 am    Post subject: [asterisk-users] AGI asterisk high balance Reply with quote

Hey Matt,

What make me choice, or thinking in choose JAVA-AGI so far i know there is a
way of using with a container (jboss or something like that) so the requests
come as an servlet request.

Someone had this kind of env?

Thanks
On 5/3/08, Matt Watson <mwatson at becon.org> wrote:
Quote:

There is really no reason why you cannot.



Personally? I'd avoid using Java for AGI's that you think are going to
receive heavy use? simply because the JVM adds a lot of overhead, and
possibly a very real performance impact from having the load the JVM
everytime. Of course there is overhead as well if you do PHP instead, as
the PHP interpreter has to load everytime? but that's probably pretty
light-weight in comparison to the JVM.



Of course you could compile your Java code to native binaries to work
around that problem, but I have no experience doing that.



Please keep in mind that I have not actually created or used any Java
AGI's? really just my thoughts without any experience.



--

Matt



*From:* asterisk-users-bounces at lists.digium.com [mailto:
asterisk-users-bounces at lists.digium.com] *On Behalf Of *chetherston miles
*Sent:* Saturday, May 03, 2008 6:30 PM
*To:* Asterisk Users Mailing List - Non-Commercial Discussion
*Subject:* [asterisk-users] AGI asterisk high balance



Hello,



Is there a problem to use AGI JAVA to write an AGI to billing calls and
customer accounts?



Anyone have experience with it could give me some tips?



Thanks,



_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080504/ac536bb3/attachment.htm
Back to top
tobias.wolf at evision.de
Guest





PostPosted: Sun May 04, 2008 3:32 am    Post subject: [asterisk-users] AGI asterisk high balance Reply with quote

Hi,

Matt Watson schrieb:
Quote:

There is really no reason why you cannot.

Personally? I?d avoid using Java for AGI?s that you think are going to
receive heavy use? simply because the JVM adds a lot of overhead, and
possibly a very real performance impact from having the load the JVM
everytime.


I don't think that this reason is really valid, if using the right Java
AGI framework.

e.g. Asterisk-Java (http://asterisk-java.org/) starts a server first and
every call to an AGI is directed and handeld from this server. The
server process can reside on the same host as the asterisk server, or on
a seperate server.

Regards,

Tobias
Back to top
greymanvoip at gmail.com
Guest





PostPosted: Sun May 04, 2008 3:34 am    Post subject: [asterisk-users] AGI asterisk high balance Reply with quote

If you've got anything but trivial AGI loads you should switch to
FastAGI and put your business logic on a separate server to your
Asterisk server. I use a deployment where a call could make up to 3
AGI requests per call before being put through (for things such as
looking up accountcode, checking account credit, setting PSTN
callerid). We monitor the time thw whole process takes and on average
it's less than 100ms on an Asteisk server that peaks at 200
simultaneous calls (400 bridged) and 3 to 5 call set ups per second.
The business logic processing the FastAGI calls is C# and .net which
means Java would be able to handle it easily as well. The most likely
bottleneck under high load will be your database.

Regards,

Greyman.
Back to top
martins at bebr.ufl.edu
Guest





PostPosted: Mon May 05, 2008 7:54 am    Post subject: [asterisk-users] AGI asterisk high balance Reply with quote

Hello folks,

Someone just asked the same question on our Asterisk-Java users mailing
list. I posted a small blog entry at http://asterisk-java.org/ about
doing AGI (FastAGI) in a JBoss MBean. I think no matter what language,
it is going to be better to do FastAGI than spawn a new process every
time -- in which case a Java daemon may even be able to outperform more
traditional languages as it optimizes at runtime Smile.

Cheers,


Martin Smith, Systems Developer
martins at bebr.ufl.edu
Bureau of Economic and Business Research
University of Florida
(352) 392-0171 Ext. 221


________________________________

From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of
chetherston miles
Sent: Sunday, May 04, 2008 4:22 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] AGI asterisk high balance


Hey Matt,

What make me choice, or thinking in choose JAVA-AGI so far i
know there is a way of using with a container (jboss or something like
that) so the requests come as an servlet request.

Someone had this kind of env?

Thanks


On 5/3/08, Matt Watson <mwatson at becon.org> wrote:

There is really no reason why you cannot.



Personally... I'd avoid using Java for AGI's that you
think are going to receive heavy use... simply because the JVM adds a
lot of overhead, and possibly a very real performance impact from having
the load the JVM everytime. Of course there is overhead as well if you
do PHP instead, as the PHP interpreter has to load everytime... but
that's probably pretty light-weight in comparison to the JVM.



Of course you could compile your Java code to native
binaries to work around that problem, but I have no experience doing
that.



Please keep in mind that I have not actually created or
used any Java AGI's... really just my thoughts without any experience.



--

Matt



From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of
chetherston miles
Sent: Saturday, May 03, 2008 6:30 PM
To: Asterisk Users Mailing List - Non-Commercial
Discussion
Subject: [asterisk-users] AGI asterisk high balance



Hello,



Is there a problem to use AGI JAVA to write an AGI to
billing calls and customer accounts?



Anyone have experience with it could give me some tips?



Thanks,




_______________________________________________
-- Bandwidth and Colocation Provided by
http://www.api-digital.com <http://www.api-digital.com/> --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:

http://lists.digium.com/mailman/listinfo/asterisk-users



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080505/98c6fe77/attachment.htm
Back to top
rizwanhasham at gmail.com
Guest





PostPosted: Thu May 08, 2008 10:02 am    Post subject: [asterisk-users] AGI asterisk high balance Reply with quote

Well database really is a bottleneck for me. I am currently trying to do
rating stuff in agi using perl. What im doing is i lookup the rate of every
dialed code for every call from the mysql database using the longest match
technique. The longest match technique costs atleast 2-3 mysql queries for
every call untill the dialed code is matched out of 14000 dialcodes. I dont
know how to calculate the exact delay due to execution of agi, but on the
asterisk cli whenever that agi executes, there is a visual delay of about
half a sec to move from the agi extension to the next extension (can anybody
tell me how to calculate the delay).

Now im planning to use the manager api for constant connectivity to mysql
and to enhance the longest match technique. Can anybody help me with this?
Is it a good idea to ue manager api for lookingup the rate of the live
call?

On Sun, May 4, 2008 at 1:34 PM, Grey Man <greymanvoip at gmail.com> wrote:

Quote:
If you've got anything but trivial AGI loads you should switch to
FastAGI and put your business logic on a separate server to your
Asterisk server. I use a deployment where a call could make up to 3
AGI requests per call before being put through (for things such as
looking up accountcode, checking account credit, setting PSTN
callerid). We monitor the time thw whole process takes and on average
it's less than 100ms on an Asteisk server that peaks at 200
simultaneous calls (400 bridged) and 3 to 5 call set ups per second.
The business logic processing the FastAGI calls is C# and .net which
means Java would be able to handle it easily as well. The most likely
bottleneck under high load will be your database.

Regards,

Greyman.

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users


--
Best Regards
Rizwan Hisham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080508/3b1166e5/attachment.htm
Back to top
bwentdg at pipeline.com
Guest





PostPosted: Thu May 08, 2008 11:19 pm    Post subject: [asterisk-users] AGI asterisk high balance Reply with quote

I think his connect/disconnect is going to take far longer than his 3
queries.
The fact that Asterisk doesn't support sustained MySQL connection from
the DialPlan
is in fact quite a big deal that Digium seems to have its head in the
sand about.
And one of those things that SHOULD come up in those "Is * Ready For
Prime Time Threads"

Rizwan Hisham wrote:
Quote:
Well database really is a bottleneck for me. I am currently trying to
do rating stuff in agi using perl. What im doing is i lookup the rate
of every dialed code for every call from the mysql database using the
longest match technique. The longest match technique costs atleast 2-3
mysql queries for every call untill the dialed code is matched out of
14000 dialcodes. I dont know how to calculate the exact delay due to
execution of agi, but on the asterisk cli whenever that agi executes,
there is a visual delay of about half a sec to move from the agi
extension to the next extension (can anybody tell me how to calculate
the delay).

Now im planning to use the manager api for constant connectivity to
mysql and to enhance the longest match technique. Can anybody help me
with this? Is it a good idea to ue manager api for lookingup the rate
of the live call?

On Sun, May 4, 2008 at 1:34 PM, Grey Man <greymanvoip at gmail.com
<mailto:greymanvoip at gmail.com>> wrote:

If you've got anything but trivial AGI loads you should switch to
FastAGI and put your business logic on a separate server to your
Asterisk server. I use a deployment where a call could make up to 3
AGI requests per call before being put through (for things such as
looking up accountcode, checking account credit, setting PSTN
callerid). We monitor the time thw whole process takes and on average
it's less than 100ms on an Asteisk server that peaks at 200
simultaneous calls (400 bridged) and 3 to 5 call set ups per second.
The business logic processing the FastAGI calls is C# and .net which
means Java would be able to handle it easily as well. The most likely
bottleneck under high load will be your database.

Regards,

Greyman.

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users




--
Best Regards
Rizwan Hisham
------------------------------------------------------------------------

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
tilghman at mail.jeffa...
Guest





PostPosted: Thu May 08, 2008 11:35 pm    Post subject: [asterisk-users] AGI asterisk high balance Reply with quote

On Thursday 08 May 2008 23:19:19 Al Baker wrote:
Quote:
The fact that Asterisk doesn't support sustained MySQL connection from
the DialPlan
is in fact quite a big deal that Digium seems to have its head in the
sand about.
And one of those things that SHOULD come up in those "Is * Ready For
Prime Time Threads"

I beg your pardon. Asterisk supports it just fine, if you use func_odbc, not
the MYSQL app in -addons, which isn't very well supported. func_odbc supports
fully persistent database connections and is quite fast.

--
Tilghman
Back to top
greymanvoip at gmail.com
Guest





PostPosted: Fri May 09, 2008 3:45 am    Post subject: [asterisk-users] AGI asterisk high balance Reply with quote

On Fri, May 9, 2008 at 5:19 AM, Al Baker <bwentdg at pipeline.com> wrote:
Quote:
I think his connect/disconnect is going to take far longer than his 3
queries.
The fact that Asterisk doesn't support sustained MySQL connection from
the DialPlan
is in fact quite a big deal that Digium seems to have its head in the
sand about.
And one of those things that SHOULD come up in those "Is * Ready For
Prime Time Threads"

I would not agree with that. Asterisk's primary purpose as a PBX is
moving the media around and doing lots of clever things with it.
Asterisk has lots of ways to do inter-process communication (AGI,
FastAGI, MAPI, Dialplan Apps) so the fact that it may not be optimised
for a purpose to what most of us use it for when there are good
options available to do the same thing does not hold water.

Now if you were to get me started on Asterisk and its CDR's I would
throw in a moan or two Wink.

In relation to timing how long the rates lookups take it's as simple
as taking a timestamp at the start of your application and suntracting
it from the timestamp when you're finished and spitting it out to a
log file. As far as the lookup taking too long the application logic I
use manages to lookup the rate using a combination of regular
expressions and longet matches as well as interogate the customers
call plans of which they can have multiple with differnet combinations
of destinations in plans and pay as you go balances and return the
time for the call in well under 100ms. The logic is in C# but even so
I wouldn't expect Perl to be slow. I'd suggest timing how long your
database calls are. At one point the credit checks I was doing started
to go up over 1 second and it was purely down to the load on the
database (Postgresql). Getting a bigger server fixed it.

Regards,

Greyman.
Back to top
lee at datatrakpos.com
Guest





PostPosted: Fri May 09, 2008 11:55 am    Post subject: [asterisk-users] AGI asterisk high balance Reply with quote

Rizwan Hisham wrote:
Quote:
Well database really is a bottleneck for me. I am currently trying to do
rating stuff in agi using perl. What im doing is i lookup the rate of
every dialed code for every call from the mysql database using the
longest match technique. The longest match technique costs atleast 2-3
mysql queries for every call untill the dialed code is matched out of
14000 dialcodes. I dont know how to calculate the exact delay due to
execution of agi, but on the asterisk cli whenever that agi executes,
there is a visual delay of about half a sec to move from the agi
extension to the next extension (can anybody tell me how to calculate
the delay).

Now im planning to use the manager api for constant connectivity to
mysql and to enhance the longest match technique. Can anybody help me
with this? Is it a good idea to ue manager api for lookingup the rate
of the live call?


I'm a FirebirdSQL guy myself, but I find that if I implement connection pooling,
apps like the one you've described are faster since connection setup and tear
down are always expensive.
--

Warm Regards,

Lee
Back to top
stotaro at totarotechn...
Guest





PostPosted: Sun May 11, 2008 2:03 pm    Post subject: [asterisk-users] AGI asterisk high balance Reply with quote

On Sun, May 4, 2008 at 4:34 AM, Grey Man <greymanvoip at gmail.com> wrote:
Quote:
If you've got anything but trivial AGI loads you should switch to
FastAGI and put your business logic on a separate server to your
Asterisk server. I use a deployment where a call could make up to 3
AGI requests per call before being put through (for things such as
looking up accountcode, checking account credit, setting PSTN
callerid). We monitor the time thw whole process takes and on average
it's less than 100ms on an Asteisk server that peaks at 200
simultaneous calls (400 bridged) and 3 to 5 call set ups per second.
The business logic processing the FastAGI calls is C# and .net which
means Java would be able to handle it easily as well. The most likely
bottleneck under high load will be your database.

Regards,

Greyman.

I am not sure if this has been fixed since the old days, but FastAGI
would simply fail and stop if it could not connect to the remote
server.

A patch had to be applied and priority jumping had to be enabled.
With that, you could have two kinds of failover. Your priority
jumping line could point to a different server running the same AGI or
it could just continue your dialplan at the priority jump point.

Again, this was Asterisk 1.2.something, never tested on 1.4.x, and to
me was considered a bug. The patch fixed it but I am not sure if it
ever got merged and don't really care to do the research on a Sunday
Smile Gotta get cleaned up to see Mom.

Thanks,
Steve Totaro
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services