[SR-Users] SIP proxy changing Contact header of presence server requests

Owen Lynch owen.lynch at paragon.co.nz
Wed Dec 12 21:36:39 CET 2012


Hi,

we have 2 separate instances of kamailio running as a SIP proxy and
presence server. The proxy uses the nathelper module to correctly change
the Contact headers of client requests. However it also does the same for
notify requests from the presence server, which results in incorrect RURI
from subsequent client subscribes. The NATDETECT route is shown below, I
plan to leave the existing nat_uac_test but also explicitly skip the
fix_nated...() calls for requests from the presence server. Does this seem
reasonable?

# Caller NAT detection route
route[NATDETECT] {
#!ifdef WITH_NAT
        force_rport();
        if (nat_uac_test("19")) {
                if (is_method("REGISTER")) {
                        fix_nated_register();
                } else {
                        fix_nated_contact();
                }
                setflag(FLT_NATS);
        }
#!endif
        return;
}

Thanks,
Owen Lynch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20121213/bdcd9bbf/attachment.htm>


More information about the sr-users mailing list