sip:refer
sip:refer
The sip:refer
action performs a blind transfer of a call. It sends a SIP REFER to the far-end carrier or SIP phone, which must support the REFER method for the transfer to work. After the sip:refer
successfully completes, the call leg will have left the Zerpia platform.
{
"verb": "sip:refer",
"referTo": "+15083084809",
"actionHook": "/action"
}
You can use the following attributes with the sip:refer
action:
Option | Description | Required |
---|---|---|
referTo |
A SIP URI or a phone number/user identifier to which the call should be transferred. | Yes |
referredBy |
A SIP URI or a phone number/user identifier representing the party initiating the transfer. If not provided, it defaults to the identity of the party being transferred. | No |
actionHook |
A webhook to call when the transfer has completed. | No |
eventHook |
A webhook to call when NOTIFY messages regarding follow-on call status are received. | No |
headers |
Additional SIP headers to include in the REFER request. | No |
The sip:refer
verb completes when one of these conditions is met:
- A failure response is received for the REFER.
- A `202 Accepted` response is received for the REFER, and a NOTIFY message with a final call status is received for the follow-on call.
The sip:refer
action has an actionHook
that provides details of the final result, as well as an eventHook
that is called for every NOTIFY message received after a successful REFER.
—
ActionHook Properties
The actionHook
webhook will contain the following additional parameters:
referStatus
: The SIP status response to the REFER request.final_referred_call_status
: The final SIP status of the subsequent call to the transferee. This is only provided if the REFER is accepted and NOTIFY requests are received from the far end.
—
EventHook Properties
The eventHook
webhook will contain two parameters: event
and call_status
. The event
parameter will always be transfer-status
, and call_status
will contain a SIP status received in a NOTIFY after a successful REFER; for example:
{
"event": "transfer-status",
"call_status": "180"
}