diff options
author | automerge <automerge@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-04-21 14:23:55 +0000 |
---|---|---|
committer | automerge <automerge@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-04-21 14:23:55 +0000 |
commit | 8911e9f7c38901c3495b409f62b8f99b29837c9e (patch) | |
tree | 3760e55660ea8f9484cce43c8868ffd189fc3629 /channels | |
parent | 834fc211a9273c0bd1f2694b63243161f53cedcc (diff) |
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@61752 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 6f366add9..9ef5e9fab 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -10298,13 +10298,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) { @@ -10348,7 +10350,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)) { @@ -11175,6 +11178,10 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req, ast_copy_string(p->context, p->subscribecontext, sizeof(p->context)); else if (ast_strlen_zero(p->context)) strcpy(p->context, default_context); + + /* Get full contact header - this needs to be used as a request URI in NOTIFY's */ + parse_ok_contact(p, req); + /* Get destination right away */ build_contact(p); if (gotdest) { |