Discussion: Asterisk debugging

Comments Filter

Asterisk Console

One think I'm surprised isn't mentioned here for purposes of debugging Asterisk is using the console. Either by running "asterisk -c" to start asterisk in console mode, or "asterisk -r" to open the console if it's already running you can see many messages that may help you diagnose problems with asterisk. In the console, type "set verbose 10" (or "core set verbose 10" in 1.4) and asterisk will display information about all the actions it is taking.

This is especially helpful if you can reproduce your problem, since the messages reported should tell you where things are going wrong.

by mmacvicar, Friday 09 of February, 2007 (00:25:17 UTC)
debug extension.conf

to debug scenario for extension.conf to have some infos on running variables,you can make a context debug for example :

[debug]]
exten => h,1,NoOp(EXTEN : ${EXTEN})
exten => h,2,NoOP(SIPDOMAIN : ${SIPDOMAIN})
exten => h,3,NoOP(SIPCALLID : ${SIPCALLID})
exten => h,4,NoOP(SIPUAGENT : ${SIPUSERAGENT})
exten => h,5,NoOP(CALLERID : ${CALLERID})
exten => h,6,NoOP(CALLERNAME: ${CALLERIDNAME})
exten => h,7,NoOP(CALLERNUM : ${CALLERIDNUM})
exten => h,8,NoOP(RDNIS : ${RDNIS})
exten => h,9,NoOP(DNID : ${DNID})
exten => h,10,NoOP(SIPDOMAIN : ${SIPDOMAIN})
exten => h,11,NoOP(CONTEXT : ${CONTEXT})

and add as many variable as you need

and you juste include it in your context you want to debug for example

[default]]
include=>debug
exten....

then in asterisk cli you'll see result of your variables

by benoit, Wednesday 09 of June, 2004 (10:38:38 UTC)