From a4ab9796b46bbe0cbd5f3671bbcdfed39949a531 Mon Sep 17 00:00:00 2001 From: mikec Date: Wed, 20 Feb 2008 18:57:36 +0000 Subject: [PATCH] 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 --- bin/AST_conf_update.pl | 2 +- bin/AST_manager_listen.pl | 2 +- bin/AST_phone_update.pl | 4 ++-- bin/AST_send_action_child.pl | 2 +- bin/AST_update.pl | 2 +- bin/AST_vm_update.pl | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/AST_conf_update.pl b/bin/AST_conf_update.pl index 9f0cdbcf..e8ae8b87 100644 --- a/bin/AST_conf_update.pl +++ b/bin/AST_conf_update.pl @@ -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 diff --git a/bin/AST_manager_listen.pl b/bin/AST_manager_listen.pl index 4a672d43..c788e2b5 100644 --- a/bin/AST_manager_listen.pl +++ b/bin/AST_manager_listen.pl @@ -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 diff --git a/bin/AST_phone_update.pl b/bin/AST_phone_update.pl index c3e8afb2..c7b80e9f 100644 --- a/bin/AST_phone_update.pl +++ b/bin/AST_phone_update.pl @@ -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 diff --git a/bin/AST_send_action_child.pl b/bin/AST_send_action_child.pl index c45147ee..03d49395 100644 --- a/bin/AST_send_action_child.pl +++ b/bin/AST_send_action_child.pl @@ -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 diff --git a/bin/AST_update.pl b/bin/AST_update.pl index ef82fb89..a40c0c36 100644 --- a/bin/AST_update.pl +++ b/bin/AST_update.pl @@ -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 diff --git a/bin/AST_vm_update.pl b/bin/AST_vm_update.pl index 979401a0..e8dd1b51 100644 --- a/bin/AST_vm_update.pl +++ b/bin/AST_vm_update.pl @@ -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