MikoPBX development
  • MikoPBX development guide
  • Prepare IDE and system tools
    • Windows
    • Linux
    • Mac
  • Modules developement
    • How to start
    • Data model
    • Module installer class
    • Module main class
    • Module interface
    • Translations(empty)
    • Debuging
      • Configuring IDE
      • Debug PHP-AGI
      • Debug PHP Worker
      • Debug PHP Script
      • Debugging behind NAT
  • Internal structure
  • Admin interface(empty)
  • API
    • REST API
    • AMI / AJAM
    • AGI
  • Core(empty)
  • Marketplace
    • Licensing (empty)
  • Cookbook
    • Forms
      • Create module form
      • Create datatable
      • Add field into existing form
    • Asterisk
      • Hook on incoming call
      • Interact with AMI
      • Modify extensions.conf
    • Rights and auth
      • External authentication
      • Limited rights
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Modules developement
  2. Debuging

Debug PHP-AGI

To debug a PHP AGI script, you need:

  • Get the IP address of the PC from which debugging will be performed - e.g. 192.168.1.65

  • Set environment variables: export XDEBUG_CONFIG="remote_port=9000 remote_host=192.168.1.65 remote_enable=1 remote_mode=req remote_autostart=0 remote_connect_back=0";

  • Restart the asterisk process

Full example:

killall safe_asterisk; 
killall asterisk; 
export XDEBUG_CONFIG="remote_port=9000 remote_host=192.168.1.65  remote_enable=1 remote_mode=req remote_autostart=0 remote_connect_back=0";
nohup safe_asterisk -f > /dev/null 2>&1 &

In MikoPBX, it is enough to run the command:

xdebug-enable-agi 192.168.1.65

Be careful! Debugging the AGI can disrupt the operation of the PBX

PreviousConfiguring IDENextDebug PHP Worker

Last updated 3 years ago

Was this helpful?