[Freeswitch-dev] multicast presence, mwi and some registrations thoughts

Brian West brian at freeswitch.org
Wed Dec 9 05:52:18 PST 2009

Please post it on http://jira.freeswitch.org


On Dec 9, 2009, at 4:23 AM, Matteo wrote:

> Hi all,
> as promised, I've created a small patch to handle PRESENCE_IN
> and MWI events over multicast (using mod event multicast).
> When used along registrations sharing with multicast, you
> can send presence info over the mcast-bus :) and deliver
> the information to the phones, even if the call is not
> handled on the same switch the phone sent the subscription to.
> To make it work, the sip domain must be the all for all the machines
> and on the phones, otherwise the phones will ignore them.
> This allows distributed BLF and MWI notifications :)
> BUT doing that I noticed a issue that must be addressed imho,
> which arises when you handle NAT.
> "distributed blf" works behind nat right now, since
> the event will get sent to all switches, but delivered
> only to the phone were fs knows about the subscription.
> Which is the one where the phone registers to.
> "distributed mwi" results into sending N copies of
> same MWI notifications , where N is the number of switches.
> Behind NAT the phone will receive only the one sent
> by the switch where it's registered to.
> We can avoid sending multiple event if we're able to know
> which is the "original" server where the phone registered to.
> This is also needed to call the phone:
> think about a distributed registration cluster.
> if Alice (reg'ed on FS1) calls Bob on (reg'ed on FS2), right now
> the call is routed from FS1 to Bob, since FS1 knows where Bob is.
> This works ok without NAT.
> But with NAT FS1 cannot contact Bob, because Bob is on FS2 "really"
> and can receive calls from FS2 (nat pinhole).
> The solution is to check where Bob is (looking to registration table),
> get the "real" server and route the call from FS1 to FS2 then to Bob.
> But right now, sofia registration does not have a field holding
> the "original" server.
> If we want to leverage on distributed registration using multicast,
> I think knowing the original server is "a must".
> the patch is pretty trivial, but we must add a field onto the db.
> Doing that, we can also filter MWI notification, and send them
> only if the phone is "really" registered on the server which receives
> the MWI event over the mcast-bus .
> What do you think about it?
> Regards,
> mat
> P.S. this is my first patch to FS, so please be kind on my mistakes :)
> <sofia.c.diff>_______________________________________________
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org

More information about the FreeSWITCH-dev mailing list