Skip to content

Commit 5e5dc13

Browse files
committed
change: [option] sip ack use request uri instead of dialog contact
1 parent 2cab196 commit 5e5dc13

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

libsip/src/uac/sip-uac-ack.c

+6
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ int sip_uac_ack_3456xx(struct sip_uac_transaction_t* t, const struct sip_message
2222
return -1;
2323
}
2424

25+
#if defined(SIP_KEEP_DIALOG_REQUET_URI)
26+
ack->ptr.ptr = sip_uri_clone(ack->ptr.ptr, ack->ptr.end, &ack->u.c.uri, &t->req->u.c.uri);
27+
#endif
2528
assert(ack->u.c.uri.scheme.n == 3 && 0 == strncmp("sip", ack->u.c.uri.scheme.p, 3));
2629
if (cstrcmp(&ack->u.c.method, SIP_METHOD_ACK))
2730
{
@@ -132,6 +135,9 @@ int sip_uac_ack(struct sip_uac_transaction_t* invite, const void* data, int byte
132135
return r;
133136
}
134137

138+
#if defined(SIP_KEEP_DIALOG_REQUET_URI)
139+
ack->ptr.ptr = sip_uri_clone(ack->ptr.ptr, ack->ptr.end, &ack->u.c.uri, &invite->req->u.c.uri);
140+
#endif
135141
assert(ack->u.c.uri.scheme.n >= 3 && 0 == strncmp("sip", ack->u.c.uri.scheme.p, 3));
136142

137143
sip_message_add_header(ack, "Content-Type", content_type);

0 commit comments

Comments
 (0)