Refers
Refer records are generated when you are using the <Refer> verb.Those records are hosted with CPaaS and are available for you to retrieve.The Refer records list resource represents a set of account’s Refer records.
The Refers API endpoint supports JSON output only. |

Resource Properties
Property | Description |
---|---|
api_version |
The API version in use during the recording. |
sid |
A string that uniquely identifies this record. |
date_created |
The date this record was created. |
account_sid |
The unique id of the Account that created this record. |
org_sid |
The unique id of the Organization which belongs to the Account. |
call_sid |
The unique id of the call during which transferring of the call was made. |
from |
The phone number or identifier that originated the transfer of the call. |
to |
The phone number or identifier that will be the recipient of this transferred call. |
call_status |
The status of the transferring procedure. This provides the application with the status of the new call (based on SIP NOTIFY messages) created in a response to the REFER. If the REFER fails or the endpoint does not send any NOTIFY requests, this parameter will be omitted. |
refer_sip_response_code |
The SIP response code received in response to the REFER request sent by CPaaS to the SIP endpoint. |
notify_sip_response_code |
This is the last SIP response code received on the referred leg, as determined by examining the SIP NOTIFY messages. E.g. If the SIP endpoint initiated a new call but received a SIP 404 response due to the target not being found, this parameter will be set to "404". If the REFER fails or the endpoint does not send any NOTIFY requests, this parameter will be omitted. |
uri |
The URI for this Refer record, relative to |
Supported Operations
Listing a Single Refer Record
curl -X GET https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Refers/RFc377eb0e657e415383de087ab38797db \
-u 'YourAccountSid:YourAuthToken'
The response will be similar to the one below.
{
"sid": "RFc377eb0e657e415383de087ab38797db",
"date_created": "2021-03-09T12:03:00.787Z",
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"org_sid": "ORfe81fe8a3d5f4d5391e901db0bf5755d",
"call_sid": "IDbb44ef8c2ebf4d4599d0378a2a8a2ea8-CAd9e08ede8b604e739ba7d0bd477fdf49",
"to": "sip:alice@company.com",
"from": "sip:bob@company.com",
"call_status": "in-progress",
"refer_sip_response_code": "123",
"notify_sip_response_code": "456"
}
Getting a List of Refer Records
curl -X GET https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Refers \
-u 'YourAccountSid:YourAuthToken'
The response will be similar to the one below.
{"page":0,"num_pages":0,"page_size":50,"total":34,"start":"0","end":"34","uri":"/api/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Refer","first_page_uri":"/api/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Refers?Page=0&PageSize=50","previous_page_uri":"null","next_page_uri":"null","last_page_uri":"/api/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Refers?Page=0&PageSize=50","refers":
[
{
"sid": "RFc377eb0e657e415383de087ab38797db",
"date_created": "2021-03-09T12:03:00.787Z",
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"org_sid": "ORfe81fe8a3d5f4d5391e901db0bf5755d",
"call_sid": "IDbb44ef8c2ebf4d4599d0378a2a8a2ea8-CAd9e08ede8b604e739ba7d0bd477fdf49",
"to": "sip:alice@company.com",
"from": "sip:bob@company.com",
"call_status": "in-progress",
"refer_sip_response_code": "123",
"notify_sip_response_code": "456"
},
...
]
}
Request Parameters
Parameter | Description |
---|---|
ReferTo |
Only show refer records to this SIP Address (allows full text search). |
ReferFrom |
Only show refer records from this SIP Address (allows full text search). |
ReferCallStatus |
Only show refer records with this status. May be in-progress, canceled, failed, busy, or no-answer. |
DateCreated |
Only show refer records that started on this date/time or later, given as an ISO-8601 date/time string, like YYYY-MM-DDTHH:MM:SS (for example 2018-10-05T22:45:32). If you want to omit the time, YYYY-MM-DD (for example 2018-10-05). When only a date is provided the time is assumed to be at midnight of the given date. Note that the given date/time is inclusive and is assumed to be in the UTC timezone. A 400 response will be returned if the syntax is invalid. |
CallSid |
Only show refer records spawned by the call with this Sid. |
Filtering by CallSid Parameter
The example below will return Refer records that have been initiated from this CallSid.
curl -X GET https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Refers?CallSid=IDbb44ef8c2ebf4d4599d0378a2a8a2ea8-CAd9e08ede8b604e739ba7d0bd477fdf49 \
-u 'YourAccountSid:YourAuthToken'
The result will be similar to the one below
{"page":0,"num_pages":0,"page_size":50,"total":34,"start":"0","end":"34","uri":"/api/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Refer","first_page_uri":"/api/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Refers?Page=0&PageSize=50","previous_page_uri":"null","next_page_uri":"null","last_page_uri":"/api/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Refers?Page=0&PageSize=50","refers":
[
{
"sid": "RFc377eb0e657e415383de087ab38797db",
"date_created": "2021-03-09T12:03:00.787Z",
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"org_sid": "ORfe81fe8a3d5f4d5391e901db0bf5755d",
"call_sid": "IDbb44ef8c2ebf4d4599d0378a2a8a2ea8-CAd9e08ede8b604e739ba7d0bd477fdf49",
"to": "sip:alice@company.com",
"from": "sip:bob@company.com",
"call_status": "in-progress",
"refer_sip_response_code": "123",
"notify_sip_response_code": "456"
},
...
]
}
Paging Information
The request supports standard paging information.For more details, please visit the Paging Information documentation.