Number Masking - Create masked session for SMS or voice
NOTE:
To add this product to your account, contact a Telesign expert. This product is available for full-service accounts only.
This page shows you how to create an anonymous session where two users can communicate with each other using assigned masking IDs instead of their real phone numbers. The session can be used later for either SMS communication or a voice call, determined based on the inputs in the request. You must use only dual-capable (both SMS and voice capable) numbers from Telesign as masking IDs when using this action. You must have Telesign Number Masking enabled to use this action.
Reference page
POST https://rest-ww.telesign.com/v1/anonymous/session/sms_voice - See complete technical details for this action, including all request parameters and response properties.
NOTE:
Creating an anonymous voice session with Telesign Number Masking is just one part of a larger procedure for making a voice call with number masking. See Voice - Set up a call with number masking to see instructions for the rest of the procedure.
How it works
When used for voice
To connect two users with this type of session for a voice call, the flow works like this:
- You receive a request for a call from an end user wanting to speak with another end user (say a rider wants to call the driver in a taxi app).
- You create a session request and send it to Telesign. Your request will include the phone numbers of both parties.
- The rider initiates their call. This call request is routed to Telesign's servers.
- Telesign receives the call request and connects the call to the driver. Both the sender ID of the rider and the sender ID of the driver are masked from each other.
When used for SMS
To connect two users for SMS communication with this type of session, the flow works the same as for an SMS-only session (see Number Masking - Create masked session for SMS).
NOTE:
It is possible that the masking ID for both parties is the same number. This does not impact communication between the two parties.
NOTE:
Telesign calls have a maximum call duration of four hours.
Example
Request
POST https://rest-ww.telesign.com/v1/anonymous/session/sms_voice HTTP/1.1
Authorization: Basic 12345678-9ABC-DEF0-1234-56789ABCDEF0:vjE/ZDfPvDkuGNsuqCFFO4neYIs=
Content-Type: application/json; charset=utf-8
{
"phone_number_1": "15555551212",
"phone_number_2": "15558675309",
"validity_period": 500
}
Response (body only)
{
"reference_id": "C5B8F46B7D2C016C88308ABCE1D00169",
"session_data": {
"message": "",
"phone_number_1": {
"complete_phone_number": "15555551212",
"country_code": "1",
"country_iso2": "US",
"country_iso3": "USA",
"country_name": "United States",
"masked_id": "16467740233"
},
"phone_number_2": {
"complete_phone_number": "15558675309",
"country_code": "1",
"country_iso2": "US",
"country_iso3": "USA",
"country_name": "United States",
"masked_id": "16467740234"
},
"resource": "sms_voice",
"session_end_on": "2018-03-05 10:59:13.761245",
"validity": 500
},
"status": {
"code": 2700,
"description": "Session successfully created",
"updated_on": "2018-02-12T14:57:11.765723Z"
}
}
Updated about 1 year ago