diff options
author | Mark Spencer <markster@digium.com> | 2004-12-23 01:15:46 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2004-12-23 01:15:46 +0000 |
commit | 7f05fd2620ed974305942086fa30d8d58bf56cf5 (patch) | |
tree | 214e053a857086b628c4b43df22dcbd4a1173cd9 | |
parent | 46c3db11696905f1308c55f9a4f024f60c85c857 (diff) |
Fix sip hold bug (#3113)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4532 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rwxr-xr-x | channels/chan_sip.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 99e93ef72..7a091ce8a 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -3072,6 +3072,7 @@ static int init_req(struct sip_request *req, char *resp, char *recip) } +/*--- respprep: Prepare SIP response packet ---*/ static int respprep(struct sip_request *resp, struct sip_pvt *p, char *msg, struct sip_request *req) { char newto[256] = "", *ot; @@ -3079,7 +3080,8 @@ static int respprep(struct sip_request *resp, struct sip_pvt *p, char *msg, stru memset(resp, 0, sizeof(*resp)); init_resp(resp, msg, req); copy_via_headers(p, resp, req, "Via"); - if (msg[0] == '2') copy_all_header(resp, req, "Record-Route"); + if (msg[0] == '2') + copy_all_header(resp, req, "Record-Route"); copy_header(resp, req, "From"); ot = get_header(req, "To"); if (!strstr(ot, "tag=")) { @@ -3527,7 +3529,7 @@ static void copy_request(struct sip_request *dst,struct sip_request *src) dst->line[x] += offset; } -/*--- transmit_response_with_sdp: Used for 200 OK ---*/ +/*--- transmit_response_with_sdp: Used for 200 OK and 183 early media ---*/ static int transmit_response_with_sdp(struct sip_pvt *p, char *msg, struct sip_request *req, int retrans) { struct sip_request resp; @@ -4483,9 +4485,8 @@ static int parse_ok_contact(struct sip_pvt *pvt, struct sip_request *req) /* Save full contact to call pvt for later bye or re-invite */ strncpy(pvt->fullcontact, c, sizeof(pvt->fullcontact) - 1); - snprintf(pvt->our_contact, sizeof(pvt->our_contact) - 1, "<%s>", c); - + /* Save URI for later ACKs, BYE or RE-invites */ strncpy(pvt->okcontacturi, c, sizeof(pvt->okcontacturi) - 1); /* Make sure it's a SIP URL */ |