diff options
author | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-04-16 14:08:33 +0000 |
---|---|---|
committer | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-04-16 14:08:33 +0000 |
commit | 5ae8e3ac4214197fec6ef999a6c50123be671979 (patch) | |
tree | 3f5d79e5aa1274e0a01cd9859bdfb7f86568de1a | |
parent | b715f9c54f956c55d5def081c4a033f4b48f63d0 (diff) |
Don't stop RTP on errors on INFO messages.
Disclaimer: This patch was needed for Edvina AstHoloApp and was
meant to be included in 1.2, but never made it in time so I felt
I could add it now.
No, just joking, patching error found while testing T.140 with Omnitor earlier
this spring.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@61663 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_sip.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index f3d6edfc6..155c0d73e 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -10201,13 +10201,15 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_ if ((resp >= 300) && (resp < 700)) { if ((option_verbose > 2) && (resp != 487)) ast_verbose(VERBOSE_PREFIX_3 "Got SIP response %d \"%s\" back from %s\n", resp, rest, ast_inet_ntoa(iabuf, sizeof(iabuf), p->sa.sin_addr)); - if (p->rtp) { - /* Immediately stop RTP */ - ast_rtp_stop(p->rtp); - } - if (p->vrtp) { - /* Immediately stop VRTP */ - ast_rtp_stop(p->vrtp); + if (sipmethod == SIP_INVITE) { + if (p->rtp) { + /* Immediately stop RTP */ + ast_rtp_stop(p->rtp); + } + if (p->vrtp) { + /* Immediately stop VRTP */ + ast_rtp_stop(p->vrtp); + } } /* XXX Locking issues?? XXX */ switch(resp) { @@ -10251,7 +10253,8 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_ /* ACK on invite */ if (sipmethod == SIP_INVITE) transmit_request(p, SIP_ACK, seqno, 0, 0); - ast_set_flag(p, SIP_ALREADYGONE); + if (sipmethod != SIP_MESSAGE && sipmethod != SIP_INFO) + ast_set_flag(p, SIP_ALREADYGONE); if (!p->owner) ast_set_flag(p, SIP_NEEDDESTROY); } else if ((resp >= 100) && (resp < 200)) { |