php - Twilio returning 404 error when pointing to Controller Method of Slim Framework -


i trying twilio point method in order start call. when have twimlapp pointing www.example.com/twilio/dial.php able make calls no problem, when have pointing controller method www.example.com/twilioapps/dial receive 404 error when looking @ twilio app monitor.

here twilioapps/index.php :

<?php ini_set('display_errors', 1); error_reporting(e_all ^ e_notice); session_cache_limiter(false); session_start(); require_once __dir__ . '/../vendor/autoload.php'; require __dir__ . '/../twilio.php'; $app = new \slim\slim(); $app->get('/dial', function (){ $twilioobj = new twilioplugin;     // phone number page request parameters, if given     if (isset($_request['tocall'])) {         $twilioobj->number = htmlspecialchars($_request['tocall']);     }     // wrap phone number or client name in appropriate twiml verb     // checking if number given has digits , format symbols     if (preg_match("/^[\d\+\-\(\) ]+$/", $twilioobj->number)) {         $numberorclient = "<number>" . $twilioobj->number . "</number>";     } else {         $numberorclient = "<client>" . $twilioobj->clientname . "</client>";     } ?> <response>     <dial callerid="<?php echo $twilioobj->callerid ?>">         <?php echo $numberorclient ?>     </dial> </response> <?php }); $app->run(); 

i not know whether slim problem, .htaccess problem, or twilio issue. appreciated.

alright figured out, fact had twimlapp using post request in order send number call. type of route using in slim get, had change twiml app request method , worked fine.


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -