[Asterisk-Dev] Is 'Notice' a desireable log level for GotoIf when branch not tak en?

Kris Boutilier Kris.Boutilier at scrd.bc.ca
Tue Sep 7 17:02:19 MST 2004


I have quite a few inline conditional branches in my dialplan along the
lines of:

...
exten => s,2,GotoIf($[${ARG1:0:1} = 0]?s-attendant,1)   ; Global attendant
exten => s,3,GotoIf($[${ARG1:0:1} = 1]?s-parkinglot,1)  ; Call parking pool
exten => s,4,GotoIf($[${ARG1:0:1} = 2]?s-i,1)           ; {reserved -
parking lot for unused Norstar DNs}
exten => s,5,GotoIf($[${ARG1:0:1} = 3]?s-30,1)          ; Direct Dialtone
selector prefixes
...

Now, the way the logging is structured in pbx.c this seems to be considered
a potential problem - specifically it generates logs entries such as:

Sep  7 16:34:58 NOTICE[5980180]: pbx.c:4700 pbx_builtin_gotoif: Not taking
any branch

Is this really desireable? It doesn't contain anything useful about the
state of the dialplan or which branch is being considered. However, when in
console with verbosity turned up I see:

    -- Executing GotoIf("Zap/23-1", "0?s-attendant|1") in new stack
Sep  7 16:34:58 NOTICE[5980180]: pbx.c:4700 pbx_builtin_gotoif: Not taking
any branch
    -- Executing GotoIf("Zap/23-1", "0?s-parkinglot|1") in new stack
Sep  7 16:34:58 NOTICE[5980180]: pbx.c:4700 pbx_builtin_gotoif: Not taking
any branch
    -- Executing GotoIf("Zap/23-1", "0?s-i|1") in new stack
Sep  7 16:34:58 NOTICE[5980180]: pbx.c:4700 pbx_builtin_gotoif: Not taking
any branch
    -- Executing GotoIf("Zap/23-1", "0?s-30|1") in new stack
Sep  7 16:34:58 NOTICE[5980180]: pbx.c:4700 pbx_builtin_gotoif: Not taking
any branch
...
    -- Executing GotoIf("Zap/23-1", "1?s-pstn|1") in new stack
    -- Goto (macro-dialplan-routing,s-pstn,1)

Which is infinitely more useful, given the relative context. 

So, can anyone see any reason not to demote the Notice to Verbose, much the
same as the Goto()?

Kris Boutilier
Information Systems Coordinator
Sunshine Coast Regional District




More information about the asterisk-dev mailing list