[asterisk-commits] mmichelson: branch group/pimp_my_sip r379069 - /team/group/pimp_my_sip/res/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jan 14 15:12:59 CST 2013


Author: mmichelson
Date: Mon Jan 14 15:12:56 2013
New Revision: 379069

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=379069
Log:
Add some commentary to stub functions to explain some things.

For the function to fill in an ast_party_id, the structure of the
function has been outlined, but it has not been filled in because
at the moment it is pretty low-priority.

Explanations behind the PJSIP module load/unload/start/stop functions
have been made, specifically about why we don't actually do anything
in those callbacks.


Modified:
    team/group/pimp_my_sip/res/res_sip_session.c

Modified: team/group/pimp_my_sip/res/res_sip_session.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pimp_my_sip/res/res_sip_session.c?view=diff&rev=379069&r1=379068&r2=379069
==============================================================================
--- team/group/pimp_my_sip/res/res_sip_session.c (original)
+++ team/group/pimp_my_sip/res/res_sip_session.c Mon Jan 14 15:12:56 2013
@@ -229,7 +229,18 @@
 
 int ast_sip_session_get_identity(struct pjsip_rx_data *rdata, struct ast_party_id *id)
 {
-	/* XXX STUB */
+	/* XXX STUB
+	 * This is low-priority as far as getting SIP working is concerned, so this
+	 * will be addressed later.
+	 *
+	 * The idea here will be that the rdata will be examined for headers such as
+	 * P-Asserted-Identity, Remote-Party-ID, and From in order to determine Identity
+	 * information.
+	 *
+	 * For reference, Asterisk SCF code does something very similar to this, except in
+	 * C++ and using its version of the ast_party_id struct, so using it as a basis
+	 * would be a smart idea here.
+	 */
 	return 0;
 }
 
@@ -245,27 +256,47 @@
 	return 0;
 }
 
+/*!
+ * \brief Called when the PJSIP core loads us
+ *
+ * Since we already have Asterisk's fine module load/unload framework
+ * in use, we don't need to do anything special here.
+ */
 static pj_status_t session_load(pjsip_endpoint *endpt)
 {
-	/* XXX STUB */
 	return PJ_SUCCESS;
 }
 
+/*!
+ * \brief Called when the PJSIP core starts us
+ *
+ * Since we already have Asterisk's fine module load/unload framework
+ * in use, we don't need to do anything special here.
+ */
 static pj_status_t session_start(void)
 {
-	/* XXX STUB */
 	return PJ_SUCCESS;
 }
 
+/*!
+ * \brief Called when the PJSIP core stops us
+ *
+ * Since we already have Asterisk's fine module load/unload framework
+ * in use, we don't need to do anything special here.
+ */
 static pj_status_t session_stop(void)
 {
-	/* XXX STUB */
 	return PJ_SUCCESS;
 }
 
+/*!
+ * \brief Called when the PJSIP core unloads us
+ *
+ * Since we already have Asterisk's fine module load/unload framework
+ * in use, we don't need to do anything special here.
+ */
 static pj_status_t session_unload(void)
 {
-	/* XXX STUB */
 	return PJ_SUCCESS;
 }
 




More information about the asterisk-commits mailing list