[svn-commits] mmichelson: branch group/v14_colp r148253 - /team/group/v14_colp/channels/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri Oct 10 10:48:52 CDT 2008
Author: mmichelson
Date: Fri Oct 10 10:48:51 2008
New Revision: 148253
URL: http://svn.digium.com/view/asterisk?view=rev&rev=148253
Log:
Add rpid header to the 200 OK Asterisk sends to answer
a call
Modified:
team/group/v14_colp/channels/chan_sip.c
Modified: team/group/v14_colp/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/group/v14_colp/channels/chan_sip.c?view=diff&rev=148253&r1=148252&r2=148253
==============================================================================
--- team/group/v14_colp/channels/chan_sip.c (original)
+++ team/group/v14_colp/channels/chan_sip.c Fri Oct 10 10:48:51 2008
@@ -1304,7 +1304,7 @@
static int transmit_response(struct sip_pvt *p, const char *msg, const struct sip_request *req);
static int transmit_response_reliable(struct sip_pvt *p, const char *msg, const struct sip_request *req);
static int transmit_response_with_date(struct sip_pvt *p, const char *msg, const struct sip_request *req);
-static int transmit_response_with_sdp(struct sip_pvt *p, const char *msg, const struct sip_request *req, enum xmittype reliable);
+static int transmit_response_with_sdp(struct sip_pvt *p, const char *msg, const struct sip_request *req, enum xmittype reliable, int rpid);
static int transmit_response_with_unsupported(struct sip_pvt *p, const char *msg, const struct sip_request *req, const char *unsupported);
static int transmit_response_with_auth(struct sip_pvt *p, const char *msg, const struct sip_request *req, const char *rand, enum xmittype reliable, const char *header, int stale);
static int transmit_response_with_allow(struct sip_pvt *p, const char *msg, const struct sip_request *req, enum xmittype reliable);
@@ -3768,7 +3768,7 @@
res = transmit_response_with_t38_sdp(p, "200 OK", &p->initreq, XMIT_CRITICAL);
ast_set_flag(&p->flags[1], SIP_PAGE2_DIALOG_ESTABLISHED);
} else {
- res = transmit_response_with_sdp(p, "200 OK", &p->initreq, XMIT_CRITICAL);
+ res = transmit_response_with_sdp(p, "200 OK", &p->initreq, XMIT_CRITICAL, TRUE);
ast_set_flag(&p->flags[1], SIP_PAGE2_DIALOG_ESTABLISHED);
}
}
@@ -3804,7 +3804,7 @@
!ast_test_flag(&p->flags[0], SIP_PROGRESS_SENT) &&
!ast_test_flag(&p->flags[0], SIP_OUTGOING)) {
ast_rtp_new_source(p->rtp);
- transmit_response_with_sdp(p, "183 Session Progress", &p->initreq, XMIT_UNRELIABLE);
+ transmit_response_with_sdp(p, "183 Session Progress", &p->initreq, XMIT_UNRELIABLE, FALSE);
ast_set_flag(&p->flags[0], SIP_PROGRESS_SENT);
}
p->lastrtptx = time(NULL);
@@ -3821,7 +3821,7 @@
if ((ast->_state != AST_STATE_UP) &&
!ast_test_flag(&p->flags[0], SIP_PROGRESS_SENT) &&
!ast_test_flag(&p->flags[0], SIP_OUTGOING)) {
- transmit_response_with_sdp(p, "183 Session Progress", &p->initreq, XMIT_UNRELIABLE);
+ transmit_response_with_sdp(p, "183 Session Progress", &p->initreq, XMIT_UNRELIABLE, FALSE);
ast_set_flag(&p->flags[0], SIP_PROGRESS_SENT);
}
p->lastrtptx = time(NULL);
@@ -4029,7 +4029,7 @@
!ast_test_flag(&p->flags[0], SIP_PROGRESS_SENT) &&
!ast_test_flag(&p->flags[0], SIP_OUTGOING)) {
p->invitestate = INV_EARLY_MEDIA;
- transmit_response_with_sdp(p, "183 Session Progress", &p->initreq, XMIT_UNRELIABLE);
+ transmit_response_with_sdp(p, "183 Session Progress", &p->initreq, XMIT_UNRELIABLE, FALSE);
ast_set_flag(&p->flags[0], SIP_PROGRESS_SENT);
break;
}
@@ -6918,7 +6918,7 @@
/*! \brief Used for 200 OK and 183 early media
\return Will return XMIT_ERROR for network errors.
*/
-static int transmit_response_with_sdp(struct sip_pvt *p, const char *msg, const struct sip_request *req, enum xmittype reliable)
+static int transmit_response_with_sdp(struct sip_pvt *p, const char *msg, const struct sip_request *req, enum xmittype reliable, int rpid)
{
struct sip_request resp;
int seqno;
@@ -6927,6 +6927,9 @@
return -1;
}
respprep(&resp, p, msg, req);
+ if (rpid) {
+ add_rpid(&resp, p);
+ }
if (p->rtp) {
if (!p->autoframing && !ast_test_flag(&p->flags[0], SIP_OUTGOING)) {
if (option_debug)
@@ -14265,7 +14268,7 @@
/* We should answer something here. If we are here, the
call we are replacing exists, so an accepted
can't harm */
- transmit_response_with_sdp(p, "200 OK", req, XMIT_RELIABLE);
+ transmit_response_with_sdp(p, "200 OK", req, XMIT_RELIABLE, FALSE);
/* Do something more clever here */
ast_channel_unlock(c);
ast_mutex_unlock(&p->refer->refer_call->lock);
@@ -14299,7 +14302,7 @@
Targetcall is not touched by the masq */
/* Answer the incoming call and set channel to UP state */
- transmit_response_with_sdp(p, "200 OK", req, XMIT_RELIABLE);
+ transmit_response_with_sdp(p, "200 OK", req, XMIT_RELIABLE, FALSE);
ast_setstate(c, AST_STATE_UP);
@@ -15201,7 +15204,7 @@
if (sendok) {
/* If this is not a re-invite or something to ignore - it's critical */
ast_set_flag(&p->flags[1], SIP_PAGE2_DIALOG_ESTABLISHED);
- transmit_response_with_sdp(p, "200 OK", req, (reinvite ? XMIT_RELIABLE : (ast_test_flag(req, SIP_PKT_IGNORE) ? XMIT_UNRELIABLE : XMIT_CRITICAL)));
+ transmit_response_with_sdp(p, "200 OK", req, (reinvite ? XMIT_RELIABLE : (ast_test_flag(req, SIP_PKT_IGNORE) ? XMIT_UNRELIABLE : XMIT_CRITICAL)), FALSE);
}
}
p->invitestate = INV_TERMINATED;
More information about the svn-commits
mailing list