SipSettingsApi

Version 45 (Adrian Georgescu, 07/13/2011 09:04 am) → Version 46/68 (Adrian Georgescu, 07/13/2011 09:04 am)


h1.
= Settings API



=

[[TOC(WikiStart, Sip*, depth=3)]]

This API can be used from third party applications that wish to interact with the SIP account settings. Data can be read or modified by calling various functions.

h2.


==
API Address

==

To access the API, a client must connect using HTTP protocol to the following address:

https://enrollment.sipthor.net/settings.phtml

The return is encoded using "json":http://json.org.

h2.
[http://json.org json].

==
API Functions

==

You can test the following API commands by using the *curl* '''curl''' command line utility as follows:

<pre>
{{{
curl https://enrollment.sipthor.net/settings.phtml?action=get_identity
</pre> }}}

The following actions are supported:

#


1.
Return identity information:
<pre>
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_identity
</pre>
#
}}}
1.
Return the SIP aliases:
<pre>
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_aliases
</pre>
#
}}}
1.
Return the ENUM numbers:
<pre>
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_enum
</pre>
#
}}}
1.
Return the list of last calls:
<pre>
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_calls
</pre>
#
}}}
1.
Return the list of registered devices
<pre>
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_devices
</pre>
#
}}}
1.
Return the prepaid balance and active calls:
<pre>
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_prepaid
</pre>
#
}}}
1.
Return the history of prepaid balance:
<pre>
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_balance_history
</pre>
#
}}}
1.
Return the curent monthly usage:
<pre>
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_monthly_usage
</pre>
#
}}}
1.
Return the call forwarding settings:
<pre>
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_call_forwarding
</pre>
#
}}}
1.
Return the list of accept rules:
<pre>
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_accept_rules
</pre>
#
}}}
1.
Return the list of reject rules:
<pre>
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_reject_rules
</pre>
#
}}}
1.
Return the voicemail settings:
<pre>
{{{
https://enrollment.sipthor.net/settings.phtml?action=get_voicemail
</pre>
#
}}}
1.
Enabled Do Not Disturb
<pre>
{{{
https://enrollment.sipthor.net/settings.phtml?action=set_dnd_on
</pre>
#
}}}
1.
Disable Do Not Disturb
<pre>
{{{
https://enrollment.sipthor.net/settings.phtml?action=set_dnd_off
</pre>
#
}}}
1.
Enable Do Not Disturb for 60 minutes
<pre>
{{{
https://enrollment.sipthor.net/settings.phtml?action=set_dnd_on&duration=60
</pre>
#
}}}
1.
Enabled privacy (hide Caller Id for outgoing calls)
<pre>
{{{
https://enrollment.sipthor.net/settings.phtml?action=set_privacy_on
</pre>
#
}}}
1.
Disable privacy
<pre>
{{{
https://enrollment.sipthor.net/settings.phtml?action=set_privacy_off
</pre>
#
}}}
1.
Add an alias to our own account
<pre>
{{{
https://enrollment.sipthor.net/settings.phtml?action=add_alias&username=alice
</pre>
#
}}}
1.
Set call forwarding
<pre>
{{{
https://enrollment.sipthor.net/settings.phtml?action=set_call_forwarding&FUNC=target&FBUS=target&...
</pre> }}}
<pre>
{{{
FUNC = Forward unconditional all calls
FBUS = Forward on Busy
FNOL = Forward on Not Online
FNOA = Forward on No Answer
FUNV = Forward when Not Available based on Accept rules

Pre-defined keywords for diversion targets:

<voice-mailbox>
<mobile-number>

</pre> }}}