TiTwilio icon indicating copy to clipboard operation
TiTwilio copied to clipboard

auth server example

Open WDPX opened this issue 10 years ago • 4 comments

Hi, Do you think you could include an example of your auth server php? I just don´t get this to work. Of course, leave your appID, auth thoken etc. blank. It´s just so I - and maybe others as well - can understand what needs to happen on the other side. That would be great!

By now, I tried something like this:

allowClientIncoming('ICallU'.$_GET["ID"]); // This allows outgoing connections to $appSid with the "From" // parameter being the value of $clientName $capability->allowClientOutgoing($appSid, array(), $clientName); // This returns a token to use with Twilio based on // the account and capabilities defined above $token = $capability->generateToken(); echo $token; if (!isset($_GET["client"])) { try { // Initiate a new outbound call $call = $client->account->calls->create( '++++my-registered-twilio-number++++', // The number of the phone initiating the call 'client:'.$clientName, // The number of the phone receiving call 'http://www.icallu-app.com/icallu/incoming.php' // The URL Twilio will request when the call is answered ); echo '

Started call: ' . $call->sid.'

'; } catch (Exception $e) { echo '

Error: ' . $e->getMessage().'

'; } } ?>

But I guess, I need to use the file that is connected to my twilio-app (at twilio.com) which is another one. That one would create the Twilio-needed XML, not the above code. Or is it a mixture of both?

I would really appreciate your help. Thanks a lot!

Frank

WDPX avatar Sep 13 '14 09:09 WDPX

Frank,

I have an example written in Ruby + Sinatra:

https://github.com/yagitoshiro/TwilioDemo/blob/master/server/index.rb

yagitoshiro avatar Oct 01 '14 07:10 yagitoshiro

Hi,

sorry to bother you, again, with your Twilio-Module you build an put on GitHub. Now, Apple requires 64-Bit-capable Modules. And I can´t get this to work, even though I found a notice from appcelerator how to do this. But this rather explains a lot in Excode that I simply do not understand.

Do you think, you can upload a 64-bit-capable version of this module to GitHub in the near future?

Thanx a lot for your time

Frank

Am 01.10.2014 um 09:02 schrieb yagi_ [email protected]:

Frank,

I have an example written in Ruby + Sinatra:

https://github.com/yagitoshiro/TwilioDemo/blob/master/server/index.rb https://github.com/yagitoshiro/TwilioDemo/blob/master/server/index.rb — Reply to this email directly or view it on GitHub https://github.com/yagitoshiro/TiTwilio/issues/2#issuecomment-57426335.

WDPX avatar Feb 13 '15 11:02 WDPX

Frank,

have you already tried to rebuild the module with the new Titanium SDK ver3.5.0?

Maybe you can check this blog post. http://www.appcelerator.com/blog/2015/01/titanium-sdk-3-5-0-ga-now-available-with-64-bit-ios-support/

smartygo avatar Feb 15 '15 05:02 smartygo

I´ll give it a try.

Am 15.02.2015 um 06:27 schrieb smartygo [email protected]:

Frank,

have you already tried to rebuild the module with the new Titanium SDK ver3.5.0?

Maybe you can check this blog post. http://www.appcelerator.com/blog/2015/01/titanium-sdk-3-5-0-ga-now-available-with-64-bit-ios-support/ http://www.appcelerator.com/blog/2015/01/titanium-sdk-3-5-0-ga-now-available-with-64-bit-ios-support/ — Reply to this email directly or view it on GitHub https://github.com/yagitoshiro/TiTwilio/issues/2#issuecomment-74404807.

WDPX avatar Feb 15 '15 14:02 WDPX