[asterisk-commits] rmudgett: branch group/issue8824 r143558 - in /team/group/issue8824: channels...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 18 18:34:59 CDT 2008


Author: rmudgett
Date: Thu Sep 18 18:34:59 2008
New Revision: 143558

URL: http://svn.digium.com/view/asterisk?view=rev&rev=143558
Log:
channels/chan_misdn.c
*  Renamed misdn_update_redirecting() to misdn_copy_redirecting_from_ast()
and removed some redundant code.

include/asterisk/channel.h
*  Updated comments

Modified:
    team/group/issue8824/channels/chan_misdn.c
    team/group/issue8824/include/asterisk/channel.h

Modified: team/group/issue8824/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/group/issue8824/channels/chan_misdn.c?view=diff&rev=143558&r1=143557&r2=143558
==============================================================================
--- team/group/issue8824/channels/chan_misdn.c (original)
+++ team/group/issue8824/channels/chan_misdn.c Thu Sep 18 18:34:59 2008
@@ -169,7 +169,7 @@
 	enum misdn_chan_state state;
 
 	/*! 
-     * \brief TRUE if a hangup needs to be queued 
+	 * \brief TRUE if a hangup needs to be queued 
 	 * \note This is a debug flag only used to catch calls to hangup_chan() that are already hungup.
 	 */
 	int need_queue_hangup;
@@ -362,7 +362,7 @@
 	/*!
 	 * \brief Bridged other channel call record
 	 * \note Pointer set when other_pid imported from Asterisk environment 
-     * variable MISDN_PID by either side.
+	 * variable MISDN_PID by either side.
 	 */
 	struct chan_list *other_ch;
 
@@ -2836,14 +2836,14 @@
 /* ******************************************************************* */
 /*!
  * \internal
- * \brief Notify peer that the redirecting info has changed.
+ * \brief Copy the redirecting info out of the Asterisk channel
  *
+ * \param bc Associated B channel
  * \param ast Current Asterisk channel
- * \param bc Associated B channel
  *
  * \return Nothing
  */
-static void misdn_update_redirecting(struct ast_channel *ast, struct misdn_bchannel *bc)
+static void misdn_copy_redirecting_from_ast(struct misdn_bchannel *bc, struct ast_channel *ast)
 {
 	ast_copy_string(bc->redirecting.from.number, S_OR(ast->cid.cid_rdnis, ""), sizeof(bc->redirecting.from.number));
 	bc->redirecting.from.presentation = ast_pres_to_misdn_pres(ast->redirecting.from.number_presentation);
@@ -2851,7 +2851,7 @@
 	bc->redirecting.from.number_type = ast_ton_to_misdn_ton(ast->redirecting.from.number_type);
 	bc->redirecting.from.number_plan = ast_plan_to_misdn_plan(ast->redirecting.from.number_type);
 	bc->redirecting.reason = ast->redirecting.reason;
-}	/* end misdn_update_redirecting() */
+}	/* end misdn_copy_redirecting_from_ast() */
 
 
 /*****************************/
@@ -2955,12 +2955,7 @@
 		newbc->caller.presentation = newbc->presentation;
 	}
 
-	ast_copy_string(newbc->redirecting.from.number, S_OR(ast->cid.cid_rdnis, ""), sizeof(newbc->redirecting.from.number));
-	newbc->redirecting.from.presentation = ast_pres_to_misdn_pres(ast->redirecting.from.number_presentation);
-	newbc->redirecting.from.screening = ast_screen_to_misdn_screen(ast->redirecting.from.number_presentation);
-	newbc->redirecting.from.number_type = ast_ton_to_misdn_ton(ast->redirecting.from.number_type);
-	newbc->redirecting.from.number_plan = ast_plan_to_misdn_plan(ast->redirecting.from.number_type);
-	newbc->redirecting.reason = ast->redirecting.reason;
+	misdn_copy_redirecting_from_ast(newbc, ast);
 
 	/*check for bridging*/
 	misdn_cfg_get(0, MISDN_GEN_BRIDGING, &bridging, sizeof(bridging));
@@ -3244,7 +3239,7 @@
 		break;
 	case AST_CONTROL_REDIRECTING:
 		chan_misdn_log(1, p->bc->port, "* IND :\tredirecting info update pid:%d\n", p->bc->pid);
-		misdn_update_redirecting(ast, p->bc);
+		misdn_copy_redirecting_from_ast(p->bc, ast);
 		break;
 	default:
 		chan_misdn_log(1, p->bc->port, " --> * Unknown Indication:%d pid:%d\n", cond, p->bc->pid);

Modified: team/group/issue8824/include/asterisk/channel.h
URL: http://svn.digium.com/view/asterisk/team/group/issue8824/include/asterisk/channel.h?view=diff&rev=143558&r1=143557&r2=143558
==============================================================================
--- team/group/issue8824/include/asterisk/channel.h (original)
+++ team/group/issue8824/include/asterisk/channel.h Thu Sep 18 18:34:59 2008
@@ -259,7 +259,7 @@
 	 * \brief Callerid Transit Network Select
 	 * \note Currently this value is just passed around the system.
 	 * You can read it and set it but it is never used for anything.
-	 * (Field will eventually move to struct ast_channel.dialed.transit_network_type)
+	 * (Field will eventually move to struct ast_channel.dialed.transit_network_select)
 	 */
 	int cid_tns;
 };
@@ -567,8 +567,19 @@
 	pthread_t blocker;				/*!< If anyone is blocking, this is them */
 	ast_mutex_t lock_dont_use;			/*!< Lock a channel for some operations. See ast_channel_lock() */
 
-	struct ast_callerid cid;			/*!< Caller ID, name, presentation etc */
-	struct ast_party_connected_line connected;	/*!< Connected Line information */
+	/*!
+	 * \brief Channel Caller ID information.
+	 * \note The caller id information is the caller id of this
+	 * channel when it is used to initiate a call.
+	 */
+	struct ast_callerid cid;
+
+	/*!
+	 * \brief Channel Connected Line ID information.
+	 * \note The connected line information identifies the channel
+	 * connected/bridged to this channel.
+	 */
+	struct ast_party_connected_line connected;
 
 	/*!
 	 * \brief Redirecting/Diversion information




More information about the asterisk-commits mailing list