AMI – How to monitor registration status of SIP peers?

VitalPBX Community Support General Discussion AMI – How to monitor registration status of SIP peers?

  • Post
    jhaguilar
    Participant
    I am trying to find out the status of an extension through the AMI interface of VitalPBX, with PHP. How do I extract the value returned by the ExtensionState action in PHP?

    <?
    $oSocket = fsockopen (“XXX.XXX.XXX.XXX”, 5038, $errno, $errstr, 10);
    fputs($oSocket, “Action: login\r\n”);
    fputs($oSocket, “Username: user\r\n”);
    fputs($oSocket, “Secret: password\r\n\r\n”);
    sleep (1);
    fputs($oSocket, “Action: ExtensionState\r\n”);
    fputs($oSocket, “Context: extensions\r\n”);

    sleep (1);

    fputs($oSocket, “Action: Logoff\r\n”);
    fclose($oSocket);
    ?>

    0
Viewing 1 replies (of 1 total)
  • Replies
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.