[svn-commits] mmichelson: branch group/CCSS r232081 - /team/group/CCSS/channels/chan_sip.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Tue Dec 1 18:30:02 CST 2009
Author: mmichelson
Date: Tue Dec 1 18:29:58 2009
New Revision: 232081
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=232081
Log:
Add skeleton code for adding Call-Info to responses to indicate the
availability of CC. I will take care of this tomorrow, I suppose.
Modified:
team/group/CCSS/channels/chan_sip.c
Modified: team/group/CCSS/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/channels/chan_sip.c?view=diff&rev=232081&r1=232080&r2=232081
==============================================================================
--- team/group/CCSS/channels/chan_sip.c (original)
+++ team/group/CCSS/channels/chan_sip.c Tue Dec 1 18:29:58 2009
@@ -11761,6 +11761,21 @@
dst->data->used = src->data->used;
}
+static void add_cc_call_info_to_response(struct sip_pvt *p, struct sip_request *resp)
+{
+ /* We need to add a Call-Info header to this response. What is in it, you ask?
+ * First, we generate a URI that the caller should send a SUBSCRIBE to. Then, we provide
+ * two parameters, purpose=call-completion and one of m=BS, m=NR, or m=NL.
+ *
+ * We only need to generate the URI once per call. We can determine if we've already
+ * done so using the agent_pvt's subscribe_uri string as an indicator. If it's zero-length
+ * then we haven't yet created the URI. If not, then we have created it, and we can
+ * just re-use it.
+ *
+ * The m= part is not taken care of yet, but it's also not really all that important.
+ */
+}
+
/*! \brief Used for 200 OK and 183 early media
\return Will return XMIT_ERROR for network errors.
*/
@@ -11775,6 +11790,9 @@
respprep(&resp, p, msg, req);
if (rpid == TRUE) {
add_rpid(&resp, p);
+ }
+ if (ast_test_flag(&p->flags[0], SIP_OFFER_CC)) {
+ add_cc_call_info_to_response(p, &resp);
}
if (p->rtp) {
if (!p->autoframing && !ast_test_flag(&p->flags[0], SIP_OUTGOING)) {
More information about the svn-commits
mailing list