Here's how I did it: in the main route block of kamailio.cfg: if (is_method("SUBSCRIBE")) { subst('/^Contact:(.*)sip:(.*)@[a-zA-Z0-9.:]+(.*)$/Contact:\1sip:$au@$Ri: $Rp\3/ig'); $du = "sip:" + "<FREESWITCH IP>" + ":" + "<FREESWITCH PORT>"; if (!t_relay()) { sl_reply_error(); } exit; } That wil rewrite the contact on SUBSCRIBEs to the public IP and port of the kamailio instance that received the message. You can then handle the NOTIFYs from FreeSWITCH with lookup("<REGISTRATION TABLE>") and route them to the registered endpoint. On Jul 13, 2012, at 1:24 AM, hiryu23 wrote:
Thanks Spencer.
May i know how do you write the contact header before passing it to FreeSwitch?
-- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Subscribe-for-MWI-tp7557448p75... Sent from the freeswitch-users mailing list archive at Nabble.com.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org