One to many masked communication twilio proxy service - php

I am using the twilio php library to send the first message to my customers using Twilio number when the customer replies to that number at this point proxy session will create and add both (customer and company) into that session.
company will receive the customer replies using a new generated proxy number
"till this is working fine" but if a company replies back to that message, the customer will get a response from new generated proxy number rather than old Twilio number.
The text below explains the process:
Send the first Message:
Twilio number Customer number
(xxxxxx6840) ---> (xxxxxx6866)
Customer Replies:
Customer number Twilio number Proxy number Company number
(xxxxxx6866) ---> (xxxxxx6840) ---> (xxxxxx6872) ---> (xxxxxx2786)
Up to this point, everything is working fine.
Company replies
Company number Proxy number Customer number
(xxxxxx2786) ---> (xxxxxx6872)---> (xxxxxx6866)
If the company replies, then the customer gets that reply from new proxy number.
What we wants is:
Company number Proxy number Twilio number Customer number
(xxxxxx2786) ---> (xxxxxx6872)---> (xxxxxx6840) ---> (xxxxxx6866)
Thank you

Did you follow the steps documented here, for out of session call backs?
Out-of-Session Callback Response Guide
https://www.twilio.com/docs/proxy/out-session-callback-response-guide
Following that process should provide the scenario you are looking for.
Also, this adds more insight.
Using the Reserved Numbers and Auto-Create functionalities to support the “online directory” scenarios
https://www.twilio.com/docs/proxy/using-the-reserved-numbers-and-auto-create-functionalities-to-support-the-online-directory-scenarios

Related

How can i show app name in place of twilio generated number in my sms

I am using Twilio programmable SMS, so when I receive a message it shows +123123 like some random number so is there any way that I can show my custom app name instead of Twilio generated id.I also searched for it but not get an answer.
Alphanumeric Sender ID is automatically supported on all new upgraded (paid) Twilio accounts. It is not supported for Free Trial accounts.
You can validate that Alphanumeric Sender is enabled on your account by following these steps:
Login to your project at www.twilio.com/console.
From the left side navigation bar, click Programmable SMS
Click Settings.
Verify that "Alphanumeric Sender ID" is set to Enabled.
If you have already upgraded, use the desired ID for the From parameter in your API requests.

Twilio Bulk SMS

