Twilio caller name on receive programmable voice call in ios application

0 votes

I’m using Twilio’s Programmable Voice in one of the projects. My primary requirement is to place VoIP class between mobile devices (no PSTN calls). I am able to place calls from one device to another, but unable to set appropriate Caller Name on Incoming Call screen.

Please guide me about how to display Caller’s name on receiving device. TVOCallInvite’s “from” value shows a mobile number “+18xxxxxxxx”, but I need to display the name of the caller. . We have created TwiML PHP file which contains the dialled client name and callerID (my twill number). We have assigned url of this file in TwiML app’s request URL (https://www.twilio.com/console/voice/twiml/apps/myappid).

We can assign name of the caller in CallKit’s “localizedCallerName”, but we are receiving phone number instead of caller’s identity.

Details: Tutorial Followed : https://github.com/twilio/voice-quickstart-swift TwilioVoice -> 2.0.0 iOS Version : 10.1 Device : iPhone 7 & iPhone 5S

Please find the attached screenshot.

enter image description here

Please note that I have searched google but I could not found the answer.

Thanks.

Below is my voice.php file

<?php

require __DIR__ . '/TwilioSdk/Twilio/autoload.php';
include('config.php');
use Twilio\Twiml;
$response = new Twiml;

if (isset($_REQUEST['To']) && strlen($_REQUEST['To']) > 0) 
{
  $number = htmlspecialchars($_REQUEST['To']);
  $dial = $response->dial(array('callerId' => $callerid)); // callerid is +18XXXXXXXXX
  if (preg_match("/^[\d\+\-\(\) ]+$/", $number)) 
  {
    $dial->number($number);
  } 
  else 
  {
    $dial->client($number);
  }
} 
else 
{
   $response->say("Thanks for calling!");
}
header('Content-Type: text/xml');
echo $response;

?>

Twilio console for call logs

enter image description here


 

Nov 22 in Mobile Development by gaurav
• 22,040 points
24 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Mobile Development

0 votes
0 answers

Can't play video on iOS in Safari: NotAllowedError

When I click a play button on ...READ MORE

Nov 8 in Mobile Development by gaurav
• 22,040 points
85 views
0 votes
0 answers
0 votes
0 answers
0 votes
0 answers

Open webpage in fullscreen in Safari on iOS

There is a fullscreen mode in Safari ...READ MORE

Nov 22 in Mobile Development by gaurav
• 22,040 points
13 views
0 votes
0 answers

Accurate timing in iOS

I am looking at the 'Metronome' sample ...READ MORE

Nov 8 in Mobile Development by gaurav
• 22,040 points
34 views
0 votes
0 answers

Swift - Find antilog for 4 digit Integer in iOS

I need to find an antilog for 5995. ...READ MORE

Nov 8 in Mobile Development by gaurav
• 22,040 points
37 views
0 votes
1 answer

How to show caller image on iOS native ui call by using callkit framework?

Apple's CallKit is a framework introduced with iOS ...READ MORE

answered Nov 4 in Others by gaurav
• 22,040 points
109 views
0 votes
0 answers

Twilio incoming call is not working in iOS

I am working on Twilio programmable voice ...READ MORE

Nov 17 in Mobile Development by gaurav
• 22,040 points
18 views
0 votes
0 answers

Default Ringtone on a VOIP app in iOS

I'm trying to find a way to ...READ MORE

Nov 16 in Mobile Development by gaurav
• 22,040 points
20 views
0 votes
1 answer

How do I create folder under an Amazon S3 bucket through PHP API?

Of Course, it is possible to create ...READ MORE

answered Apr 24, 2018 in AWS by anonymous
9,674 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP