diff --git a/autoload_configs/acl.conf.xml b/autoload_configs/acl.conf.xml index 8f0e317..4bfedc6 100644 --- a/autoload_configs/acl.conf.xml +++ b/autoload_configs/acl.conf.xml @@ -8,6 +8,7 @@ + diff --git a/opensips/opensips.tmp b/opensips/opensips.tmp index a115ee6..08af818 100644 --- a/opensips/opensips.tmp +++ b/opensips/opensips.tmp @@ -331,17 +331,6 @@ route exit; } - # currently we dont support subscribe in whistle so to keep the noise down - # just end the request here. For options just end the request here as well. - if (is_method("OPTIONS")) - { - xlog("L_NOTICE", "$ci|end|unsupported method"); - - sl_send_reply("503", "Rawr!!"); - - exit; - } - # if the source IP/port are in one of the server dispatch lists # then this request originated from one of our media servers, mark it # as such by setting flag 26 @@ -361,6 +350,27 @@ route xlog("L_INFO", "$ci|log|originated from external sources"); } + # we must forward SIP OPTIONS pings from FreeSWITCH to registered devices to keep NAT + # pinholes open. Someday we need to move this somewhere more reliable but this will + # do for now. + if (is_method("OPTIONS")) + { + if (isflagset(26)) + { + xlog("L_INFO", "$ci|log|forwarding OPTIONS ping to endpoint"); + + route(internal_to_external_relay); + } else { + # this request came from an external device to us. Reject it + xlog("L_NOTICE", "$ci|end|unsupported method"); + + sl_send_reply("503", "Rawr!!"); + + } + + exit; + } + # if the to header has a tag attached then it implies this request # has been processed by us before (IE: a media server has added # its tag on the to header in prior messages) diff --git a/sip_profiles/internal.xml b/sip_profiles/internal.xml index 1fdc250..fa74e1e 100644 --- a/sip_profiles/internal.xml +++ b/sip_profiles/internal.xml @@ -117,7 +117,7 @@ - + @@ -179,7 +179,7 @@ - +