Answer the question
In order to leave comments, you need to log in
How to monitor calls and dialplan in asterisk console?
There are questions about the asterisk console commands, I just can’t google how some things are done in the console.
1. The "dialplan show" command displays either the entire dialplan or one of its contexts. And how to display only those dialplan rules that are applicable to a specific number?
2. How to enable tracing in the console or what is it called for a certain number?
Answer the question
In order to leave comments, you need to log in
What you are asking, as far as I know, cannot be done in the console (trace the number through the dialplan) or is extremely problematic (SIP dump).
But based on your own comments on the question, you can suggest tools that will help you get a similar result.
1. You can select a specific call from the total mass in the Asterisk logs using the callid (do not confuse it with the Call-ID SIP header). There is additional information on it here:
https://wiki.asterisk.org/wiki/display/AST/Unique+...
Knowing callid and grep, you can easily select the information you need.
2. You can capture SIP traffic either in the Asterisk console or using external tools. External tools are more convenient both in terms of filtering and in terms of fixing traffic. Your best bet is sgrep. For example, to fix any SIP traffic that has a specific number, you can use the command sudo sngrep XXXXXXXXXXX
where XXXXXXXXXXX is replaced by the number you need. If you are not sure about the number but you know from which ip to wait for packets, you can filter by ip address sudo sngrep host XXX.XXX.XXX.XXX
where XXX.XXX.XXX.XXX replace with the desired ip. You can achieve the same result using tcpdump + wireshark. Well, in the console you can use the commands sip set debug {on|off|ip|peer}
/ pjsip set logger {on|off|host}
or sip set history {on|off}
/pjsip set history {on|off|clear}
but since the output of these commands will be mixed in with the rest of the output of Asterisk, this may not be the most convenient way under heavy load.
3. You specified in the comment how to check the current level of debug information output. This can be done with a command in the Asterisk console core show settings
and finding the line "Debug level" in the output.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question