[asterisk-commits] oej: branch oej/earlyrtpfix r53283 - in /team/oej/earlyrtpfix: ./ apps/ chann...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Feb 6 08:18:56 MST 2007


Author: oej
Date: Tue Feb  6 09:18:56 2007
New Revision: 53283

URL: http://svn.digium.com/view/asterisk?view=rev&rev=53283
Log:
Reset automerge on this branch

Modified:
    team/oej/earlyrtpfix/   (props changed)
    team/oej/earlyrtpfix/Makefile
    team/oej/earlyrtpfix/UPGRADE.txt
    team/oej/earlyrtpfix/apps/app_dial.c
    team/oej/earlyrtpfix/apps/app_playback.c
    team/oej/earlyrtpfix/apps/app_queue.c
    team/oej/earlyrtpfix/channels/chan_sip.c
    team/oej/earlyrtpfix/channels/h323/ast_h323.cxx
    team/oej/earlyrtpfix/configs/sip.conf.sample
    team/oej/earlyrtpfix/main/config.c
    team/oej/earlyrtpfix/main/manager.c
    team/oej/earlyrtpfix/main/rtp.c

Propchange: team/oej/earlyrtpfix/
------------------------------------------------------------------------------
    automerge = http://edvina.net/training/

Propchange: team/oej/earlyrtpfix/
------------------------------------------------------------------------------
Binary property 'branch-1.2-blocked' - no diff available.

Propchange: team/oej/earlyrtpfix/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/oej/earlyrtpfix/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Feb  6 09:18:56 2007
@@ -1,1 +1,1 @@
-/branches/1.4:1-53105
+/branches/1.4:1-53282

Modified: team/oej/earlyrtpfix/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/earlyrtpfix/Makefile?view=diff&rev=53283&r1=53282&r2=53283
==============================================================================
--- team/oej/earlyrtpfix/Makefile (original)
+++ team/oej/earlyrtpfix/Makefile Tue Feb  6 09:18:56 2007
@@ -533,6 +533,7 @@
 		echo "" ; \
 		echo ";[options]" ; \
 		echo ";internal_timing = yes" ; \
+		echo ";systemname = my_system_name ; prefix uniqueid with a system name for global uniqueness issues" ; \
 		echo "; Changing the following lines may compromise your security." ; \
 		echo ";[files]" ; \
 		echo ";astctlpermissions = 0660" ; \

Modified: team/oej/earlyrtpfix/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/oej/earlyrtpfix/UPGRADE.txt?view=diff&rev=53283&r1=53282&r2=53283
==============================================================================
--- team/oej/earlyrtpfix/UPGRADE.txt (original)
+++ team/oej/earlyrtpfix/UPGRADE.txt Tue Feb  6 09:18:56 2007
@@ -163,6 +163,23 @@
   option, it will default to "no" to keep backward compatability with the old 
   behavior.
 
+* Queues depend on the channel driver reporting the proper state
+  for each member of the queue. To get proper signalling on
+  queue members that use the SIP channel driver, you need to
+  enable a call limit (could be set to a high value so it
+  is not put into action) and also make sure that both inbound
+  and outbound calls are accounted for.
+
+  Example:
+
+       [general]
+       limitonpeer = yes
+
+       [peername]
+       type=friend
+       call-limit=10
+
+
 * The app_queue application now has the ability to use MixMonitor to 
   record conversations queue members are having with queue callers. Please
   see configs/queues.conf.sample for more information on this option.

Modified: team/oej/earlyrtpfix/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/oej/earlyrtpfix/apps/app_dial.c?view=diff&rev=53283&r1=53282&r2=53283
==============================================================================
--- team/oej/earlyrtpfix/apps/app_dial.c (original)
+++ team/oej/earlyrtpfix/apps/app_dial.c Tue Feb  6 09:18:56 2007
@@ -82,7 +82,7 @@
 "    ANSWEREDTIME - This is the amount of time for actual call.\n"
 "    DIALSTATUS   - This is the status of the call:\n"
 "                   CHANUNAVAIL | CONGESTION | NOANSWER | BUSY | ANSWER | CANCEL\n" 
-"                   DONTCALL | TORTURE\n"
+"                   DONTCALL | TORTURE | INVALIDARGS\n"
 "  For the Privacy and Screening Modes, the DIALSTATUS variable will be set to\n"
 "DONTCALL if the called party chooses to send the calling party to the 'Go Away'\n"
 "script. The DIALSTATUS variable will be set to TORTURE if the called party\n"
