REST URL pattern
sipXivr listens for http requests by default on port 8085.
...
To test the service with curl use:General URL structure: https://{user}:{password}@localhost: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) Updates the MWI for this mailbox (i.e. tells the status server
to update the MWI status of devices that subscribed to MWI for this
mailbox.
GET Returns the MWI status for this mailbox.
Returns the status in [http://www.ietf.org/rfc/rfc3842.txt RFC-3842] format with
Content-Type set to application/simple-message-summary
Example
Code Block |
---|
To get the MWI status for User 200, do this: curl --digest -k --request GET https://200:123@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.
...
PUT (no body) Moves the message to Trash folder
Example
Code Block |
---|
To mark User 200's message 00000080 as heard, do this: curl --digest -k --request PUT https://200:123@localhost:8085/mailbox/200/message/00000080/heard To delete a message curl --digest -k --request PUT https://200:123@localhost:8085/mailbox/200/message/00000018/delete Get all messages curl --digest -k --request GET https://200:123@localhost:8085/mailbox/200/messages returns <message id=00000018 heard=true urgent=false folder=deleted duration=0 received=1171062204000/> |
Preferences Services (not implemented yet)
Provides the ability to query and set the value of the User's Active Voicemail Greeting type.
...
GET returns the active greeting (returns above fragment)
DELETE sets the active greeting to "none"
Example
Code Block |
---|
To query User 200's active greeting preference, do this: curl --digest -k --request GET https://200:123@localhost:8085/mailbox/200/preferences/activegreeting The response looks like: standard |
Conference Services
Provides the ability to send conference commands to freeswitch
Code Block |
---|
usage: curl --digest -k -X PUT https://200:123@<host_name>:8085/conference/item1/item2/item3 means the command: conference item1 item2 item3 |
Example
Code Block |
---|
curl --digest -k -X PUT https://200:123@localhost:8085/conference/mirceaConf/lock means: conference mirceaConf lock returns: <command-response>OK mirceaConf locked </command-response> |
...