diff --git a/modules/rtpproxy/rtpproxy.c b/modules/rtpproxy/rtpproxy.c
index 157d362..3ddee86 100644
--- a/modules/rtpproxy/rtpproxy.c
+++ b/modules/rtpproxy/rtpproxy.c
@@ -3914,7 +3914,11 @@ force_rtp_proxy_body(struct sip_msg* msg, struct force_rtpp_args *args, pv_spec_
 				 * 3) no ip in rtpproxy response (started using unix socket and no -l param)
 				 *    must revert to default of proxy ip
 				 */
-				newip.s = args->arg2 ? args->arg2 : argv[1] ? argv[1] : ip_addr2a(&msg->rcv.dst_ip);
+				newip.s = args->arg2 ? args->arg2 : argv[1];
+				if (newip.s == NULL) {
+					newip.s = ip_addr2a(&msg->rcv.dst_ip);
+					pf1 = msg->rcv.dst_ip.af;
+				}
 				newip.len = strlen(newip.s);
 			}
 			/* marker to double check : newport goes: str -> int -> str ?!?! */

Enable IPv6 on OpenSIPS, apply patch for the rtpproxy to handle IPv6 properly (experimental).
Enable IPv6 on OpenSIPS, apply patch for the rtpproxy to
handle IPv6 properly (experimental).
