sip:request
sip:request
The sip:request
action sends a SIP INFO, NOTIFY, or MESSAGE request on an established call leg (i.e., an in-dialog request). This allows an application to send arbitrary SIP messages during a call; for example, to transmit metadata to the calling SIP endpoint using a SIP INFO message.
{
"verb": "sip:request",
"method": "INFO",
"headers": {
"X-Metadata": "my sip metadata"
},
"actionHook": "/info"
}
You can use the following attributes with the sip:request
action:
Option | Description | Required |
---|---|---|
method |
SIP method, should be one of INFO , MESSAGE , or NOTIFY . |
Yes |
headers |
An object containing headers (key-value) to include with the SIP request. | No |
body |
The body of the SIP request, if any. | No |
actionHook |
A webhook to call when the SIP request has completed. | No |
The sip:request
verb completes when a response is received from the far end. The actionHook
provides the status code of the SIP response:
result
:'success'
or'failed'
.sipStatus
: SIP status code of the response.err
: Error message, in the case of failure.