Thursday, June 4, 2009

Re: [BLUG] Grepping the output from the Asterisk console

Mark,
  Thanks. I didn't know about the strings command, so I will have a look. The box I was trying to monitor has way too much traffic to have full logging turned on, so when I get stuck, I connect to the Asterisk console and 'core set verbose 10' and then focus for everything I am worth until I find what I need. You suggestion may just cut down on some of my headaches :-)

  I have am managing 4 Asterisk boxes right now, and each has a different setup.

  • The main PBX for Finelight is 100% SIP. 15 SIP trunks ring in, and SIP desktop phones. There is a Zaptel card in it, but simply to be used as a timing source forMeetMe.
  • The main backoffice PBX for Bloom has 2 PRIs running into it, and SIP desktop phones.
  • The telephony engine for Bloom's calling efforts is Asterisk based. It uses a SIP connection to another telephony box that used Aculab hardware. That Aculab box has 2 DS3s worth of lines coming into it.
  • There is also a box for playing standard recordings that is internal only and only uses IAX.
The 2 that I mess with mostly are the first 2. When we first went all SIP with Finelight's PBX we had a horrible time with echo. For all of the talk about SIP it is a pretty picky protocol. I managed to resolve the issues but making sure that all of the telephony was on the same subnet. This allowed Asterisk to remove itself from the media path (making the 2 SIP endpoint use peer to peer SIP). Since I made that change (over the Christmas holiday) we haven't had any issues with echo.


On Thu, Jun 4, 2009 at 8:32 AM, Mark Krenz <mark@slugbug.org> wrote:

 Its complaining because there are color escape sequences in the
asterisk -r output.  I'd recommend greping from /var/log/asterisk/full
or from wherever your full logging is done.  If you really need to grep
the output from asterisk -r, then pass it through the strings program
like this:

 tail -f /tmp/asterisk_output.txt | strings | grep <pattern>

strings will strip binary data from stdout.


 As for Asterisk, just curious what kind of setup you have. Are you
still using POTS lines into the asterisk box or do you have a PRI line
or anything like that?  At Suso we have two POTS lines going into a 4
port Rhino card and it works pretty well. Sometimes we have trouble with
echoing, but I think that's because of some settings on our Linksys IP
phones.

On Thu, Jun 04, 2009 at 12:09:20PM GMT, Kirk Gleason [kgleason@gmail.com] said the following:
> Does anyone out there know of a way to feed the output from "asterisk -r" to
> stdout so that I can grep it for certain events? I was trying to
> troubleshoot a problem yesterday, and it would have been extremely.
>
> I did try:
>
> on screen 1
> asterisk -r > /tmp/asterisk_output.txt
>
> on screen 2
> tail -f /tmp/asterisk_output.txt | grep <pattern>
>
> but whenever a pattern was matched (or so I suspect), grep would complain
> about the source being a binary file.
>
> --Kirk

> _______________________________________________
> BLUG mailing list
> BLUG@linuxfan.com
> http://mailman.cs.indiana.edu/mailman/listinfo/blug


--
Mark Krenz
Bloomington Linux Users Group
http://www.bloomingtonlinux.org/
_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

No comments: