VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
shoaib at breezecom.ae Guest
|
Posted: Fri Jun 05, 2009 9:05 am Post subject: [Freeswitch-users] Freeswitch creating more then two session |
|
|
Hi FS-Users,
I am having an strange problem of sessions in freeswitch.
For every call Freeswitch is creating more than two sessions (in and out legs). For example, I have seen 260+ sessions for just 30+ calls whereas there should not be more than 60 sessions for just 30 calls.
I have seen the same problem with 1.0.4pre8 and trunk version.
I am using default values from switch.conf.xml for max_sessions (1000) and sessions_per_second(30).
Freeswitch create many sessions only when there is good load on the system. It works fine with the steady load of 50-100 calls. However, if I give it 200+ calls at once then it breaks.
Any suggestion?
Shoaib |
|
Back to top |
|
|
anthony.minessale at g... Guest
|
Posted: Fri Jun 05, 2009 9:09 am Post subject: [Freeswitch-users] Freeswitch creating more then two session |
|
|
No real suggestions because there is very little information here.
We tend to not address load testing issues because most problems are caused by improper test environments and user error.
My suggestion is to try it for real instead of in a test land.
On Fri, Jun 5, 2009 at 12:35 AM, Shoaib Khanzada <shoaib@breezecom.ae (shoaib@breezecom.ae)> wrote:
--
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400 |
|
Back to top |
|
|
skhanzada at gmail.com Guest
|
Posted: Fri Jun 05, 2009 3:14 pm Post subject: [Freeswitch-users] Freeswitch creating more then two session |
|
|
Thanks for the reply….
I was not running it for testing purpose because I’ve completed all testing successfully.
We are running freeswitch in a voip carrier grade environment. It works perfectly alright in off peak hours when we have low calls ratio around 100-150 concurrent calls. However, in peak hours this goes beyond 200 calls and on that point freeswitch start creating many sessions for each calls. I have seen the sessions using “status” command and calls using “show calls count”.
We are using javascript to select the route from the mysql database for each call. Could it be because script is taking longer than expected amount of time to retrieve a route? and freeswitch continuously keep creating sessions for incoming calls. That’s why I see low no of connected calls (if ‘show calls count’ only display the connected calls) whereas sessions are continuously being created by freeswitch as it is receiving many calls.
If above text confuses you, nevermind just answer the following questions.
1) Does ‘show calls count’ display the connected calls only?
2) When freeswitch create session instances? Before bridge or after bridge? Or one before bridge and one after bridge?
Thanks,
Shoaib |
|
Back to top |
|
|
mike at jerris.com Guest
|
Posted: Fri Jun 05, 2009 3:26 pm Post subject: [Freeswitch-users] Freeswitch creating more then two session |
|
|
On Jun 5, 2009, at 4:11 PM, Shoaib Khanzada wrote:
Quote: | Thanks for the reply….
I was not running it for testing purpose because I’ve completed all testing successfully.
We are running freeswitch in a voip carrier grade environment. It works perfectly alright in off peak hours when we have low calls ratio around 100-150 concurrent calls. However, in peak hours this goes beyond 200 calls and on that point freeswitch start creating many sessions for each calls. I have seen the sessions using “status” command and calls using “show calls count”.
We are using javascript to select the route from the mysql database for each call. Could it be because script is taking longer than expected amount of time to retrieve a route? and freeswitch continuously keep creating sessions for incoming calls. That’s why I see low no of connected calls (if ‘show calls count’ only display the connected calls) whereas sessions are continuously being created by freeswitch as it is receiving many calls.
If above text confuses you, nevermind just answer the following questions.
1) Does ‘show calls count’ display the connected calls only?
|
Only bridged calls (2 sessions)
Quote: | 2) When freeswitch create session instances? Before bridge or after bridge? Or one before bridge and one after bridge?
|
It creates a session when it gets an incomming call and creates one for each outgoing call, unrelated to bridging.
How are you doing the bridge in your script? Are you setting a var then dropping out of the js to do the bridge? Can you post your js file?
Mike |
|
Back to top |
|
|
jim at evolutiontel.net Guest
|
Posted: Fri Jun 05, 2009 7:02 pm Post subject: [Freeswitch-users] Freeswitch creating more then two session |
|
|
Could it be that you are getting several INVITE messages per call due to 100 Trying message is not being sent until after the route is selected from your java routing script?
You might be able to send a 100 trying from your dialplan or script. Keep in mind that this message stops timers on the originating side.
- original message -
Subject: Re: [Freeswitch-users] Freeswitch creating more then two sessions for one call
From: Michael Jerris <mike@jerris.com>
Date: 05/06/2009 20:27
On Jun 5, 2009, at 4:11 PM, Shoaib Khanzada wrote:
Quote: | Thanks for the reply….
I was not running it for testing purpose because I’ve completed all
testing successfully.
We are running freeswitch in a voip carrier grade environment. It
works perfectly alright in off peak hours when we have low calls
ratio around 100-150 concurrent calls. However, in peak hours this
goes beyond 200 calls and on that point freeswitch start creating
many sessions for each calls. I have seen the sessions using
“status†command and calls using “show calls countâ€.
We are using javascript to select the route from the mysql database
for each call. Could it be because script is taking longer than
expected amount of time to retrieve a route? and freeswitch
continuously keep creating sessions for incoming calls. That’s why I
see low no of connected calls (if ‘show calls count’ only display
the connected calls) whereas sessions are continuously being created
by freeswitch as it is receiving many calls.
If above text confuses you, nevermind just answer the following
questions.
1) Does ‘show calls count’ display the connected calls only?
|
Only bridged calls (2 sessions)
Quote: | 2) When freeswitch create session instances? Before bridge or
after bridge? Or one before bridge and one after bridge?
|
It creates a session when it gets an incomming call and creates one
for each outgoing call, unrelated to bridging.
How are you doing the bridge in your script? Are you setting a var
then dropping out of the js to do the bridge? Can you post your js
file?
Mike
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org |
|
Back to top |
|
|
mike at jerris.com Guest
|
Posted: Fri Jun 05, 2009 10:19 pm Post subject: [Freeswitch-users] Freeswitch creating more then two session |
|
|
We already send a 100 before the call even hits the dialplan.
Mike
On Jun 5, 2009, at 8:00 PM, "Jim Burke" <jim@evolutiontel.net> wrote:
Quote: | Could it be that you are getting several INVITE messages per call
due to 100 Trying message is not being sent until after the route is
selected from your java routing script?
You might be able to send a 100 trying from your dialplan or script.
Keep in mind that this message stops timers on the originating side.
- original message -
Subject: Re: [Freeswitch-users] Freeswitch creating more then two
sessions for one call
From: Michael Jerris <mike@jerris.com>
Date: 05/06/2009 20:27
On Jun 5, 2009, at 4:11 PM, Shoaib Khanzada wrote:
Quote: | Thanks for the replyc.
I was not running it for testing purpose because Ifve completed all
testing successfully.
We are running freeswitch in a voip carrier grade environment. It
works perfectly alright in off peak hours when we have low calls
ratio around 100-150 concurrent calls. However, in peak hours this
goes beyond 200 calls and on that point freeswitch start creating
many sessions for each calls. I have seen the sessions using
gstatush command and calls using gshow calls counth.
We are using javascript to select the route from the mysql database
for each call. Could it be because script is taking longer than
expected amount of time to retrieve a route? and freeswitch
continuously keep creating sessions for incoming calls. Thatfs why I
see low no of connected calls (if eshow calls countf only display
the connected calls) whereas sessions are continuously being created
by freeswitch as it is receiving many calls.
If above text confuses you, nevermind just answer the following
questions.
1) Does eshow calls countf display the connected calls only?
|
Only bridged calls (2 sessions)
Quote: | 2) When freeswitch create session instances? Before bridge or
after bridge? Or one before bridge and one after bridge?
|
It creates a session when it gets an incomming call and creates one
for each outgoing call, unrelated to bridging.
How are you doing the bridge in your script? Are you setting a var
then dropping out of the js to do the bridge? Can you post your js
file?
Mike
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
|
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org |
|
Back to top |
|
|
skhanzada at gmail.com Guest
|
Posted: Sat Jun 06, 2009 2:57 am Post subject: [Freeswitch-users] Freeswitch creating more then two session |
|
|
Following is the js i am using to select route and bridge the call....
use("ODBC");
var DSN = "myodbc";
var DB_USER = "neo";
var DB_PASS = ".....";
var sql;
var prefix1;
var ip1;
var no2;
var bridge_str;
if(argv[0]=="")
exit();
if(argv[1]=="")
exit();
ip1 =argv[0].split("@")[1];
var no1=argv[1];
var sql = "SELECT id,prefix,name FROM internal_auth where substring('"+no1+"',1,length(prefix))=prefix and ip='" + ip1 +"' and active=1;";
var authName="";
var db = new ODBC(DSN, DB_USER, DB_PASS);
db.connect();
db.query(sql);
if(db.nextRow()) {
var row = db.getData();
if (row["id"] == "" ) {
console_log("Err", "auth failed(0001)\t" + no1 + "\targ[0]=>" + argv[0] + "\targ[1]=>" + argv[1] + "\n");
db.close();
exit();
}
prefix1=row["prefix"]; authName=row["name"];
}else{
console_log("Err", "auth failed(0001)\t" + no1 + "\targ[0]=>" + argv[0] + "\targ[1]=>" + argv[1] + "\n");
db.close();
exit();
}
no2=no1.substring(prefix1.length, no1.length);
sql = "SELECT ec.* FROM auth_routes_carriers arc,external_carriers ec, codes c where arc.external_carriers_id = ec.id and arc.code_id = c.id and substring('"+no2+"',1,length(c.code))=c.code and ec.active=1 order by arc.priority asc";
db.connect();
db.query(sql);
var carriersName="";
bridge_str='';
while(db.nextRow()) {
var row = db.getData();
if (row["id"] != "" ) {
bridge_str = row["gateway"]+row["prefix"]+no2+"\@"+row["ip"];
carriersName = row["name"];
break;
}
}
db.close();
if(bridge_str != ''){
if(session.ready()) session.execute("bridge", bridge_str);
}
else {
console_log("Err", "external carrier not found.\t" + no2 + "\targ[0]=>" + argv[0] + "\targ[1]=>" + argv[1] + "\n");
exit();
}
exit(); |
|
Back to top |
|
|
rupa at rupa.com Guest
|
Posted: Sat Jun 06, 2009 8:31 am Post subject: [Freeswitch-users] Freeswitch creating more then two session |
|
|
Some thoughts:
1) look at mod_lcr
2) comments on script below...
On Sat, Jun 6, 2009 at 2:53 AM, Shoaib Khanzada <skhanzada@gmail.com (skhanzada@gmail.com)> wrote:
Quote: | Following is the js i am using to select route and bridge the call....
use("ODBC");
var DSN = "myodbc";
var DB_USER = "neo";
var DB_PASS = ".....";
[...] |
Quote: | var db = new ODBC(DSN, DB_USER, DB_PASS);
db.connect();
[...] |
Quote: |
sql = "SELECT ec.* FROM auth_routes_carriers arc,external_carriers ec, codes c where arc.external_carriers_id = ec.id and arc.code_id = c.id and substring('"+no2+"',1,length(c.code))=c.code and ec.active=1 order by arc.priority asc";
db.connect();
|
no need to reconnect
Quote: |
db.query(sql);
[...] |
Quote: |
if(bridge_str != ''){
if(session.ready()) session.execute("bridge", bridge_str);
|
Don't actually execute the bridge from javascript. Instead, set the bridge_str to a channel var and then do the bridge from the dialplan using that bridge_str. This way you don't have a javascript interpreter lying around for the duration of the call.
--
-Rupa |
|
Back to top |
|
|
|
|
|
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
|