Jump to content

Retrieving records from the PBX database


Recommended Posts



I followed the instructions in the wiki at this page and retrieving records from the snom PBX database by communication with the SOAP server seems to be working in principle. Specifically I am using pbx_get() function to retrieve records (with the code snippet as shown below):


function pbx_get( table, row, columns, &result_set )


The above function as given needs a "row" argument to be passed to it. For example I could pass an integer value like 1 or 2 or 3 etc. and it would fetch the corresponding rows.


However what I am trying to figure out is that how to retrieve from a table:

- rows based on a particular criteria (the equivalent of this criteria would go into the where clause of a SQL query). For example retrieve domain names matching a certain pattern.

- all rows or rows in a range (say rows from 1 to n or rows from 10 to n etc.)


Currently I am forced to retrieve only one row, that too based on a row number. That doesn't seem to be very useful.


Also another possible issue I am encountering is that when I try to retrieve records from the "cdr" table, I am getting no rows at all i.e. I am simply getting


array(0) {



as shown by var_dump.


Does it mean the cdr table does not contain any records? How could I verify/ascertain that? This is a snom demo/test pbx server. How could I create CDRs that I could retrieve for testing purposes?


Also one more issue seems to be the fact the retrieval of data from the SOAP server seems to be very slow. It takes several seconds or close to a minute. Why is it so slow?


Appreciate if you could help with my questions. Thanks a lot for your insights/help.

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.

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...