[asterisk-commits] crichter: branch 1.4 r64515 - in /branches/1.4: ./ channels/chan_misdn.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed May 16 01:44:58 MST 2007


Author: crichter
Date: Wed May 16 03:44:51 2007
New Revision: 64515

URL: http://svn.digium.com/view/asterisk?view=rev&rev=64515
Log:
Merged revisions 64513 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r64513 | crichter | 2007-05-16 10:23:42 +0200 (Mi, 16 Mai 2007) | 1 line

in the case immediate=yes, we directly jump into the dialplan, where people can use PlayTones to indicate a Dialtone, so we don't need to to that by ourself. also we should not do a dialtone_indicate for incoming calls on a TE port in overlapdialmode.
........

Modified:
    branches/1.4/   (props changed)
    branches/1.4/channels/chan_misdn.c

Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: branches/1.4/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_misdn.c?view=diff&rev=64515&r1=64514&r2=64515
==============================================================================
--- branches/1.4/channels/chan_misdn.c (original)
+++ branches/1.4/channels/chan_misdn.c Wed May 16 03:44:51 2007
@@ -2724,10 +2724,16 @@
 	if ( !frame->samples ) {
 		chan_misdn_log(4, ch->bc->port, "misdn_write: zero write\n");
 		
-		if (ch->state == MISDN_WAITING4DIGS) {
-			chan_misdn_log(4, ch->bc->port, "misdn_write: WAIT4DIGS ..\n");
+		if (!strcmp(frame->src,"ast_prod")) {
+			chan_misdn_log(1, ch->bc->port, "misdn_write: state (%s) prodded.\n", misdn_get_ch_state(ch));
+
+			if (ch->ts) {
+				chan_misdn_log(4,ch->bc->port,"Starting Playtones\n");
+				misdn_lib_tone_generator_start(ch->bc);
+			}
 			return 0;
 		}
+
 		return -1;
 	}
 
@@ -2912,9 +2918,8 @@
 	if (ts) {
 		cl->notxtone=0;
 		cl->norxtone=0;
+		/* This prods us in misdn_write */
 		ast_playtones_start(ast,0, ts->data, 0);
-		chan_misdn_log(4,cl->bc->port,"Starting Playtones\n");
-		misdn_lib_tone_generator_start(cl->bc);
 	}
 
 	return 0;
@@ -3582,11 +3587,6 @@
 		ch->state = MISDN_INCOMING_SETUP;
 	}
 
-	if ( !bc->nt && (ch->originator==ORG_MISDN) && !ch->incoming_early_audio ) 
-		chan_misdn_log(1,bc->port, " --> incoming_early_audio off\n");
-	 else  
-		dialtone_indicate(ch);
-  
 	chan_misdn_log(1, bc->port, "* Starting Ast ctx:%s dad:%s oad:%s with 's' extension\n", ast->context, ast->exten, ast->cid.cid_num);
   
 	strncpy(ast->exten,"s", 2);
@@ -4274,7 +4274,8 @@
 				if ( !dad_len && stop_tone )
 					stop_indicate(ch);
 				else
-					dialtone_indicate(ch);
+					if (bc->nt) 
+						dialtone_indicate(ch);
 				
 				
 				if (ch->overlap_dial && !dad_len) {



More information about the asterisk-commits mailing list