REST URL pattern
sipXivr listens for http requests by default on port 8085.
Requests All requests are authenticated using DIGEST authentication and SSL protected
curl --digest -k GET|PUT|DELETE http://localhost:8085/mailbox/{mailbox}/{request}
To test the service with curl use:General URL structure: http://localhost:.
API
Base URL: https://{host name}:8085/mailbox/{
mailbox}
Common prefix: {mailbox} is the mailbox to work with. The mailbox of a user is the user's main <username> as found in validusers.xml
MWI Services
Provides the ability to query the status of, and update the Message Waiting Indicators associated with a mailbox
/mwi PUT (no body) user id
}
URL | METHOD | Description |
---|---|---|
/mwi | PUT w/no body | Updates the MWI for this mailbox (i.e. tells the status server |
...
| GET | Returns the MWI status for this mailbox |
...
in |
...
...
format |
...
. |
...
|
Example
To get the MWI status for User 200, do this:
curl --digest -k GET http://localhost:8085/mailbox/200/mwi
The response looks like:
Messages-Waiting: no
Voice-Message: 0/3 (0/0)
Messages Services
Provides the ability to query the status of, and mark a message as heard/unheard.
...
/messages | GET | returns all messages in mailbox |
/message/{messageid} | GET | where {messageid} is the unique message ID for the message, an 8 digit number. |
...
/ |
...
heard | PUT (no body) | Marks the message heard (and updates MWI |
...
|
...
GET | returns message heard status. |
...
The body returned is the XML fragment |
...
: <heard>true|false</heard> | |
| DELETE |
...
DELETE Marks the message unheard (and updates MWI) |
Example
To mark User 202's message 00000080 as heard, do this:
curl --digest -k PUT http://localhost:8085/mailbox/202/message/00000080/heard
Preferences Services
Provides the ability to query and set the value of the User's Active Voicemail Greeting type.
/preferences/
/activegreeting PUT sets the active greeting
...
/delete | PUT (no body) | Moves the message to Trash folder | |
/preferences/activegreeting | PUT with body
|
...
where {value} is one of : |
...
| sets the active greeting | |
| GET | returns the active greeting (returns above fragment) |
...
| DELETE | sets the active greeting to |
...
Example
...
|
Examples
Code Block | ||
---|---|---|
| ||
$curl --digest -k --request GET https://200:123@localhost:8085/mailbox/200/mwi
Messages-Waiting: no
Voice-Message: 0/3 (0/0)
|
Code Block | ||
---|---|---|
| ||
$curl --digest -k --request PUT https://200:123@localhost:8085/mailbox/200/message/00000080/heard
|
Code Block | ||
---|---|---|
| ||
$curl --digest -k --request PUT https://200:123@localhost:8085/mailbox/200/message/00000018/delete
|
Code Block | ||
---|---|---|
| ||
$curl --digest -k --request GET https://200:123@localhost:8085/mailbox/200/messages
<message id=00000018 heard=true urgent=false folder=deleted duration=0 received=1171062204000/>
|
Code Block | ||
---|---|---|
|
...
$curl --digest -k |
...
--request GET https:// |
...
200:123@localhost:8085/mailbox/ |
...
200/preferences/activegreeting |
...
standard
|