[asterisk-users] allpage issu on asterisk 1.8.3.x

satish patel satish_lx at hotmail.com
Tue Apr 5 11:35:37 CDT 2011


Hey Guys!

I have perl script for allpage which is working fine with asterisk 1.8.2.3 version but same script same dialplan wouldn't working on asterisk-1.8.3.2  is there anything changes ?

If i run this script from command like it works but not from asterisk dialplan.  This script nothing but just connecting AMI interface and using Variable: SIPADDHEADER=Alert-Info: Ring Answer variable to call all phones and putting them in meetme conf room.

following is sample of script ( I am pasting half script ) 

# Now, we have an array (@tocall) with all valid SIP extensions.
while (my $sipxtn = shift @tocall) {
  print "VERBOSE \"Doing $sipxtn\" 0\n";
# Open connection to AGI
  my $tn = new Net::Telnet ( Port => $mgrport,
                        Prompt => '/.*[\$%#>] $/',
                        Output_record_separator => '',
                        Input_Log=> "/tmp/input.log",
                        Output_Log=> "/tmp/output.log",
                        Errmode    => 'return', );

  $tn->open("127.0.0.1");
  $tn->waitfor('/0\n$/');
  $tn->print("Action: Login\n");
  $tn->print("Username: $mgruser\n");
  $tn->print("Secret: $mgrpass\n");
  $tn->print("Events: off\n\n");
  my ($pm, $m) = $tn->waitfor('/Authentication (.+)\n\n/');
  if ($m =~ /Authentication failed/) {
        print "VERBOSE \"Incorrect MGRUSER or MGRPASS - unable to connect to manager interface\" 0\n";
        exit;
  }
  $tn->print("Action: Originate\nChannel: SIP/$sipxtn\nContext: all-page\nPriority: 1\n");
  $tn->print("Variable: SIPADDHEADER=Alert-Info: Ring Answer\n");
  $tn->print("Extension: s\n");
  $tn->print("CallerID: System Page\n");
  $tn->print("Action: Logoff\n\n");
  $tn->close;
}


-S

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110405/c452dbe2/attachment.htm>


More information about the asterisk-users mailing list