@@ -795,7 +795,7 @@
 	const char *end_sound = NULL;
 	const char *start_sound = NULL;
 	char *dtmfcalled = NULL, *dtmfcalling = NULL;
-	char status[256];
+	char status[256] = "INVALIDARGS";
 	int play_to_caller = 0, play_to_callee = 0;
 	int sentringing = 0, moh = 0;
 	const char *outbound_group = NULL;
@@ -816,21 +816,25 @@
 
 	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "Dial requires an argument (technology/number)\n");
+		pbx_builtin_setvar_helper(chan, "DIALSTATUS", status);
 		return -1;
 	}
 
 	u = ast_module_user_add(chan);
 
 	parse = ast_strdupa(data);
-
+	
 	AST_STANDARD_APP_ARGS(args, parse);
 
 	if (!ast_strlen_zero(args.options) &&
-			ast_app_parse_options(dial_exec_options, &opts, opt_args, args.options))
+			ast_app_parse_options(dial_exec_options, &opts, opt_args, args.options)) {
+		pbx_builtin_setvar_helper(chan, "DIALSTATUS", status);
 		goto done;
+	}
 
 	if (ast_strlen_zero(args.peers)) {
 		ast_log(LOG_WARNING, "Dial requires an argument (technology/number)\n");
+		pbx_builtin_setvar_helper(chan, "DIALSTATUS", status);
 		goto done;
 	}
 
@@ -846,6 +850,7 @@
 		calldurationlimit = atoi(opt_args[OPT_ARG_DURATION_STOP]);
 		if (!calldurationlimit) {
 			ast_log(LOG_WARNING, "Dial does not accept S(%s), hanging up.\n", opt_args[OPT_ARG_DURATION_STOP]);
+			pbx_builtin_setvar_helper(chan, "DIALSTATUS", status);
 			goto done;
 		}
 		if (option_verbose > 2)

Modified: team/oej/earlyrtpfix/apps/app_playback.c
URL: http://svn.digium.com/view/asterisk/team/oej/earlyrtpfix/apps/app_playback.c?view=diff&rev=53283&r1=53282&r2=53283
==============================================================================
--- team/oej/earlyrtpfix/apps/app_playback.c (original)
+++ team/oej/earlyrtpfix/apps/app_playback.c Tue Feb  6 09:18:56 2007
@@ -68,7 +68,7 @@
 ;
 
 
-static struct ast_config *say_cfg;
+static struct ast_config *say_cfg = NULL;
 /* save the say' api calls.
  * The first entry is NULL if we have the standard source,
  * otherwise we are sourcing from here.
@@ -468,6 +468,8 @@
 
 	res = ast_unregister_application(app);
 
+	ast_cli_unregister_multiple(cli_playback, sizeof(cli_playback) / sizeof(struct ast_cli_entry));
+
 	ast_module_user_hangup_all();
 
 	if (say_cfg)

Modified: team/oej/earlyrtpfix/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/oej/earlyrtpfix/apps/app_queue.c?view=diff&rev=53283&r1=53282&r2=53283
==============================================================================
--- team/oej/earlyrtpfix/apps/app_queue.c (original)
+++ team/oej/earlyrtpfix/apps/app_queue.c Tue Feb  6 09:18:56 2007
@@ -2637,6 +2637,10 @@
 		ast_copy_string(oldexten, qe->chan->exten, sizeof(oldexten));
 		time(&callstart);
 
+		if (member->status == AST_DEVICE_NOT_INUSE)
+			ast_log(LOG_WARNING, "The device state of this queue member, %s, is still 'Not in Use' when it probably should not be! Please check UPGRADE.txt for correct configuration settings.\n", member->membername);
+			
+
 		bridge = ast_bridge_call(qe->chan,peer, &bridge_config);
 
 		if (strcasecmp(oldcontext, qe->chan->context) || strcasecmp(oldexten, qe->chan->exten)) {

Modified: team/oej/earlyrtpfix/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/earlyrtpfix/channels/chan_sip.c?view=diff&rev=53283&r1=53282&r2=53283
==============================================================================
--- team/oej/earlyrtpfix/channels/chan_sip.c (original)
+++ team/oej/earlyrtpfix/channels/chan_sip.c Tue Feb  6 09:18:56 2007
@@ -1404,14 +1404,12 @@
 static void sip_destroy_peer(struct sip_peer *peer);
 static void sip_destroy_user(struct sip_user *user);
 static int sip_poke_peer(struct sip_peer *peer);
+static int sip_poke_peer_s(void *data);
 static void set_peer_defaults(struct sip_peer *peer);
 static struct sip_peer *temp_peer(const char *name);
 static void register_peer_exten(struct sip_peer *peer, int onoff);
-static void sip_destroy_peer(struct sip_peer *peer);
-static void sip_destroy_user(struct sip_user *user);
 static struct sip_peer *find_peer(const char *peer, struct sockaddr_in *sin, int realtime);
 static struct sip_user *find_user(const char *name, int realtime);
-static int sip_poke_peer_s(void *data);
 static enum parse_register_result parse_register_contact(struct sip_pvt *pvt, struct sip_peer *p, struct sip_request *req);
 static int expire_register(void *data);
 static void reg_source_db(struct sip_peer *peer);
@@ -5167,6 +5165,9 @@
 		if (newnoncodeccapability & AST_RTP_DTMF) {
 			/* XXX Would it be reasonable to drop the DSP at this point? XXX */
 			ast_set_flag(&p->flags[0], SIP_DTMF_RFC2833);
