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

satish patel satish_lx at hotmail.com
Tue Apr 5 11:45:50 CDT 2011


Nevermind, 

I have solved it my self.  this script wring some logs in /tmp and somehow logfile was already there. so just deleted and it works!

-S

From: satish_lx at hotmail.com
To: asterisk-users at lists.digium.com
Date: Tue, 5 Apr 2011 16:35:37 +0000
Subject: [asterisk-users] allpage issu on asterisk 1.8.3.x








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

 		 	   		  

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110405/86ae4f52/attachment.htm>


More information about the asterisk-users mailing list