[asterisk-dev] CLI development questions

Matt Riddell matt at venturevoip.com
Sun Aug 5 20:29:57 CDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Russell Bryant wrote:
> Vasil Kolev wrote:
>> В пт, 2007-08-03 в 14:05 -0500, Russell Bryant написа:
>>> Dylan VanHerpen wrote:
>>>> But full blown grep would be great too:
>>>>
>>>>           sip show channels | grep foo
>>> asterisk -rx "sip show channels" | grep foo
>>>
>>> :)
>>>
>> This doesn't work some times, for example you get some other output
>> also, especially on really loaded servers (I've tried using some stuff
>> like this for some scripts and found it unreliable). My impressions are
>> mostly with 1.2, I'll try recreating this Monday when I see some load on
>> a few 1.4 machines and will open a bug (if this should be considered a
>> bug).
> 
> If that happens, then I would consider it a bug.  I don't think it will be very 
> difficult to fix, either.

The question is whether it happens using the new verbose handling stuff.

Here's an example:

[root at localhost ~]# asterisk -rx 'show channels'
Parsing /etc/asterisk/extconfig.conf
ction
Channel              Location             State   Application(Data)

0 active channels
0 active calls
Verbosity is at least 120
Core debug is at least 2
[Aug  6 13:24:41] Reliably Transmitting (NAT) to xxx:5060:
OPTIONS sip:sip.xxx SIP/2.0
Via: SIP/2.0/UDP xxx:5060;branch=z9hG4bK77c0eb87;rport
From: "asterisk" <sip:asterisk at xxx>;tag=as1702b062
To: <sip:sip.xxx>
Contact: <sip:asterisk at xxx>
Call-ID: 3844b7b40008c1f03a87db8c4aee6ef8 at xxx
CSeq: 102 OPTIONS
User-Agent: xxx
Max-Forwards: 70
Date: Mon, 06 Aug 2007 01:24:41 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Length: 0


- ---
[Aug  6 13:24:41]
<--- SIP read from xxx:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP
xxx:5060;branch=z9hG4bK7acab550;rport;received=xxx
From: "asterisk" <sip:asterisk at xxx>;tag=as272f9888
To: <sip:xxx>;tag=as777cc9be
Call-ID: 6144b66e0550863740 <http://www.snapanumber.com/>39a5f011b3a81c at xxx
CSeq: 102 OPTIONS
User-Agent: xxx
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:xxx>
Accept: application/sdp
Content-Length: 0


<------------->
[Aug  6 13:24:41] --- (11 headers 0 lines) ---
[Aug  6 13:24:41] Really destroying SIP dialog '6144b66e0550863740
<http://www.snapanumber.com/>39a5f011b3a81c at xxx' Method: OPTIONS
[Aug  6 13:24:41] Reliably Transmitting (NAT) to xxx:5060:
OPTIONS sip:xxx.co.nz SIP/2.0
Via: SIP/2.0/UDP xxx:5060;branch=z9hG4bK5a173cec;rport
From: "xxx" <sip:xxx at xxx>;tag=as29d7485d
To: <sip:xxx.co.nz>
Contact: <sip:xxx at xxx>
Call-ID: xxx at xxx
CSeq: 102 OPTIONS
User-Agent: xxx
Max-Forwards: 70
Date: Mon, 06 Aug 2007 01:24:41 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Length: 0


- ---
Asterisk ending (0).

SVN-branch-1.4-r75306

- --
Kind Regards,

Matt Riddell
Director
_______________________________________________

http://www.venturevoip.com (Great new VoIP end to end solution)
http://www.venturevoip.com/news.php (Daily Asterisk News - html)
http://feeds.venturevoip.com/AsteriskNews (Daily Asterisk News - rss)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGtnmVDQNt8rg0Kp4RAnEkAJ9chC2ojm1wO10Pgqm1omfx7RmTUgCgsIdq
HUHavRz3qHMEsyZM6ds0qUs=
=kKIq
-----END PGP SIGNATURE-----



More information about the asterisk-dev mailing list