[svn-commits] oej: branch oej/pinefrog-1.4 r294350 - in /team/oej/pinefrog-1.4: channels/ i...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Tue Nov 9 10:59:16 CST 2010
Author: oej
Date: Tue Nov 9 10:59:01 2010
New Revision: 294350
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=294350
Log:
- Removing extra debugging
- Various bug fixes from testing
Modified:
team/oej/pinefrog-1.4/channels/chan_sip.c
team/oej/pinefrog-1.4/include/asterisk/rtp.h
team/oej/pinefrog-1.4/main/channel.c
team/oej/pinefrog-1.4/main/rtp.c
Modified: team/oej/pinefrog-1.4/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinefrog-1.4/channels/chan_sip.c?view=diff&rev=294350&r1=294349&r2=294350
==============================================================================
--- team/oej/pinefrog-1.4/channels/chan_sip.c (original)
+++ team/oej/pinefrog-1.4/channels/chan_sip.c Tue Nov 9 10:59:01 2010
@@ -3899,7 +3899,6 @@
ast_log(LOG_DEBUG, "Hanging up channel in state %s (not UP)\n", ast_state2str(ast->_state));
}
- ast_log(LOG_DEBUG, "----%%%%%%----- Stopping media flows in sip_hangup\n");
stop_media_flows(p); /* Immediately stop RTP, VRTP and UDPTL as applicable */
append_history(p, needcancel ? "Cancel" : "Hangup", "Cause %s", p->owner ? ast_cause2str(p->hangupcause) : "Unknown");
@@ -5439,7 +5438,7 @@
}
enum media_type {
- SDP_AUDIO,
+ SDP_AUDIO, /* AUDIO class */
SDP_VIDEO,
SDP_IMAGE,
};
@@ -11784,6 +11783,10 @@
int realtimepeers;
int realtimeusers;
char codec_buf[SIPBUFSIZE];
+ int realtimertpqos = FALSE;
+#ifdef REALTIME2
+ realtimertpqos = ast_check_realtime("rtpqos");
+#endif
realtimepeers = ast_check_realtime("sippeers");
realtimeusers = ast_check_realtime("sipusers");
@@ -11830,6 +11833,7 @@
ast_cli(fd, " SIP realtime: Disabled\n" );
else
ast_cli(fd, " SIP realtime: Enabled\n" );
+ ast_cli(fd, " QOS realtime reports: %s\n", realtimertpqos ? "Enabled" : "Disabled" );
ast_cli(fd, "\nGlobal Signalling Settings:\n");
ast_cli(fd, "---------------------------\n");
@@ -13939,11 +13943,14 @@
if (type == SDP_AUDIO) { /* Audio */
p->audioqual = ast_calloc(sizeof(struct ast_rtp_quality), 1);
(* p->audioqual) = qual;
+ p->audioqual->end = ast_tvnow();
+ p->audioqual->mediatype = type;
} else if (type == SDP_VIDEO) { /* Video */
p->videoqual = ast_calloc(sizeof(struct ast_rtp_quality), 1);
(* p->videoqual) = qual;
- }
- p->audioqual->end = ast_tvnow();
+ p->videoqual->mediatype = type;
+ p->videoqual->end = ast_tvnow();
+ }
}
}
@@ -13955,10 +13962,11 @@
char buf_duration[10], buf_lssrc[30], buf_rssrc[30], buf_rtt[30];
char localjitter[10], remotejitter[10];
char buf_readcost[5], buf_writecost[5];
+ char buf_mediatype[10];
/* Update the reports before writing */
- sip_rtcp_report(p, p->rtp, SDP_AUDIO, 2);
- sip_rtcp_report(p, p->vrtp, SDP_VIDEO, 2);
+ sip_rtcp_report(dialog, dialog->rtp, SDP_AUDIO, 2);
+ sip_rtcp_report(dialog, dialog->vrtp, SDP_VIDEO, 2);
/* Since the CDR is already gone, we need to calculate our own duration.
The CDR duration is the definitive resource for billing, this is
@@ -13980,16 +13988,20 @@
sprintf(buf_duration, "%u", duration);
sprintf(buf_readcost, "%d", qual->readcost);
sprintf(buf_writecost, "%d", qual->writecost);
+ sprintf(buf_mediatype,"%s", qual->mediatype == SDP_AUDIO ? "audio" : (qual->mediatype == SDP_VIDEO ? "video" : "fax") );
+
ast_store_realtime("rtpqos",
"channel", dialog->owner ? dialog->owner->name : "",
"uniqueid", dialog->owner ? dialog->owner->uniqueid : "",
"bridgedchan", qual->bridgedchan[0] ? qual->bridgedchan : "" ,
"bridgeduniqueid", qual->bridgeduniqueid[0] ? qual->bridgeduniqueid : "",
"pvtcallid", dialog->callid,
- "rtpmedia", mediatype,
- "localssrc", buf_lssrc, "remotessrc", buf_rssrc,
+ "rtpmedia", buf_mediatype,
+ "localssrc", buf_lssrc,
+ "remotessrc", buf_rssrc,
"rtt", buf_rtt,
- "localjitter", localjitter, "remotejitter", remotejitter,
+ "localjitter", localjitter,
+ "remotejitter", remotejitter,
"sendformat", ast_getformatname(qual->lasttxformat),
"receiveformat", ast_getformatname(qual->lastrxformat),
"rtcpstatus", qual->numberofreports == 0 ? "Inactive" : "Active",
@@ -13999,7 +14011,6 @@
"readtranslator", qual->readtranslator,
"readcost", buf_readcost,
NULL);
- }
#endif
}
@@ -16606,7 +16617,6 @@
}
}
- ast_log(LOG_DEBUG, "----%%%%%%----- Stopping media flows in handle_request_bye\n");
stop_media_flows(p); /* Immediately stop RTP, VRTP and UDPTL as applicable */
if (!ast_strlen_zero(get_header(req, "Also"))) {
Modified: team/oej/pinefrog-1.4/include/asterisk/rtp.h
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinefrog-1.4/include/asterisk/rtp.h?view=diff&rev=294350&r1=294349&r2=294350
==============================================================================
--- team/oej/pinefrog-1.4/include/asterisk/rtp.h (original)
+++ team/oej/pinefrog-1.4/include/asterisk/rtp.h Tue Nov 9 10:59:01 2010
@@ -106,6 +106,7 @@
char readtranslator[80]; /*!< Translator providing frames when reading */
int writecost; /*!< Cost in milliseconds for encoding/decoding 1 second of outbound media */
int readcost; /*!< Cost in milliseconds for encoding/decoding 1 second of inbound media */
+ int mediatype; /*! Type of media */
};
Modified: team/oej/pinefrog-1.4/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinefrog-1.4/main/channel.c?view=diff&rev=294350&r1=294349&r2=294350
==============================================================================
--- team/oej/pinefrog-1.4/main/channel.c (original)
+++ team/oej/pinefrog-1.4/main/channel.c Tue Nov 9 10:59:01 2010
@@ -1011,28 +1011,12 @@
return __ast_queue_frame(chan, fin, 1, NULL);
}
-static void set_hangupchannelvars(struct ast_channel *chan, const char *name)
-{
- if (!chan || ast_strlen_zero(name)) {
- return;
- }
-
- /* Set a channel variable */
- pbx_builtin_setvar_helper(chan, "HANGUPCHANNEL", name);
-
- /* Also set a cdr variable, that can be reached regardless of the cdr before h option */
- if (chan->cdr) {
- ast_cdr_setvar(chan->cdr, "hangupchannel", name, 0);
- }
-}
-
/*! \brief Queue a hangup frame for channel */
int ast_queue_hangup(struct ast_channel *chan)
{
struct ast_frame f = { AST_FRAME_CONTROL, AST_CONTROL_HANGUP };
/* Yeah, let's not change a lock-critical value without locking */
if (!ast_channel_trylock(chan)) {
- set_hangupchannelvars(chan, chan->name);
chan->_softhangup |= AST_SOFTHANGUP_DEV;
ast_channel_unlock(chan);
}
@@ -1566,7 +1550,6 @@
if (option_debug)
ast_log(LOG_DEBUG, "Soft-Hanging up channel '%s'\n", chan->name);
- set_hangupchannelvars(chan, "system");
/* Inform channel driver that we need to be hung up, if it cares */
chan->_softhangup |= cause;
ast_queue_frame(chan, &ast_null_frame);
Modified: team/oej/pinefrog-1.4/main/rtp.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinefrog-1.4/main/rtp.c?view=diff&rev=294350&r1=294349&r2=294350
==============================================================================
--- team/oej/pinefrog-1.4/main/rtp.c (original)
+++ team/oej/pinefrog-1.4/main/rtp.c Tue Nov 9 10:59:01 2010
@@ -590,11 +590,6 @@
/* Schedule transmission of Receiver Report */
ast_rtcp_write_empty(rtp, rtp->rtcp->s);
rtp->rtcp->schedid = ast_sched_add(rtp->sched, ast_rtcp_calc_interval(rtp), ast_rtcp_write, rtp);
- ast_log(LOG_DEBUG, "-------- SCHEDULING RTCP reports!!!\n");
- } else {
- // ast_log(LOG_DEBUG, "----- NOT SCHEDULING RTCP - RTCP %s RTCP address %s schedid %d\n",
- //rtp->rtcp ? "yes" : "no",
- //rtp->rtcp->them.sin_addr.s_addr ? "yes" : "no", rtp->rtcp->schedid);
}
}
@@ -1021,7 +1016,7 @@
}
}
- if (option_debug) {
+ if (option_debug && rtcp_debug_test_addr(&sin)) {
ast_log(LOG_DEBUG, "Got RTCP report of %d bytes - %d messages\n", res, packetwords);
}
@@ -1033,7 +1028,9 @@
position = 0;
while (position < packetwords) {
i = position;
- ast_log(LOG_DEBUG, "***** Debug - position = %d\n", position);
+ if (option_debug>3 && rtcp_debug_test_addr(&sin)) {
+ ast_log(LOG_DEBUG, "***** Debug - position = %d\n", position);
+ }
length = ntohl(rtcpheader[i]);
@@ -2404,7 +2401,9 @@
}
ast_copy_string(rtp->rtcp->ourcname, cname, length+1);
rtp->rtcp->ourcnamelength = length;
- ast_log(LOG_DEBUG, "--- Copied CNAME %s to RTCP structure (length %d)\n", cname, (int) length);
+ if (option_debug > 3) {
+ ast_log(LOG_DEBUG, "--- Copied CNAME %s to RTCP structure (length %d)\n", cname, (int) length);
+ }
}
/*! \brief Set the transcoding variables for the QoS reports */
More information about the svn-commits
mailing list