Changed all instances of waitfor('/0\n$/') to waitfor('/[01]\n$/') in all perl scripts that login to the Asterisk manager interface. This allows the scripts to connect to the 1.1 manager interface in Asterisk 1.6.
git-svn-id: svn://192.168.202.10@781 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -186,7 +186,7 @@ $t = new Net::Telnet (Port => $telnet_port,
|
||||
else {$telnet_login = $ASTmgrUSERNAME;}
|
||||
|
||||
$t->open("$telnet_host");
|
||||
$t->waitfor('/0\n$/'); # print login
|
||||
$t->waitfor('/[01]\n$/'); # print login
|
||||
$t->print("Action: Login\nUsername: $telnet_login\nSecret: $ASTmgrSECRET\n\n");
|
||||
$t->waitfor('/Authentication accepted/'); # waitfor auth accepted
|
||||
|
||||
|
||||
@@ -198,7 +198,7 @@ while($one_day_interval > 0)
|
||||
if (length($ASTmgrUSERNAMElisten) > 3) {$telnet_login = $ASTmgrUSERNAMElisten;}
|
||||
else {$telnet_login = $ASTmgrUSERNAME;}
|
||||
$tn->open("$telnet_host");
|
||||
$tn->waitfor('/0\n$/'); # print login
|
||||
$tn->waitfor('/[01]\n$/'); # print login
|
||||
$tn->print("Action: Login\nUsername: $telnet_login\nSecret: $ASTmgrSECRET\n\n");
|
||||
$tn->waitfor('/Authentication accepted/'); # waitfor auth accepted
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ $t = new Net::Telnet (Port => 5038,
|
||||
else {$telnet_login = $ASTmgrUSERNAME;}
|
||||
|
||||
$t->open("$telnet_host");
|
||||
$t->waitfor('/0\n$/'); # print login
|
||||
$t->waitfor('/[01]\n$/'); # print login
|
||||
$t->print("Action: Login\nUsername: $telnet_login\nSecret: $ASTmgrSECRET\n\n");
|
||||
$t->waitfor('/Authentication accepted/'); # waitfor auth accepted
|
||||
|
||||
@@ -252,7 +252,7 @@ $t = new Net::Telnet (Port => 5038,
|
||||
else {$telnet_login = $ASTmgrUSERNAME;}
|
||||
|
||||
$t->open("$telnet_host");
|
||||
$t->waitfor('/0\n$/'); # print login
|
||||
$t->waitfor('/[01]\n$/'); # print login
|
||||
$t->print("Action: Login\nUsername: $telnet_login\nSecret: $ASTmgrSECRET\n\n");
|
||||
$t->waitfor('/Authentication accepted/'); # waitfor auth accepted
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ if ($action) {
|
||||
$telnet_login = $ASTmgrUSERNAME;
|
||||
}
|
||||
$tn->open($telnet_host);
|
||||
$tn->waitfor('/0\n$/'); # print login
|
||||
$tn->waitfor('/[01]\n$/'); # print login
|
||||
$tn->print("Action: Login\nUsername: $telnet_login\nSecret: $ASTmgrSECRET\n\n");
|
||||
$tn->waitfor('/Authentication accepted/'); # waitfor auth accepted
|
||||
|
||||
|
||||
+1
-1
@@ -390,7 +390,7 @@ if (!$telnet_port) {$telnet_port = '5038';}
|
||||
if (length($ASTmgrUSERNAMEupdate) > 3) {$telnet_login = $ASTmgrUSERNAMEupdate;}
|
||||
else {$telnet_login = $ASTmgrUSERNAME;}
|
||||
$t->open("$telnet_host");
|
||||
$t->waitfor('/0\n$/'); # print login
|
||||
$t->waitfor('/[01]\n$/'); # print login
|
||||
$t->print("Action: Login\nUsername: $telnet_login\nSecret: $ASTmgrSECRET\n\n");
|
||||
$t->waitfor('/Authentication accepted/'); # waitfor auth accepted
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ $t = new Net::Telnet (Port => 5038,
|
||||
else {$telnet_login = $ASTmgrUSERNAME;}
|
||||
|
||||
$t->open("$telnet_host");
|
||||
$t->waitfor('/0\n$/'); # print login
|
||||
$t->waitfor('/[01]\n$/'); # print login
|
||||
$t->print("Action: Login\nUsername: $telnet_login\nSecret: $ASTmgrSECRET\n\n");
|
||||
$t->waitfor('/Authentication accepted/'); # waitfor auth accepted
|
||||
|
||||
|
||||
Reference in New Issue
Block a user