how can I create a bulk sms code on twilio? Right now, I'm using Twilio Service api which can send up to 10k sms in 1 request. But I read that it only sends 1 sms per second so it means 10k messages means all will be sent after 3 hours.
Is it possible to do it like this on Twilio?
All of these should happen using Twilio API
Can create/delete lists that will identify the phone #.
Can add/delete phone numbers on the list.
Can request twilio to trigger a notification which will only ask for the list id instead of looping all phone numbers (which is the current way I'm doing it).
Currently im doing it like this:
$to = array();
$x = 0;
$message = 'Test';
foreach($phone_numbers as $phone_number){
$to[$x] = '{"binding_type":"sms", "address":"'.$phone_number.'"}';
$x++;
}
$notification = $client
->notify->services($service_id)
->notifications->create([
"toBinding" => $to,
"body" => $message
]);
If the phone numbers are more than 10k, it will not send all of them.
is there a way to make it like this?
the phone numbers are not stored on the database but instead stored on a list in twilio database then you will only need to call that list to send a message
also i can add multiple list which will identify what the notification is for
ex.
list #1 name is Room 1
list #2 name is Room 2
list #1 has phone number a, phone number b
list #2 has phone number a, phone number c
Twilio developer evangelist here.
The existing way you are using the bulk notifications API, by sending the numbers as part of the request, is just one part of the Twilio Notify API.
You can save numbers within Twilio and tag them as part of different lists. To do so, you need to create a binding. A binding is the connection of an identity and an address, in this case, the user's mobile number.
Notably though, this won't solve your delivery speed. There is a 1 message per second, per number limit when sending messages in the US to avoid carrier filtering. We also recommend you don't send more than 200 messages per day, per number to avoid the number being flagged for spam too.
Outside of the US things are less strict and the limit for sending messages is 10 per second, per number.
To overcome this you should either choose to use more numbers. If you are using Notify, then you are already using a messaging service with a number in the number pool. You can add more numbers to the number pool and the messaging service will distribute the messages between them. This will increase your throughput.
If you are sending that many messages in the US, then I would likely recommend using a short code. They are expensive, but they offer 100 messages per second throughput and, because they are more regulated, you don't need to use many different numbers.
Let me know if that helps at all.

how to integration masking phone number calling twilio api php

i wanna create a calling between passenger and driver using anonymous phone no. both are not see own no. it actually see the Twilio assign no. how can i integrate in custom PHP and please also tell me the work flow. if u have code must share your git link
This is a classic use case in many sharing economy platforms. Twilio website and documentation have sufficient details to enable you build this. Tutorials with code is also available.
Check out these steps and tutorial .
Steps include ( this is directly copied from Twilio website)
STEP ONE
PROVISION TWILIO PHONE NUMBERSPurchase a pool of phone numbers from the Twilio
self-service portal or the Twilio phone number API. You can search for phone
numbers with a specific country and area code.
STEP TWO
MAP TWILIO PHONE NUMBERS TO USERSImplement the mapping between the provisioned
Twilio phone numbers and your users. In this example, xxx-xxxx is associated
to Arya and Bran's personal phone numbers for the duration of their business
relationship.
STEP THREE
ARYA CALLS TWILIO NUMBER XXX-XXXXWhen Arya calls xxx-xxxx, Twilio receives the
call and makes an HTTP request to your web server.
STEP FOUR
YOUR WEB SERVER RETURNS BRAN'S PRIVATE NUMBERYour web server looks up the
private phone number of Bran associated to xxx-xxxx and returns a TwiML <Dial>
to Bran's number.
STEP FIVE
THE CALL IS CONNECTEDTwilio connects the call between Arya and Bran. Bran sees
the call coming in from xxx-xxxx.

How to create confirmed outgoing caller ID from Toll-free twilio numbers?

I am trying to create outgoing caller ID dynamically.
But the problem is that Twilio does not create it because it fails to verify it (noone responds and inputs confirmation code).
Why do I need to verify number if I get it from the list of available phone numbers?
Can I emulate response which will send Twilio confirmation code when Twilio dials that number?
Twilio evangelist here.
Not sure what you mean by "from the list of available phone numbers". Do you mean you've purchased a number from Twilio? If thats the case you do not have to verify it, you can use any Twilio number as an outgoing caller ID.
If its not a Twilio number, today the only way to authorize an outgoing phone number is to have Twilio call that number and for someone to answer and enter the correct pin code. The reason is to prevent fraud.
Hope that helps.

google checkout html api - get payment status without HTTPS?

When I log into my merchant account, in the Settings tab I can set the callback URL.
The problem is that, without HTTPS, the only option is to send back a serial number to the callback URL.
Callback contents:
[x] Notification Serial Number
e.g. serial-number=123-456-7
[ ] Notification as XML (Requires an HTTPS URL)
e.g. 123...
[ ] Notification as HTML (name/value pairs) (Requires an HTTPS URL)
e.g. google-order-number=123&...
So from this serial number, is it possible for my server-side script to get the status of the order?
I need to get the payment status of the order (paid or not, amount paid) & the order number sent back to my (custom) cart so that I can update my database.
(I can't get HTTPS at the moment because the person whose website it is doesn't want to get it)
I would caution you regarding your accepted answer.
continue_url is not an "auto-redirect". You are fully dependent on the user actually clicking that link instead of any other link in the page - notably, Google's own link to go the user's Wallet page where he/she has access to all his/her orders.
You are therefore risking your operations by possibly not having all the orders in your own system.
All Google Checkout orders have order statuses that you should really be aware of. You are already making an assumption in #1 that the user will actually click your continue_url link - additionally, you have also opened yourself up to the possibility that you are tracking orders that may not actually be approved by Google, or fails some monetary/risk authorization or check.
If a user does in fact click the link you provide, but Google has issues with the order, your system has "money" where it shouldn't.
The only reliable method of implementing Google Checkout API and integrating it with your systems is to follow documentation/instructions - in this case you must implement Notification API.
SSL is only required (on your end) if you opt for XML/name-value (data) notification
SSL is not required if you opt for serial number notification.
Yes, you can obtain all order data without installing/purchasing SSL cert for your server using serial number notification - which is what you describe.
XML/name-value notification is a "push" model - Google will "push" data to you. You will authenticate Google's basic auth request (which is why SSL is required).
serial number notification is "pull" model - you will "pull" data from Google (given a serial number - and that is why SSL is not required on your end - you will authenticate your pull request and send your request with SSL). Google isn't sending you any data, just a serial number. You will use this serial number to obtain data associated with it and provide authentication to Google - your request will use SSL.
You will use serial number notification with Notification History API to obtain data.
The links above should lead you to complete documentation/reference. If you have questions, comment here, or post it at Google Checkout Product Forums.
Hth....

Categories