<Refer> verb in Telnyx allows you to transfer a phone call to another SIP infrastructure during a TeXML call. You can initiate it at any point during the call. When you use the <Refer> verb, Telnyx will replace the original call with a new call to the external system you specify, effectively transferring the call to that system.
Attributes
| ATTRIBUTE | DESCRIPTION | OPTIONS | DEFAULT |
|---|---|---|---|
action | Optional URL where TeXML will make a request when the Refer verb ends, to retrieve a new set of TeXML instructions to continue the call flow. | - | |
method | HTTP request type used to retrieve the next set of instructions. | GET, POST | POST |
Examples
Expected callbacks
Ifaction is set, you can expect the following webhook when the <Refer> verb finishes. A new set of TeXML instructions should be returned in response.
Action callback HTTP attributes
| ATTRIBUTE | DESCRIPTION |
AccountSid | A unique identifier for the account generating this call. |
CallSid | A unique identifier for this call, generated by Telnyx. |
ReferCallStatus | Provides new call status based on SIP NOTIFY messages. May be omitted if REFER fails or no NOTIFY requests are received. Possible values: in-progress, no-answer, busy, canceled, failed |
ReferSipResponseCode | This indicates the SIP response code that Telnyx receives from the SIP endpoint in response to the REFER request. |
NotifySipResponseCode | Reflects final SIP response code on the referred leg, based on NOTIFY messages. May be omitted if REFER fails or no NOTIFY requests are received. |
Timestamp | The timestamp when the event was fired, given as UTC in RFC 2822 format. |