+			/* Since RFC2833 is now negotiated we need to change some properties of the RTP stream */
+			ast_rtp_setdtmf(p->rtp, 1);
+			ast_rtp_setdtmfcompensate(p->rtp, ast_test_flag(&p->flags[1], SIP_PAGE2_RFC2833_COMPENSATE));
 		} else {
 			ast_set_flag(&p->flags[0], SIP_DTMF_INBAND);
 		}
@@ -15158,6 +15159,12 @@
 
 	If we return AST_DEVICE_UNKNOWN, the device state engine will try to find
 	out a state by walking the channel list.
+
+	The queue system (\ref app_queue.c) treats a member as "active"
+	if devicestate is != AST_DEVICE_UNAVAILBALE && != AST_DEVICE_INVALID
+
+	When placing a call to the queue member, queue system sets a member to busy if
+	!= AST_DEVICE_NOT_INUSE and != AST_DEVICE_UNKNOWN
 
 */
 static int sip_devicestate(void *data)
@@ -16895,14 +16902,19 @@
 	if (!strcasecmp(mode,"info")) {
 		ast_clear_flag(&p->flags[0], SIP_DTMF);
 		ast_set_flag(&p->flags[0], SIP_DTMF_INFO);
+		p->jointnoncodeccapability &= ~AST_RTP_DTMF;
 	} else if (!strcasecmp(mode,"rfc2833")) {
 		ast_clear_flag(&p->flags[0], SIP_DTMF);
 		ast_set_flag(&p->flags[0], SIP_DTMF_RFC2833);
+		p->jointnoncodeccapability |= AST_RTP_DTMF;
 	} else if (!strcasecmp(mode,"inband")) { 
 		ast_clear_flag(&p->flags[0], SIP_DTMF);
 		ast_set_flag(&p->flags[0], SIP_DTMF_INBAND);
+		p->jointnoncodeccapability &= ~AST_RTP_DTMF;
 	} else
 		ast_log(LOG_WARNING, "I don't know about this dtmf mode: %s\n",mode);
+	if (p->rtp)
+		ast_rtp_setdtmf(p->rtp, ast_test_flag(&p->flags[0], SIP_DTMF) == SIP_DTMF_RFC2833);
 	if (ast_test_flag(&p->flags[0], SIP_DTMF) == SIP_DTMF_INBAND) {
 		if (!p->vad) {
 			p->vad = ast_dsp_new();

Modified: team/oej/earlyrtpfix/channels/h323/ast_h323.cxx
URL: http://svn.digium.com/view/asterisk/team/oej/earlyrtpfix/channels/h323/ast_h323.cxx?view=diff&rev=53283&r1=53282&r2=53283
==============================================================================
--- team/oej/earlyrtpfix/channels/h323/ast_h323.cxx (original)
+++ team/oej/earlyrtpfix/channels/h323/ast_h323.cxx Tue Feb  6 09:18:56 2007
@@ -177,7 +177,7 @@
 	};
 };
 
