Hello all, Two questions: 1) What do people on the list do to debug phone quality issues. Phone quality seems to be a very subjective thing. But are there metrics that you can work against? Like maybe generating a tone and measuring the return quality etc? It looks like all trial and error right now. If that is the way it is, then fine. But anything more accurate / scientific? 2) Also wondering what people do when parsing asterisk verbose output in the log. Specifically, following a certain call. Asterisk's verbose output logs in sequence of action, which is good, but if you have 40-50 workstations going at once, tracking the progress of one call you are trying to make can be difficult. Obviously you can follow the channel as it goes through. But I am wondering if there is a smarter way, like telling asterisk to only log on certain numbers etc. Any hints or tricks on this would be appreciated. Mikel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20081117/5426800f/attachment.htm
On Mon, Nov 17, 2008 at 10:26 AM, Mikel Lindsaar <raasdnil at gmail.com> wrote:> Hello all, > Two questions: > 1) What do people on the list do to debug phone quality issues. Phone > quality seems to be a very subjective thing. But are there metrics that you > can work against? Like maybe generating a tone and measuring the return > quality etc? It looks like all trial and error right now. If that is the > way it is, then fine. But anything more accurate / scientific? > 2) Also wondering what people do when parsing asterisk verbose output in the > log. Specifically, following a certain call. Asterisk's verbose output > logs in sequence of action, which is good, but if you have 40-50 > workstations going at once, tracking the progress of one call you are trying > to make can be difficult. Obviously you can follow the channel as it goes > through. But I am wondering if there is a smarter way, like telling > asterisk to only log on certain numbers etc.sip set debug peer x is used to debug on certain numbers. and another good way of debugging is wireshark. you sniff the packets, save them to a *.cap file and open with some wireshark that has a GUI. v> Any hints or tricks on this would be appreciated. > Mikel > > _______________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
> 2) Also wondering what people do when parsing asterisk verbose > output in the log. Specifically, following a certain call. > Asterisk's verbose output logs in sequence of action, which is good, > but if you have 40-50 workstations going at once, tracking the > progress of one call you are trying to make can be difficult. > Obviously you can follow the channel as it goes through. But I am > wondering if there is a smarter way, like telling asterisk to only > log on certain numbers etc.I always just used grep. If you know something about a call that you want to look at that would show up, like the phone number, just grep for the number (i.e. `grep 5555551212 /var/log/asterisk/messages`). Then after you have found that first entry that matches the time that you are looking for, look at the number in the brackets next to the message type, like VERBOSE[12345]. What I would do then is just `grep "\[12345\]" /var/log/asterisk/messages` to look at everything that happened during that call. Not perfect, but it works pretty well as long as your log files are being rotated fairly often. Terry
On Mon, Nov 17, 2008 at 10:26 AM, Mikel Lindsaar <raasdnil at gmail.com> wrote:> Hello all, > Two questions: > 1) What do people on the list do to debug phone quality issues. Phone > quality seems to be a very subjective thing. But are there metrics that you > can work against? Like maybe generating a tone and measuring the return > quality etc? It looks like all trial and error right now. If that is the > way it is, then fine. But anything more accurate / scientific?For this you should search RTCP, recently there was a topic here. It's not perfect, but at least gives you some data.> 2) Also wondering what people do when parsing asterisk verbose output in the > log. Specifically, following a certain call. Asterisk's verbose output > logs in sequence of action, which is good, but if you have 40-50 > workstations going at once, tracking the progress of one call you are trying > to make can be difficult. Obviously you can follow the channel as it goes > through. But I am wondering if there is a smarter way, like telling > asterisk to only log on certain numbers etc. > Any hints or tricks on this would be appreciated.For me, the trick is to pass uniqueid from first channel down to child channels. So, in child channels all you have to do, is print inherited id. For example, this should do: context incoming { _X. => { Set(__call_id=${UNIQUEID}); // do whatever } } context queue_ring { _X. => { Verbose(${call_id}); // ring agent } } So, for example queue creates child channel, which lives in separate thread, but it will at beginning display parent's call_id. As i do also register that call_id with CDR, my call log viewer allows also to click on call_id and open new window with full log of this call. But anyway, as soon as you've found out call_id, you can do: 1) grep on log for this call_id # cat /var/log/asterisk/full | grep 1234567890.123 > /tmp/callid.txt 2) sort results, and get ony process id's of threads: # cat /tmp/callid.txt | grep -o -P "(?:ERROR|WARNING|VERBOSE|DEBUG)\[([0-9]*)\]" | grep -o "\[[0-9]*\]" | uniq | sort | uniq > /tmp/callid_pids.txt So, now you have all unique process id's involved in this call. Now you can do: # cat /var/log/asterisk/full | grep -F -f /tmp/callid_pids.txt > callid_$1.log Well, that's the genera, in result you get file containing log only for one call. Then this can be improved by adding date filters (one "full" file might contain repeating call id's). Also if using log rotating, you'll have to find out in which log this call is, and then do a "zcat" on compressed logs. Also, i've heard that this approach of one uniqeid for all child channels has been committed in trunk, it's called "linked_id" there. Regards, Atis -- Atis Lezdins, VoIP Project Manager / Developer, atis at iq-labs.net Skype: atis.lezdins Cell Phone: +371 28806004 Cell Phone: +1 800 7300689 Work phone: +1 800 7502835
On Monday 17 November 2008 02:26:21 am Mikel Lindsaar wrote:> 2) Also wondering what people do when parsing asterisk verbose output in > the log. Specifically, following a certain call. Asterisk's verbose > output logs in sequence of action, which is good, but if you have 40-50 > workstations going at once, tracking the progress of one call you are > trying to make can be difficult. Obviously you can follow the channel as > it goes through. But I am wondering if there is a smarter way, like > telling asterisk to only log on certain numbers etc. > Any hints or tricks on this would be appreciated.The typical way that I do it is to filter on a specific callerid and then conditionally call Verbose at a level lower than 3, and set the core verbose level to 2, which filters out the execution of each application. You can call verbose in one of two different ways, either: ExecIf($["${CALLERID(num)}" = "4445556666"]?Verbose(1,myvar => ${myvar}) Exec(${IF($["${CALLERID(num)}" = "4445556666"]?Verbose(1,myvar => ${myvar}):NoOp()) -- Tilghman