You can't, or at least you can't directly. While you can call a php script, freeswitch will not wait for the output. Here's a few options: -use lua to do your processing. That can be run inline to set variables and the like. (Easiest if you can get your head around the lua) -if you just need a simple sql query, use somethibg like mod odbc query from the git contrib. -use xml curl so you can completely control the dialplan flow -or even more if lua isn't your thing you can create an esl php applicatio that can control the call in realtime, rather than just generating dialplan xml. -or an iffy idea -call the php script, have it save to sql or something, and have the xml dialplan sleep for a moment and then retrieve it.