cordova - Twilio send optional parameters TwiML JavaScript Ajax Phonegap -


is possible send optinal parameters twilio twiml file , use them in php script? because im using generated userid in phonegap app. if call connected want send user id twiml , check in php if call "completed" , set values in mysql db userid.

somethinglike:

twiml:

<response>   <dial action="http://blabla.com/dial.php" method="post">     555-5555   </dial> </response> 

javascript:

$("#dialbutton").click(function() {                            params = { "userid" : $(userid).val()};                            connection = twilio.device.connect(params);                            }); 

php:

$user = $_post["userid"]; 

is right way?if not how can solve problemt?

here attributes sent action url: https://www.twilio.com/docs/api/twiml/dial#attributes-action-parameters

it looks doesn't contain userid (i assume mean accountsid or subaccountsid?).

according article (https://www.twilio.com/blog/2011/05/how-to-track-and-report-your-twilio-usage.html) may want use statuscallback paramater when making call, don't know how plays what's going on phonegap application, i'm not familiar technology.

https://www.twilio.com/docs/api/rest/making-calls#post-parameters-optional

i hope helps or @ least gets in direction need go.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -