Page 1 of 1

additional rest api functions

Posted: Tue May 07, 2013 10:39 am
by tobeportable
complete lists :
We are trying to retrieve the list of "SIPUsername" however it "sipaccount/get" limits the result to 25 sipaccounts. Maybe we could have "sipaccount/list" to retrieve a list of "SIPUsername" only. Similarly "sipprovider/list" to get a list of "ProviderName" and "dialplan/list" to get a list of "DialPlanName".
Even though each of these object also have an ID, I understand those fields are each unique.
If some bandwith-cpu limitations forbid these functions we could always fallback to storing and updating those lists in our own database.


database access :
We'd like to have the database functions exposed through the api also

Re: additional rest api functions

Posted: Tue May 07, 2013 2:27 pm
by tobeportable
complete lists
seems I jsut found out that you can add "?count=1000" or more to any of these to retreive the full set

Re: additional rest api functions

Posted: Wed May 08, 2013 10:18 am
by Aaron
Yes you can use the offset and count parameters to adjust which and how many records get returned for all the provisioning service resources. The SIP Account REST methods including the offset and count parameters are documented here http://www.sipsorcery.com/mainsite/Help ... IPAccounts.

As far as the database functions go do you mean you'd like access to them through the REST service? The SIPSorcery database functions are primarily designed to provide a simple persistent storage location for use as part of a dailplan execution. It was not intended that that simple storage be extended for more general purposes as there are most likely better solutions already available. What type of scenario do you have in mind?

Re: additional rest api functions

Posted: Thu May 09, 2013 9:39 pm
by tobeportable
Same purpose : get info relative to a dialplan from a db only without the time delay that would be generated by a sys.Webget to our remote database.
In our case this is extra information per sipaccount.

Re: additional rest api functions

Posted: Sun May 12, 2013 11:03 am
by Aaron
Ok I'll see what I can come up with. I'd expect it to take a week or tow before I have any new REST service methods ready.