More information about my configuration, if this can help : - my Opensips/rtpproxy server has 2 IP addresses, one opened on the internet, one internal used to communicate with my VoIP/PSTN gateway - I have 2 sets of rtpproxies : the 1st one is in bridge mode for VoIP to PSTN or PSTN to VoIP calls, the 2nd one only listens on the external IP and is used for SIP to SIP calls ./rtpproxy -u seb -l 172.17.1.126 172.17.1.131 -s udp:localhost 12221 -m 18000 -M 18020 ./rtpproxy -u seb -l 172.17.1.131 -s udp:localhost 12222 -m 18021 -M 18030 - here is the declaration of the 2 rtpproxy sets in opensips.cfg : # ----- rtpproxy params ----- modparam("rtpproxy", "rtpproxy_sock", "1 == udp:localhost:12221") modparam("rtpproxy", "rtpproxy_sock", "2 == udp:localhost:12222") - below is the part of my opensips.cfg file which handles the INVITE requests (I just replaced my public IP address with xx.xx.xx.xx) : if (is_method("INVITE")) { if (registered("location","$fu") && registered("location")) { # if From and To are SIP registered : we use rtpproxy 2 (external IP) setflag(22); xlog("INFO :: (INVITE) rtpproxy set 2"); } else { # otherwise, SIP to ISUP or ISUP to SIP call : we use rtpproxy 1 (bridge mode) xlog("INFO :: (INVITE) rtpproxy set 1"); } if (has_body("application/sdp")) { if (isflagset(22)) { set_rtp_proxy_set("2"); if (rtpproxy_offer("","xx.xx.xx.xx")) { t_on_reply("1"); } } else { set_rtp_proxy_set("1"); if (dst_ip == 172.17.1.131) { # my IP address opened to the internet (external IP) if (rtpproxy_offer("ei","xx.xx.xx.xx")) { t_on_reply("1"); } } if (dst_ip == 172.17.1.126) { # my internal IP address if (rtpproxy_offer("ie","xx.xx.xx.xx")) { t_on_reply("1"); } } } } else { t_on_reply("2"); } } Le 03/11/2011 17:47, Sebastien CRUAUX a écrit : Hi, |
_______________________________________________ Users mailing list Users@rtpproxy.org http://lists.rtpproxy.org/mailman/listinfo/users