From: <abe...@us...> - 2013-11-01 21:53:40
|
Revision: 6257 http://sourceforge.net/p/astlinux/code/6257 Author: abelbeck Date: 2013-11-01 21:53:37 +0000 (Fri, 01 Nov 2013) Log Message: ----------- dialproxy.php, add debug=1 option, useful for testing DIALING_PREFIX_NUMBERS prefix settings without dialing Modified Paths: -------------- branches/1.0/package/webinterface/altweb/dialproxy.php Modified: branches/1.0/package/webinterface/altweb/dialproxy.php =================================================================== --- branches/1.0/package/webinterface/altweb/dialproxy.php 2013-11-01 18:38:05 UTC (rev 6256) +++ branches/1.0/package/webinterface/altweb/dialproxy.php 2013-11-01 21:53:37 UTC (rev 6257) @@ -26,6 +26,11 @@ // Required value channel, ie. SIP/1234 // with ~ seprated options context=, timeout=, callerid=, localcallerid=, dialprefix= and allow= // +// Debug Mode: (set debug=1) +// Useful for testing DIALING_PREFIX_NUMBERS prefix settings without dialing. +// Usage: curl "http://pbx/dialproxy.php?num=2223334444&ext=default&debug=1" +// Usage: curl --data-urlencode 'num=2223334444' --data-urlencode 'ext=default' -d 'debug=1' http://pbx/dialproxy.php +// $remote_addr = $_SERVER['REMOTE_ADDR']; @@ -221,7 +226,9 @@ $num = ''; $ext = ''; } -//myexit(0, "Debug: num=$num ext=$ext dialprefix=".$opts['dialprefix']); +if (isset($_POST['debug']) || isset($_GET['debug'])) { + myexit(0, "Debug: num=$num ext=$ext dialprefix=".$opts['dialprefix']); +} if ($num === '' || $ext === '') { myexit(1, 'Error'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |