[Asterisk-Dev] cisco 7940/7960 call_stats logging
Jared Mauch
jared at puck.nether.net
Tue May 11 07:02:08 MST 2004
I've hacked together this which does
the job..
Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.382
diff -u -r1.382 chan_sip.c
--- chan_sip.c 10 May 2004 18:45:20 -0000 1.382
+++ chan_sip.c 11 May 2004 14:00:53 -0000
@@ -5836,6 +5836,8 @@
char *from;
char *e;
char *useragent;
+ char *rtprx = NULL;
+ char *rtptx = NULL;
struct ast_channel *c=NULL;
struct ast_channel *transfer_to;
int seqno;
@@ -6135,6 +6137,7 @@
transmit_response_reliable(p, "481 Call Leg Does Not Exist", req, 1);
}
} else if (!strcasecmp(cmd, "BYE")) {
+ /* we received a BYE */
copy_request(&p->initreq, req);
check_via(p, req);
p->alreadygone = 1;
@@ -6171,6 +6174,13 @@
ast_queue_hangup(p->owner);
else
p->needdestroy = 1;
+ /* Search for the RTP-RxStat and RTP-TxStat headers */
+ rtprx = get_header(req, "RTP-RxStat");
+ rtptx = get_header(req, "RTP-TxStat");
+ if (strlen(rtprx))
+ {
+ ast_log(LOG_NOTICE, "Received RTP Stats from Cisco IP Phone saying Rx/%s Tx/%s\n", rtprx, rtptx);
+ }
transmit_response(p, "200 OK", req);
} else if (!strcasecmp(cmd, "MESSAGE")) {
if (!ignore) {
cvs server: Diffing h323
- Jared
On Fri, Apr 30, 2004 at 12:23:38AM -0400, Jared Mauch wrote:
>
> so, in the recent SIP firmware on the Cisco phones,
> it sends some data in the BYE message that can be used to collect
> information about the connection.
>
> I want to collect and parse this data to help show my users
> that have bad connections exactly what we see as compared to
> a non-problematic connection/ISP.
>
> Has anyone been looking at this yet?
>
> http://www.cisco.com/en/US/products/sw/voicesw/ps2156/prod_release_note09186a00801d1d80.html#80912
>
> I'm also really interested in the jitter and late/lost pkts
> too..
>
> - jared
>
> --
> Jared Mauch | pgp key available via finger from jared at puck.nether.net
> clue++; | http://puck.nether.net/~jared/ My statements are only mine.
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
--
Jared Mauch | pgp key available via finger from jared at puck.nether.net
clue++; | http://puck.nether.net/~jared/ My statements are only mine.
More information about the asterisk-dev
mailing list