additional rest api functions

New features you'd like see on SIP Sorcery
Post Reply
tobeportable
Posts: 3
Joined: Tue May 07, 2013 10:35 am

additional rest api functions

Post by tobeportable » Tue May 07, 2013 10:39 am

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

tobeportable
Posts: 3
Joined: Tue May 07, 2013 10:35 am

Re: additional rest api functions

Post by tobeportable » Tue May 07, 2013 2:27 pm

complete lists
seems I jsut found out that you can add "?count=1000" or more to any of these to retreive the full set

User avatar
Aaron
Site Admin
Posts: 4554
Joined: Thu Jul 12, 2007 12:13 am

Re: additional rest api functions

Post by Aaron » Wed May 08, 2013 10:18 am

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?

tobeportable
Posts: 3
Joined: Tue May 07, 2013 10:35 am

Re: additional rest api functions

Post by tobeportable » Thu May 09, 2013 9:39 pm

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.

User avatar
Aaron
Site Admin
Posts: 4554
Joined: Thu Jul 12, 2007 12:13 am

Re: additional rest api functions

Post by Aaron » Sun May 12, 2013 11:03 am

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests