Asterisk-config-syntax-highlight

Asterisk::config::syntax::highlight perl module documentation

NAME

Asterisk::config::syntax::highlight - highlight Asterisk config syntax

SYNOPSIS

use strict;
use Asterisk::config::syntax::highlight;
my $config = Asterisk::config::syntax::highlight->new();
$config->load_file(file=>file name);
print join '<br />', @{$config->return_html_array_ref()};
print join "\n", @{$config->return_ubb_array_ref()};
print join "\n", @{$config->return_wiki_array_ref()};
exit;

More information

http://search.cpan.org/~nsnake/

Output by return_wiki_array_ref example

[macro-DialOutBound]
exten => s,1,NoOp(${ARG1})
; frist time
exten => s,n,Set(FREEIRIS_CALLEE=${ARG1})
exten => s,n,Set(FREEIRIS_DEVICE=${ARG2})
exten => s,n,GotoIf($[${LANGUAGE()}=cn]?cn:en)
exten => s,n(cn),Set(LIMIT_WARNING_FILE=freeiris/cn/tip)
exten => s,n,Goto(out)
exten => s,n(en),Set(LIMIT_WARNING_FILE=freeiris/tip)
exten => s,n(out),AGI(outboundlcr.agi)
exten => s,n,NoOp("FREEIRIS_VALIDSTATUS=${FREEIRIS_VALIDSTATUS}")
exten => s,n,GotoIF($["${FREEIRIS_VALIDSTATUS}" != "0"]?eoh)
exten => s,n,ExecIf($[${FREEIRIS_PLAYFREE} = '1'],AGI,balance.agi)
exten => s,n,Goto(todial)
; retry time
exten => s,n(retry),NoOp('LCR Retry...')
exten => s,n,Set(FREEIRIS_RETRY=$[ ${FREEIRIS_RETRY} + 1 ])
exten => s,n,AGI(outboundlcr.agi,lcr)
; dialling
exten => s,n(todial),NoOp('Dialing...')
exten => s,n,GotoIF($["${"FREEIRIS_LCRSTATUS}" = "2"]?eoh)
;exten => s,n,Set(GROUP(${FREEIRIS_DEVICE})=OUTBOUND_GROUP)
exten => s,n,Set(GROUP(${FREEIRIS_DEVICE})=${GROUP_COUNT(${FREEIRIS_DEVICE})})
exten => s,n,Set(OUTBOUND_GROUP=${FREEIRIS_DEVICE})
exten => s,n,GotoIf($[${EXISTS(${FREEIRIS_DEVICE})} = 0]?eoh)
;exten => s,n,GotoIf($["${FREEIRIS_MAXON}" = "yes" & ${GROUP_COUNT(OUTBOUND_GROUP@${FREEIRIS_DEVICE})} > ${FREEIRIS_MAXCURRENT}]?retry)
exten => s,n,GotoIf($["${FREEIRIS_MAXON}" = "yes" & ${GROUP_COUNT(${FREEIRIS_DEVICE})} >= ${FREEIRIS_MAXCURRENT}]?retry)
exten => s,n,ResetCDR()
exten => s,n,ExecIf($[${EXISTS(${FREEIRIS_LCRTRUNK_NAME})} != 0],Set,CDR(userfield)=${FREEIRIS_LCRTRUNK_NAME})
exten => s,n,SetAMAFlags(billing)
exten => s,n,Dial(${FREEIRIS_DEVICE}/${FREEIRIS_CALLEE},${RINGTIME},L(${FREEIRIS_DIALTIMEOUT}:${WARNINGTIME}:${WARNINGALTER})${OUTBOUND_ARGS})
exten => s,n,GotoIF($["${FREEIRIS_FAILEDON}" = "yes" & "${DIALSTATUS}" = "CONGESTION"]?retry)
exten => s,n(eoh),Hangup


Asterisk::config::syntax::highlight perl module documentation

NAME

Asterisk::config::syntax::highlight - highlight Asterisk config syntax

SYNOPSIS

use strict;
use Asterisk::config::syntax::highlight;
my $config = Asterisk::config::syntax::highlight->new();
$config->load_file(file=>file name);
print join '<br />', @{$config->return_html_array_ref()};
print join "\n", @{$config->return_ubb_array_ref()};
print join "\n", @{$config->return_wiki_array_ref()};
exit;

More information

http://search.cpan.org/~nsnake/

Output by return_wiki_array_ref example

[macro-DialOutBound]
exten => s,1,NoOp(${ARG1})
; frist time
exten => s,n,Set(FREEIRIS_CALLEE=${ARG1})
exten => s,n,Set(FREEIRIS_DEVICE=${ARG2})
exten => s,n,GotoIf($[${LANGUAGE()}=cn]?cn:en)
exten => s,n(cn),Set(LIMIT_WARNING_FILE=freeiris/cn/tip)
exten => s,n,Goto(out)
exten => s,n(en),Set(LIMIT_WARNING_FILE=freeiris/tip)
exten => s,n(out),AGI(outboundlcr.agi)
exten => s,n,NoOp("FREEIRIS_VALIDSTATUS=${FREEIRIS_VALIDSTATUS}")
exten => s,n,GotoIF($["${FREEIRIS_VALIDSTATUS}" != "0"]?eoh)
exten => s,n,ExecIf($[${FREEIRIS_PLAYFREE} = '1'],AGI,balance.agi)
exten => s,n,Goto(todial)
; retry time
exten => s,n(retry),NoOp('LCR Retry...')
exten => s,n,Set(FREEIRIS_RETRY=$[ ${FREEIRIS_RETRY} + 1 ])
exten => s,n,AGI(outboundlcr.agi,lcr)
; dialling
exten => s,n(todial),NoOp('Dialing...')
exten => s,n,GotoIF($["${"FREEIRIS_LCRSTATUS}" = "2"]?eoh)
;exten => s,n,Set(GROUP(${FREEIRIS_DEVICE})=OUTBOUND_GROUP)
exten => s,n,Set(GROUP(${FREEIRIS_DEVICE})=${GROUP_COUNT(${FREEIRIS_DEVICE})})
exten => s,n,Set(OUTBOUND_GROUP=${FREEIRIS_DEVICE})
exten => s,n,GotoIf($[${EXISTS(${FREEIRIS_DEVICE})} = 0]?eoh)
;exten => s,n,GotoIf($["${FREEIRIS_MAXON}" = "yes" & ${GROUP_COUNT(OUTBOUND_GROUP@${FREEIRIS_DEVICE})} > ${FREEIRIS_MAXCURRENT}]?retry)
exten => s,n,GotoIf($["${FREEIRIS_MAXON}" = "yes" & ${GROUP_COUNT(${FREEIRIS_DEVICE})} >= ${FREEIRIS_MAXCURRENT}]?retry)
exten => s,n,ResetCDR()
exten => s,n,ExecIf($[${EXISTS(${FREEIRIS_LCRTRUNK_NAME})} != 0],Set,CDR(userfield)=${FREEIRIS_LCRTRUNK_NAME})
exten => s,n,SetAMAFlags(billing)
exten => s,n,Dial(${FREEIRIS_DEVICE}/${FREEIRIS_CALLEE},${RINGTIME},L(${FREEIRIS_DIALTIMEOUT}:${WARNINGTIME}:${WARNINGALTER})${OUTBOUND_ARGS})
exten => s,n,GotoIF($["${FREEIRIS_FAILEDON}" = "yes" & "${DIALSTATUS}" = "CONGESTION"]?retry)
exten => s,n(eoh),Hangup


Created by: cgi.net, Last modification: Thu 23 of Apr, 2009 (06:24 UTC)
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+