« Previous - Version 50/68 (diff) - Next » - Current version
Adrian Georgescu, 06/09/2012 12:59 pm


SIP Account API

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

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

API Functions

The following actions are supported:

Identity

  1. Return identity information:
    https://enrollment.sipthor.net/settings.phtml?action=get_identity
    

SIP aliases

  1. Return the SIP aliases:
    https://enrollment.sipthor.net/settings.phtml?action=get_aliases
    
  1. Add an alias to our own account
    https://enrollment.sipthor.net/settings.phtml?action=add_alias&username=alice
    

ENUM numbers

  1. Return the ENUM numbers:
    https://enrollment.sipthor.net/settings.phtml?action=get_enum
    

Call history

  1. Returns call history:
    https://enrollment.sipthor.net/settings.phtml?action=get_history
    

Registered devices

  1. Return the list of registered devices
    https://enrollment.sipthor.net/settings.phtml?action=get_devices
    

Prepaid

  1. Return the prepaid balance and active calls:
    https://enrollment.sipthor.net/settings.phtml?action=get_prepaid
    
  2. Return the history of prepaid balance:
    https://enrollment.sipthor.net/settings.phtml?action=get_balance_history
    
  3. Return the curent monthly usage:
    https://enrollment.sipthor.net/settings.phtml?action=get_monthly_usage
    

Call forwarding

  1. Return the call forwarding settings:
    https://enrollment.sipthor.net/settings.phtml?action=get_call_forwarding
    
  1. Set call forwarding
    https://enrollment.sipthor.net/settings.phtml?action=set_call_forwarding&FUNC=target&FBUS=target&...
    

    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>
    
    

Call filtering

  1. Return the list of accept rules:
    https://enrollment.sipthor.net/settings.phtml?action=get_accept_rules
    
  2. Return the list of reject rules:
    https://enrollment.sipthor.net/settings.phtml?action=get_reject_rules
    

Voicemail settings

  1. Return the voicemail settings:
    https://enrollment.sipthor.net/settings.phtml?action=get_voicemail
    

Do not disturb

  1. Enabled Do Not Disturb
    https://enrollment.sipthor.net/settings.phtml?action=set_dnd_on
    
  2. Disable Do Not Disturb
    https://enrollment.sipthor.net/settings.phtml?action=set_dnd_off
    
  3. Enable Do Not Disturb for 60 minutes
    https://enrollment.sipthor.net/settings.phtml?action=set_dnd_on&duration=60
    

Privacy

  1. Enabled privacy (hide Caller Id for outgoing calls)
    https://enrollment.sipthor.net/settings.phtml?action=set_privacy_on
    
  2. Disable privacy
    https://enrollment.sipthor.net/settings.phtml?action=set_privacy_off