Menu

How can i set volume by using phpagi?

Hill
2018-05-24
2018-05-28
  • Hill

    Hill - 2018-05-24

    Asterisk can set volume in dialplan but is there any way to set in phpagi? I tried
    agi->set(VOLUME(RX),4);

    but it seems not functioning. please share your thoughts. Thanks.

     
    • Hill

      Hill - 2018-05-28

      i also use AsteriskManager, the SetVar function.

      if(!class_exists(‘AGI_AsteriskManager’)) {
      require_once(dirname(FILE) . DIRECTORY_SEPARATOR . ‘phpagi-asmanager.php’);
      }
      if(!class_exists(‘AGI’)) {
      require_once(dirname(FILE) . DIRECTORY_SEPARATOR . ‘phpagi.php’);
      }
      $asm = new AGI_AsteriskManager();
      $agi = new AGI();
      $channel = $agi->request[‘agi_channel’];
      if($asm->connect()) {
      $asm->SetVar($channel,Volume(RX),4);
      }

      however, it's also no good. any advise? Thanks.

       
    • Hill

      Hill - 2018-05-28

      i also use AsteriskManager, the SetVar function.

      if(!class_exists(‘AGI_AsteriskManager’)) {
      require_once(dirname(FILE) . DIRECTORY_SEPARATOR . ‘phpagi-asmanager.php’);
      }
      if(!class_exists(‘AGI’)) {
      require_once(dirname(FILE) . DIRECTORY_SEPARATOR . ‘phpagi.php’);
      }
      $asm = new AGI_AsteriskManager();
      $agi = new AGI();
      $channel = $agi->request[‘agi_channel’];
      if($asm->connect()) {
      $asm->SetVar($channel,Volume(RX),4);
      }

      however, it's also no good. any advise? Thanks.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.