Soporte & Consultoria

Soporte Remoto y Consultoria skype : ambiorixg12.
Nota no se brinda ningun tipo de consulta o soporte fuera del blog de forma gratuita

viernes, 23 de octubre de 2015

Asterisk 11 ManagerAction_Hangup

Saltar al final de los metadatos
Ir al inicio de los metadatos

Hangup

Synopsis

Hangup channel.

Description

Hangup a channel.

Syntax

Action: Hangup
ActionID: <value>
Channel: <value>
Cause: <value>
Arguments
  • ActionID - ActionID for this transaction. Will be returned.
  • Channel - The exact channel name to be hungup, or to use a regular expression, set this parameter to: /regex/
    Example exact channel: SIP/provider-0000012a
    Example regular expression: /^SIP/provider-.*$/
  • Cause - Numeric hangup cause.

See Also

Import Version

This documentation was imported from Asterisk Version SVN-branch-11-r404457

 hangup all calls on extension  140
<?php
//http://65.181.118.232/php-project/chanredirect.php?exten=1010&context=internal&channel=SIP/102-00000004
$pbx="localhost";
$timeout=45;
$chan=$_GET['chan'];
echo "<br><center>Action completed on channel $chan</center><br>";
$socket = fsockopen($pbx,"5038", $errno, $errstr, $timeout);
 fputs($socket, "Action: Login\r\n");
 fputs($socket, "UserName: admin\r\n");     //
 fputs($socket, "Secret: xxx3tss4\r\n\r\n");  //
                                            //

     $wrets=fgets($socket,128);
              echo "<center>$wrets</center>";
                fputs($socket, "Action: Hangup\r\n" );
                fputs($socket, "Channel:/^SIP/140-.*$/\r\n" );
            fputs($socket, "Async: yes\r\n\r\n" );
              fputs($socket, "Action: Logoff\r\n\r\n");
 sleep (1);
 $wrets=fgets($socket,128);

?>

No hay comentarios:

Publicar un comentario