[asterisk-commits] mmichelson: branch mmichelson/pool_shark r381175 - in /team/mmichelson/pool_s...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Feb 11 09:38:19 CST 2013
Author: mmichelson
Date: Mon Feb 11 09:38:15 2013
New Revision: 381175
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=381175
Log:
Resolved conflict and reset automerge.
Modified:
team/mmichelson/pool_shark/ (props changed)
team/mmichelson/pool_shark/channels/chan_gulp.c
team/mmichelson/pool_shark/include/asterisk/res_sip_session.h
team/mmichelson/pool_shark/res/res_sip_session.c
team/mmichelson/pool_shark/res/res_xmpp.c
Propchange: team/mmichelson/pool_shark/
------------------------------------------------------------------------------
automerge = *
Modified: team/mmichelson/pool_shark/channels/chan_gulp.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/pool_shark/channels/chan_gulp.c?view=diff&rev=381175&r1=381174&r2=381175
==============================================================================
--- team/mmichelson/pool_shark/channels/chan_gulp.c (original)
+++ team/mmichelson/pool_shark/channels/chan_gulp.c Mon Feb 11 09:38:15 2013
@@ -138,8 +138,8 @@
struct ast_channel *chan;
struct ast_format fmt;
- /* TODO: Fix channel name generation */
- if (!(chan = ast_channel_alloc(1, state, "", S_OR(cid_name, ""), "", "", "", linkedid, 0, "Gulp/%04lx", ast_random() & 0xffff))) {
+ if (!(chan = ast_channel_alloc(1, state, "", S_OR(cid_name, ""), "", "", "", linkedid, 0, "Gulp/%s-%.*s", ast_sorcery_object_get_id(session->endpoint),
+ (int)session->inv_session->dlg->call_id->id.slen, session->inv_session->dlg->call_id->id.ptr))) {
return NULL;
}
Modified: team/mmichelson/pool_shark/include/asterisk/res_sip_session.h
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/pool_shark/include/asterisk/res_sip_session.h?view=diff&rev=381175&r1=381174&r2=381175
==============================================================================
--- team/mmichelson/pool_shark/include/asterisk/res_sip_session.h (original)
+++ team/mmichelson/pool_shark/include/asterisk/res_sip_session.h Mon Feb 11 09:38:15 2013
@@ -41,8 +41,8 @@
* \brief A structure containing SIP session media information
*/
struct ast_sip_session_media {
- /* RTP instance for audio */
- struct ast_rtp_instance *audio;
+ /* RTP instance for audio */
+ struct ast_rtp_instance *audio;
};
/*!
@@ -56,18 +56,18 @@
struct ast_sip_session {
/* Dialplan extension where incoming call is destined */
char exten[AST_MAX_EXTENSION];
- /* The endpoint with which Asterisk is communicating */
- struct ast_sip_endpoint *endpoint;
- /* The PJSIP details of the session, which includes the dialog */
- struct pjsip_inv_session *inv_session;
- /* The Asterisk channel associated with the session */
- struct ast_channel *channel;
+ /* The endpoint with which Asterisk is communicating */
+ struct ast_sip_endpoint *endpoint;
+ /* The PJSIP details of the session, which includes the dialog */
+ struct pjsip_inv_session *inv_session;
+ /* The Asterisk channel associated with the session */
+ struct ast_channel *channel;
/* Registered session supplements */
AST_LIST_HEAD(, ast_sip_session_supplement) supplements;
- /* Datastores added to the session by supplements to the session */
+ /* Datastores added to the session by supplements to the session */
struct ao2_container *datastores;
- /* Media information */
- struct ast_sip_session_media media;
+ /* Media information */
+ struct ast_sip_session_media media;
/* Workspace for tasks relating to this SIP session */
struct ast_sip_work *work;
};
@@ -94,6 +94,10 @@
* this method.
*/
void (*session_end)(struct ast_sip_session *session);
+ /*!
+ * \brief Notification that the session is being destroyed
+ */
+ void (*session_destroy)(struct ast_sip_session *session);
/*!
* \brief Called on incoming SIP request
* This method can indicate a failure in processing in its return. If there
@@ -129,25 +133,25 @@
struct ast_sip_session_sdp_handler {
/*! An identifier for this handler */
const char *id;
- /*!
- * \brief Set session details based on a stream in an incoming SDP offer or answer
- * \param session The session for which the media is being negotiated
+ /*!
+ * \brief Set session details based on a stream in an incoming SDP offer or answer
+ * \param session The session for which the media is being negotiated
* \param sdp The entire SDP. Useful for getting "global" information, such as connections or attributes
- * \param stream The stream on which to operate
- * \retval 0 The stream was not handled by this handler. If there are other registered handlers for this stream type, they will be called.
- * \retval <0 There was an error encountered. No further operation will take place and the current negotiation will be abandoned.
- * \retval >0 The stream was handled by this handler. No further handler of this stream type will be called.
- */
- int (*handle_incoming_sdp_stream)(struct ast_sip_session *session, const struct pjmedia_sdp_session *sdp, struct pjmedia_sdp_media *stream);
- /*!
- * \brief Create an SDP media stream and add it to the outgoing SDP offer or answer
- * \param session The session for which media is being added
+ * \param stream The stream on which to operate
+ * \retval 0 The stream was not handled by this handler. If there are other registered handlers for this stream type, they will be called.
+ * \retval <0 There was an error encountered. No further operation will take place and the current negotiation will be abandoned.
+ * \retval >0 The stream was handled by this handler. No further handler of this stream type will be called.
+ */
+ int (*handle_incoming_sdp_stream)(struct ast_sip_session *session, const struct pjmedia_sdp_session *sdp, struct pjmedia_sdp_media *stream);
+ /*!
+ * \brief Create an SDP media stream and add it to the outgoing SDP offer or answer
+ * \param session The session for which media is being added
* \param sdp The entire SDP as currently built
- * \retval 0 This handler has no stream to add. If there are other registered handlers for this stream type, they will be called.
- * \retval <0 There was an error encountered. No further operation will take place and the current SDP negotiation will be abandoned.
- * \retval >0 The handler has a stream to be added to the SDP. No further handler of this stream type will be called.
- */
- int (*create_outgoing_sdp_stream)(struct ast_sip_session *session, struct pjmedia_sdp_session *sdp);
+ * \retval 0 This handler has no stream to add. If there are other registered handlers for this stream type, they will be called.
+ * \retval <0 There was an error encountered. No further operation will take place and the current SDP negotiation will be abandoned.
+ * \retval >0 The handler has a stream to be added to the SDP. No further handler of this stream type will be called.
+ */
+ int (*create_outgoing_sdp_stream)(struct ast_sip_session *session, struct pjmedia_sdp_session *sdp);
/*! Next item int he list. */
AST_LIST_ENTRY(ast_sip_session_sdp_handler) next;
};
Modified: team/mmichelson/pool_shark/res/res_sip_session.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/pool_shark/res/res_sip_session.c?view=diff&rev=381175&r1=381174&r2=381175
==============================================================================
--- team/mmichelson/pool_shark/res/res_sip_session.c (original)
+++ team/mmichelson/pool_shark/res/res_sip_session.c Mon Feb 11 09:38:15 2013
@@ -424,6 +424,9 @@
ast_debug(3, "Destroying SIP session\n");
while ((supplement = AST_LIST_REMOVE_HEAD(&session->supplements, next))) {
+ if (supplement->session_destroy) {
+ supplement->session_destroy(session);
+ }
ast_free(supplement);
}
ast_sip_destroy_work(session->work);
Modified: team/mmichelson/pool_shark/res/res_xmpp.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/pool_shark/res/res_xmpp.c?view=diff&rev=381175&r1=381174&r2=381175
==============================================================================
--- team/mmichelson/pool_shark/res/res_xmpp.c (original)
+++ team/mmichelson/pool_shark/res/res_xmpp.c Mon Feb 11 09:38:15 2013
@@ -1093,8 +1093,6 @@
iks_insert_attrib(delete, "node", node_name);
ast_xmpp_client_send(client, request);
- iks_delete(delete);
- iks_delete(pubsub);
iks_delete(request);
}
More information about the asterisk-commits
mailing list