Astrad Version 9
André Guimarães, 2011-10-04
Switzernet
This Astrad version requires version 4 or 5 of
DBA.
There where corrections in this file to ensure that the script is connected to asterisk while executing commands.
Instead of
$astman->connected
or
$astman->connected(1)
It is now used
$astman->connect
In this version, an astrad reload is now issued at 00 :03 AM
Croncheck, a script that is run by CRON looking if emails where sent to alerts@unappel.ch, is now generated by a template.
Corrected an error in this template, that was incorrectly granting SQL privileges to <monitor_db_user>@<monitor_db_user> intead of <monitor_db_user>@<monitor_db_ip>, preventing this user from accessing the database.
Template changed to prevent login access from any IP. Now only localhost and Cacti can access Asterisk Manager interface. Changed to bind to all IP addresses (solves following WARNING).
Oct 4 17:03:26 stock asterisk[27289]: WARNING[27289]: manager.c:3161 in init_manager: Invalid address '127.0.0.1,91.121.121.115' specified, using 0.0.0.0
Comparisons should be within quotation marks to prevent errors if a variable is not defined.
Example:
When h323-return-code is not defined these tests:
exten => _[*0-9]!,n,GotoIf($[ ${h323-return-code} = 2 ]?wrong_passwd,${EXTEN},1)
exten => _[*0-9]!,n,GotoIf($[ ${h323-return-code} = 3 ]?in_use,${EXTEN},1)
exten => _[*0-9]!,n,GotoIf($[ ${h323-return-code} = 4 ]?zero_balance,${EXTEN},1)
exten => _[*0-9]!,n,GotoIf($[ ${h323-return-code} = 5 ]?account_expired,${EXTEN},1)
exten => _[*0-9]!,n,GotoIf($[ ${h323-return-code} = 6 ]?credit_limit,${EXTEN},1)
exten => _[*0-9]!,n,GotoIf($[ ${h323-return-code} = 7 ]?user_denied,${EXTEN},1)
exten => _[*0-9]!,n,GotoIf($[ ${h323-return-code} = 8 ]?not_avail,${EXTEN},1)
exten => _[*0-9]!,n,GotoIf($[ ${h323-return-code} = 9 ]?no-route-exists-to-dest,${EXTEN},1)
exten => _[*0-9]!,n,GotoIf($[ ${h323-return-code} = 10 ]?retries,${EXTEN},1)
exten => _[*0-9]!,n,GotoIf($[ ${h323-return-code} = 12 ]?insufficient_balance,${EXTEN},1)
exten => _[*0-9]!,n,GotoIf($[ ${h323-return-code} = 0 | ${h323-return-code} = 13 ]?welcome-msg,${EXTEN},1)
give the following warnings:
Oct 3 15:18:46 astrad5 asterisk[3667]: WARNING[5584]: ast_expr2.fl:407 in ast_yyerror: ast_yyerror(): syntax error: syntax error, unexpected '=', expecting $end; Input:#012 = 1 #012 ^
Oct 3 15:18:46 astrad5 asterisk[3667]: WARNING[5584]: ast_expr2.fl:411 in ast_yyerror: If you have questions, please refer to doc/channelvariables.txt in the asterisk source.
Oct 3 15:18:46 astrad5 asterisk[3667]: WARNING[5584]: ast_expr2.fl:407 in ast_yyerror: ast_yyerror(): syntax error: syntax error, unexpected '=', expecting $end; Input:#012 = 2 #012 ^
Oct 3 15:18:46 astrad5 asterisk[3667]: WARNING[5584]: ast_expr2.fl:411 in ast_yyerror: If you have questions, please refer to doc/channelvariables.txt in the asterisk source.
Oct 3 15:18:46 astrad5 asterisk[3667]: WARNING[5584]: ast_expr2.fl:407 in ast_yyerror: ast_yyerror(): syntax error: syntax error, unexpected '=', expecting $end; Input:#012 = 3 #012 ^
Oct 3 15:18:46 astrad5 asterisk[3667]: WARNING[5584]: ast_expr2.fl:411 in ast_yyerror: If you have questions, please refer to doc/channelvariables.txt in the asterisk source.
Oct 3 15:18:46 astrad5 asterisk[3667]: WARNING[5584]: ast_expr2.fl:407 in ast_yyerror: ast_yyerror(): syntax error: syntax error, unexpected '=', expecting $end; Input:#012 = 4 #012 ^
Oct 3 15:18:46 astrad5 asterisk[3667]: WARNING[5584]: ast_expr2.fl:411 in ast_yyerror: If you have questions, please refer to doc/channelvariables.txt in the asterisk source.
Oct 3 15:18:46 astrad5 asterisk[3667]: WARNING[5584]: ast_expr2.fl:407 in ast_yyerror: ast_yyerror(): syntax error: syntax error, unexpected '=', expecting $end; Input:#012 = 5 #012 ^
Oct 3 15:18:46 astrad5 asterisk[3667]: WARNING[5584]: ast_expr2.fl:411 in ast_yyerror: If you have questions, please refer to doc/channelvariables.txt in the asterisk source.
Oct 3 15:18:46 astrad5 asterisk[3667]: WARNING[5584]: ast_expr2.fl:407 in ast_yyerror: ast_yyerror(): syntax error: syntax error, unexpected '=', expecting $end; Input:#012 = 6 #012 ^
Oct 3 15:18:46 astrad5 asterisk[3667]: WARNING[5584]: ast_expr2.fl:411 in ast_yyerror: If you have questions, please refer to doc/channelvariables.txt in the asterisk source.
Oct 3 15:18:46 astrad5 asterisk[3667]: WARNING[5584]: ast_expr2.fl:407 in ast_yyerror: ast_yyerror(): syntax error: syntax error, unexpected '=', expecting $end; Input:#012 = 7 #012 ^
Oct 3 15:18:46 astrad5 asterisk[3667]: WARNING[5584]: ast_expr2.fl:411 in ast_yyerror: If you have questions, please refer to doc/channelvariables.txt in the asterisk source.
Oct 3 15:18:46 astrad5 asterisk[3667]: WARNING[5584]: ast_expr2.fl:407 in ast_yyerror: ast_yyerror(): syntax error: syntax error, unexpected '=', expecting $end; Input:#012 = 8 #012 ^
Oct 3 15:18:46 astrad5 asterisk[3667]: WARNING[5584]: ast_expr2.fl:411 in ast_yyerror: If you have questions, please refer to doc/channelvariables.txt in the asterisk source.
Oct 3 15:18:46 astrad5 asterisk[3667]: WARNING[5584]: ast_expr2.fl:407 in ast_yyerror: ast_yyerror(): syntax error: syntax error, unexpected '=', expecting $end; Input:#012 = 9 #012 ^
Oct 3 15:18:46 astrad5 asterisk[3667]: WARNING[5584]: ast_expr2.fl:411 in ast_yyerror: If you have questions, please refer to doc/channelvariables.txt in the asterisk source.
Oct 3 15:18:46 astrad5 asterisk[3667]: WARNING[5584]: ast_expr2.fl:407 in ast_yyerror: ast_yyerror(): syntax error: syntax error, unexpected '=', expecting $end; Input:#012 = 10 #012 ^
Oct 3 15:18:46 astrad5 asterisk[3667]: WARNING[5584]: ast_expr2.fl:411 in ast_yyerror: If you have questions, please refer to doc/channelvariables.txt in the asterisk source.
Oct 3 15:18:46 astrad5 asterisk[3667]: WARNING[5584]: ast_expr2.fl:407 in ast_yyerror: ast_yyerror(): syntax error: syntax error, unexpected '=', expecting $end; Input:#012 = 12 #012 ^
Oct 3 15:18:46 astrad5 asterisk[3667]: WARNING[5584]: ast_expr2.fl:411 in ast_yyerror: If you have questions, please refer to doc/channelvariables.txt in the asterisk source.
Oct 3 15:18:46 astrad5 asterisk[3667]: WARNING[5584]: ast_expr2.fl:407 in ast_yyerror: ast_yyerror(): syntax error: syntax error, unexpected '=', expecting $end; Input:#012 = 0 | = 13 #012 ^
No need to load modules that we’re not using. Where not using modules Amd and Zapata and as we don’t have their configuration files we get the errors when starting asterisk:
Sep 30 03:00:02 astrad5 asterisk[3667]: ERROR[27443]: app_amd.c:361 in load_config: Configuration file amd.conf missing.
Sep 30 03:00:02 astrad5 asterisk[3667]: ERROR[27443]: chan_zap.c:12645 in setup_zap: Unable to load config zapata.conf
In the following lines
[ISUP28]
exten => _[*0-9]!,1,NoOp()
exten => _[*0-9]!,1,wait(1)
the wait command is not being executed as it has the same priority of the first line. The ‘,1,’ should be changed to ‘,n,’.
Gives the warning:
Sep 30 03:00:02 astrad5 asterisk[3667]: WARNING[27443]: pbx.c:4702 in add_pri: Unable to register extension '_[*0-9]!', priority 1 in 'ISUP28', already in use
S
There isn’t ‘the-next’ sound file in any format:
exten => _[*0-9]!,n,GotoIf($[ ${II} = 1 ]?SingleRoute)
exten => _[*0-9]!,n,Playback(the-next,noanswer)
Log warning:
Oct 1 10:45:32 astrad5 asterisk[3667]: WARNING[7953]: file.c:912 in ast_streamfile: Unable to open the-next (format 0x4 (ulaw)): No such file or directory
Oct 1 10:45:32 astrad5 asterisk[3667]: WARNING[7953]: app_playback.c:439 in playback_exec: ast_streamfile failed on SIP/212.249.15.6-8408b330 for the-next|noanswer
Oct 1 10:45:32 astrad5 asterisk[3667]: WARNING[7953]: file.c:602 in ast_openstream_full: File the-next does not exist in any format
Master Mysql Astrad DBA V004
http://switzernet.com/3/public/110722-dba-v4/
Master MySQL-Astrad versions (DBA)
http://switzernet.com/3/public/110317-db3-versions/
Astrad Versioning
http://switzernet.com/3/public/110126-astrad-versions/
List of functionalities to add to Astrad
http://switzernet.com/3/public/110523-astrad-wish-list/