Jump to content

SOAP access in the new version problem


Nikola

Recommended Posts

We are currently testing new version ( 2.1.0.2115 ) on linux debian and we have a problem. Access to the database using SOAP is very slow comparing to the old version. For example simple php script like I am attaching, takes exactly 2 minutes to return the results, while on the old version, it was taking 1-2 seconds. Userportal we are using for managing voicemail, forwarding etc. doesn't even load (probably because of the time out)

Once again, on the old version (3.1-2.0.4.1766) it takes seconds to return these results.

 

Thanks,

 

Nikola

 

php script for getting first and last name from pbxnsip if the phone numberis is given.

 

 

$r = array();

$search = array("name"=>$phone_number);

 

pbx_search("user_alias", 999999, 0, false, $search, $r, $pbx_server, $pbx_port);

$alias_id = array_pop($r);

 

if($alias_id)

{

$r = array();

$search = array("user", "domain");

 

pbx_get("user_alias", $alias_id, $search, $r, $pbx_server, $pbx_port);

$user_id = $r['user'];

$domain_id = $r['domain'];

}

else

{

echo "No User Found.";

}

 

$columns = array("id");

pbx_get("users", $user_id, $columns, $res, $pbx_server, $pbx_port);

 

$extension_id = $res['id'];

 

$columns = array("first_name", "display_name");

pbx_get("extensions", $extension_id, $columns, $res, $pbx_server, $pbx_port);

 

echo "<br />First name: ".$res['first_name'];

echo "<br />Last name: ".$res['display_name'];

Link to comment
Share on other sites

Is your web client re-using the HTTP connection? Every time the client opens a new HTTP connection the PBX hits the break.

 

There is a setting in pbx.xml called "http_rate" which tells how many new HTTP connection the PBX should accept per second. If you increase this value, the speed should go up - but also the risk of DoS the PBX through HTTP storms.

Link to comment
Share on other sites

I don't know how to reuse HTTP connection. Anyways, that is not the problem, since we are just testing the new version, so nobody except me is accessing the server.

Also, i measured again, and every time it needs exactly 2 minutes to return results (this script). I also tried increasing http_rate, but there is no difference.

 

What should I try next?

 

Thanks,

 

Nikola

Link to comment
Share on other sites

  • 9 months later...

Hello

 

We've just installed version 2.1.12.2489 (Win32) on a brand new server.

Specs are saying that the system resources are far above minimal.

 

But even though a simple script like the one below takes a good 30 seconds.

Example from: http://wiki.pbxnsip.com/index.php/Access_to_the_Database

 

$columns = array( 0=>"first", 1=>"name", 2=>"number");

pbx_get( "adrbook", 2, $columns, $result_set );

print_r( $result_set );

 

Thanx!

Link to comment
Share on other sites

  • 1 year later...
I've just solved the problem by changing the "HTTP/1.1" protocol to: "HTTP/1.0"

 

Could someone with acces to the wiki / support site please update this, took me some good time to find this solution... If it was put on the wiki correctly, the php script on the server work almost directly.

 

Also, if this person could make it possible to download the files, in stead of copying them, it would be a lot more easy. Also, the php on the wiki is malformed and has some small errors.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...