Asterisk PHP Peer Status

Discussion in 'General' started by haamed, Sep 6, 2009.

  1. haamed

    Joined:
    Jul 23, 2007
    Messages:
    251
    Likes Received:
    0
    Asterisk PHP Peer Status, so I decided it might be something useful to provide to you :)

    Basically what the script does is connect to Asterisk via the Manager, log in, check the status of a peer, and then runs some code based on the result.

    The example makes a phone call to a number and plays the tt-monkeys file if there is a problem - you could run this from cron every minute and have it call you :)

    It's pretty much just a basic example of using PHP with the Asterisk manager without using any external libraries,

    you can view the code:

    peer-status.php


    use and enjoy :woohoo:

    Special thanks to Venture VoIP,
     
  2. Chilling_Silence

    Joined:
    Sep 23, 2008
    Messages:
    488
    Likes Received:
    0
    Excellent stuff! Thanks for sharing :)
     
  3. Chilling_Silence

    Joined:
    Sep 23, 2008
    Messages:
    488
    Likes Received:
    0
    This may be of use, slightly modified:
    http://pastie.org/616802

    Take the URL in the format of: http://pbxIP/peer-status.php?ext=XXX
    where XXX is the SIP Ext you want to check.

    Easier than editing the file each time, and may be callable from within the likes of NagiOS now to monitor a bunch of Exts! ;)
     
  4. haamed

    Joined:
    Jul 23, 2007
    Messages:
    251
    Likes Received:
    0
    You are right, That is so smart B)
     
  5. SridharG

    Joined:
    Jan 17, 2012
    Messages:
    1
    Likes Received:
    0
    Hi to all,

    When using these code into my PHP page, getting white plan page instead of status of peer. Please let clarify me in-detail.
     

Share This Page