Issue #7421 - Hold status not working fully. Thanks jmls for a good job debugging!

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36679 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Olle Johansson 2006-07-02 19:53:54 +00:00
parent 4c8e3bcdca
commit 8affb4c1f8
1 changed files with 12 additions and 7 deletions

View File

@ -5152,7 +5152,7 @@ static int copy_via_headers(struct sip_pvt *p, struct sip_request *req, const st
/*! \brief Add route header into request per learned route */
static void add_route(struct sip_request *req, struct sip_route *route)
{
char r[256], *p;
char r[BUFSIZ], *p;
int n, rem = sizeof(r);
if (!route)
@ -12953,7 +12953,8 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
break;
case AST_STATE_UP:
if (option_debug > 1)
ast_log(LOG_DEBUG, "%s: New call is UP.... \n", c->name);
ast_log(LOG_DEBUG, "%s: This call is UP.... \n", c->name);
if (p->t38.state == T38_PEER_REINVITE) {
struct ast_channel *bridgepeer = NULL;
struct sip_pvt *bridgepvt = NULL;
@ -13000,6 +13001,8 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
ast_log(LOG_DEBUG,"T38 state changed to %d on channel %s\n", p->t38.state, p->owner ? p->owner->name : "<none>");
}
} else if (p->t38.state == T38_DISABLED) { /* Channel doesn't have T38 offered or enabled */
int sendok = TRUE;
/* If we are bridged to a channel that has T38 enabled than this is a case of RTP re-invite after T38 session */
/* so handle it here (re-invite other party to RTP) */
struct ast_channel *bridgepeer = NULL;
@ -13007,6 +13010,7 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
if ((bridgepeer = ast_bridged_channel(p->owner))) {
if (!strcasecmp(bridgepeer->tech->type, sip_tech.type)) {
bridgepvt = (struct sip_pvt*)bridgepeer->tech_pvt;
/* Does the bridged peer have T38 ? */
if (bridgepvt->t38.state == T38_ENABLED) {
ast_log(LOG_WARNING, "RTP re-invite after T38 session not handled yet !\n");
/* Insted of this we should somehow re-invite the other side of the bridge to RTP */
@ -13015,13 +13019,14 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
else
transmit_response_reliable(p, "488 Not Acceptable Here (unsupported)", req);
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
} else {
/* No bridged peer with T38 enabled*/
transmit_response_with_sdp(p, "200 OK", req, XMIT_CRITICAL);
}
sendok = FALSE;
}
/* No bridged peer with T38 enabled*/
}
} else /* No bridged peer */
}
if (sendok)
transmit_response_with_sdp(p, "200 OK", req, XMIT_CRITICAL);
}
break;
default: