[SR-Users] SIP OPTIONS

Benjamin Henrion zoobab at gmail.com
Wed Jan 15 10:14:59 CET 2014


On Wed, Jan 15, 2014 at 10:06 AM, Daniel-Constantin Mierla
<miconda at gmail.com> wrote:
> Hello,
>
> if you just want to send a 200 ok for OPTIONS, do:
>
> if(is_method("OPTIONS")) {
>   send_reply("200", "OK");
>   exit;
> }
>
> You can also add condition on IP of the trunk gateway, like:
>
> if(src_ip==_GW_IP) {
>  ...
> }

On that OPTIONS ping topic, I hit a bug recently with Kamailio 3.3
running on 2 ethernet interfaces (one public, one private).

It seems the OPTIONS ping has always an SRC_IP of the first listen
interface defined in kamailio.cfg, while the machines on both sides
expect an SRC_IP which is in their range.

I had to fix it with some iptables glue to rewrite the SRC_IP with:

iptables -t nat -A POSTROUTING -p udp --dport 5060 -s my_public_ip/32
-d private_ip_of_the_destination/32 -j SNAT --to-source
my_private_ip/32

Any idea if this could be fixed within kamailio?

Best,

--
Benjamin Henrion <bhenrion at ffii.org>
FFII Brussels - +32-484-566109 - +32-2-4148403
"In July 2005, after several failed attempts to legalise software
patents in Europe, the patent establishment changed its strategy.
Instead of explicitly seeking to sanction the patentability of
software, they are now seeking to create a central European patent
court, which would establish and enforce patentability rules in their
favor, without any possibility of correction by competing courts or
democratically elected legislators."



More information about the sr-users mailing list