-MyProcess::MyProcess(): PProcess("The NuFone Network's",
+MyProcess::MyProcess(): PProcess("The NuFone Networks",
 			"H.323 Channel Driver for Asterisk",
 			MAJOR_VERSION, MINOR_VERSION, BUILD_TYPE, BUILD_NUMBER)
 {

Modified: team/oej/earlyrtpfix/configs/sip.conf.sample
URL: http://svn.digium.com/view/asterisk/team/oej/earlyrtpfix/configs/sip.conf.sample?view=diff&rev=53283&r1=53282&r2=53283
==============================================================================
--- team/oej/earlyrtpfix/configs/sip.conf.sample (original)
+++ team/oej/earlyrtpfix/configs/sip.conf.sample Tue Feb  6 09:18:56 2007
@@ -307,11 +307,11 @@
 				; call directly between the endpoints instead of sending
 				; a re-INVITE).
 
-;directrtpsetup=no		; Experimental feature: In 1.4, there's an experimental
-				; feature for direct call setup between phones, where the
-				; media is setup peer2peer at call setup instead of using
-				; re-invites. This is known to have issues and is disabled
-				; by default in the 1.4 release.
+;directrtpsetup=yes		; Enable the new experimental direct RTP setup. This sets up
+				; the call directly with media peer-2-peer without re-invites.
+				; Will not work for video and cases where the callee sends 
+				; RTP payloads and fmtp headers in the 200 OK that does not match the
+				; callers INVITE.
 
 ;canreinvite=nonat		; An additional option is to allow media path redirection
 				; (reinvite) but only when the peer where the media is being

Modified: team/oej/earlyrtpfix/main/config.c
URL: http://svn.digium.com/view/asterisk/team/oej/earlyrtpfix/main/config.c?view=diff&rev=53283&r1=53282&r2=53283
==============================================================================
--- team/oej/earlyrtpfix/main/config.c (original)
+++ team/oej/earlyrtpfix/main/config.c Tue Feb  6 09:18:56 2007
@@ -923,7 +923,7 @@
 				if (process_buf) {
 					char *buf = ast_strip(process_buf);
 					if (!ast_strlen_zero(buf)) {
-						if (process_text_line(cfg, &cat, buf, lineno, filename, withcomments)) {
+						if (process_text_line(cfg, &cat, buf, lineno, fn, withcomments)) {
 							cfg = NULL;
 							break;
 						}

Modified: team/oej/earlyrtpfix/main/manager.c
URL: http://svn.digium.com/view/asterisk/team/oej/earlyrtpfix/main/manager.c?view=diff&rev=53283&r1=53282&r2=53283
==============================================================================
--- team/oej/earlyrtpfix/main/manager.c (original)
+++ team/oej/earlyrtpfix/main/manager.c Tue Feb  6 09:18:56 2007
@@ -1439,7 +1439,6 @@
 	long elapsed_seconds = 0;
 	int all = ast_strlen_zero(name); /* set if we want all channels */
 
-	astman_send_ack(s, m, "Channel status will follow");
 	if (!ast_strlen_zero(id))
 		snprintf(idText, sizeof(idText), "ActionID: %s\r\n", id);
 	if (all)
@@ -1451,6 +1450,7 @@
 			return 0;
 		}
 	}
+	astman_send_ack(s, m, "Channel status will follow");
 	/* if we look by name, we break after the first iteration */
 	while (c) {
 		if (c->_bridge)

Modified: team/oej/earlyrtpfix/main/rtp.c
URL: http://svn.digium.com/view/asterisk/team/oej/earlyrtpfix/main/rtp.c?view=diff&rev=53283&r1=53282&r2=53283
==============================================================================
--- team/oej/earlyrtpfix/main/rtp.c (original)
+++ team/oej/earlyrtpfix/main/rtp.c Tue Feb  6 09:18:56 2007
@@ -2388,7 +2388,7 @@
 		return 0;
 	  
 	if (!rtp->rtcp->them.sin_addr.s_addr) {
-		ast_log(LOG_ERROR, "RTCP RR transmission error to, rtcp halted %s\n",strerror(errno));
+		ast_log(LOG_ERROR, "RTCP RR transmission error, rtcp halted\n");
 		if (rtp->rtcp->schedid > 0)
 			ast_sched_del(rtp->sched, rtp->rtcp->schedid);
 		rtp->rtcp->schedid = -1;



More information about the asterisk-commits mailing list