SIPNOTIFY2REST

This server accepts SIP Notify messages and then converts them to a JSON packet and POSTS them to the defined URL. This server is a great option for those wanting to manage MWI via their own PBX interface or simply for MWI notifications to other 3rd party applications.

  • DV2000 8.0.21 or above.
  • HTTP and HTTPS supported.
  • JSON packet contains almost all of the SIP Notify packet.
  • URL can be any rout-able address.
  • Multiple servers can be configured if necessary.

This server is always disabled by default and must be manually configured. This server is never added to the list of servers on updates or upgrades and can be added manually.

  1. Edit the server by double clicking on the it.
  2. Edit the port number. This is typically always set to the default.
  3. Add the URL to send the POST.
Argument Description
port UDP port the server should listen on. Default is 6050.
url Full URL to post data. Example: http://192.168.1.100/mwi
Example
  -port 4040 -url http://192.168.1.100

URL Macros

The URL can accept two additional optional macros. These will be automatically replaced with the corresponding data and can be used for additional routing or for any purpose needed.

These macros are case-sensitive.

Macro Description
{extension}Replaced by extension number in SIP Notify packet.
{onoff}Replaced with the word on or off.
Example
URL Result
http://192.168.1.100/mwi/{extension}/{onoff} http://192.168.1.100/mwi/3101/on

The packet will be sent as a POST with the following data in JSON format. All fields are direct matches to the SIP Notify packet received.

Field Description
Contact Contact header field.
Date Date header field.
To To header field.
From From header field.
Voice-Message SIP Notify header
Message-Account SIP Notify header
Messages-Waiting SIP Notify header
P-DV-VoiceChannel Channel performing the MWI notification.
P-DV-Version Version of the DV2000
on true if light should be on, otherwise false.

URL Argument

POST

POST /vs/mwi/711003 HTTP/1.1
Date: 2023-09-12T17:11:00Z
User-Agent: DuVoice/8.0.20
Content-Type: application/json
Content-Length: 366
Connection: Close
Host: 127.0.0.1:8080
 
{"Contact":"<sip:1000@192.168.100.100:5060>","From":"<sip:1000@pbx1.soundcasino.arpa>;tag=45caefba-721524bb-544c0-44ab738-6464a8c0-13c4-764","Message-Account":"sip:711003@192.168.100.100:6050","Messages-Waiting":"yes","P-DV-Version":"8.0.20","P-DV-VoiceChannel":"23","To":"<sip:711003@192.168.100.100:6050>","Voice-Message":"1/0(0/0)","extension":"711003","on":true}
JSON Data
{
    "Contact": "<sip:1000@192.168.100.100:5060>",
    "From": "<sip:1000@pbx1.soundcasino.arpa>;tag=45caefba-721524bb-544c0-44ab738-6464a8c0-13c4-764",
    "Message-Account": "sip:711003@192.168.100.100:6050",
    "Messages-Waiting": "yes",
    "P-DV-Version": "8.0.20",
    "P-DV-VoiceChannel": "23",
    "To": "<sip:711003@192.168.100.100:6050>",
    "Voice-Message": "1/0(0/0)",
    "extension": "711003",
    "on": true
}
  • Last modified: 2023/09/12 12:45
  • by admin