From 94219eb5bf809ea68a8f76d39e65f9773e05b5b2 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Fri, 8 Feb 2013 17:18:26 +0000 Subject: [PATCH] add a SIP_REPLY exception for from/totag swapping --- modules/rtpproxy-ng/rtpproxy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/rtpproxy-ng/rtpproxy.c b/modules/rtpproxy-ng/rtpproxy.c index 0f5118708..a7615c897 100644 --- a/modules/rtpproxy-ng/rtpproxy.c +++ b/modules/rtpproxy-ng/rtpproxy.c @@ -1250,7 +1250,9 @@ static bencode_item_t *rtpp_function_call(bencode_buffer_t *bencbuf, struct sip_ ) ); bencode_list_add_string(item, ip_addr2a(&msg->rcv.src_ip)); - if (msg->first_line.type == SIP_REQUEST && op != OP_ANSWER) { + if ((msg->first_line.type == SIP_REQUEST && op != OP_ANSWER) + || (msg->first_line.type == SIP_REPLY && op == OP_ANSWER)) + { bencode_dictionary_add_str(dict, "from-tag", &from_tag); if (to && to_tag.s && to_tag.len) bencode_dictionary_add_str(dict, "to-tag", &to_tag);