On 12/21/2011 02:18 PM, Juha Heinanen wrote: >> You might be aware that both mobile platforms support a push >> notification feature to remotely start certain services/apps. > > how can the push notification reach the mobile device? does it keep > tcp connection open all the time to some kind of notification server?
The Android C2DM uses a heartbeat mechanism to keep the connection alive (some ping/ack, initiated by either side), with the logic to reconnect if necessary. Also for Apple, it's a constantly opened connection. >> pua_reginfo module. Sems could play some early announcement (some ring >> tone or whatever), send out the push notification to the framework, then >> wait for the publish from kamailio to know when the client came >> online. > > doesn't the push notification protocol include any feedback from the > device to the pusher that it has accomplished the task? if it does, > then there would be no need to get publish from kamailio. That's up to the application developer how to acknowledge such a notification. For example I've seen an iphone sip client implementation where the notification would cause a pop-up on the device with the calling party number, and you could accept or reject that. When you accept, the application is started and the device returns success. It doesn't indicate though whether the registration within the application succeeds, so once the push notification is acknowledged, it may take some time for the registration to complete (if ever). In order to be independent of the underlying implementation that is out of sems' influence, it'd be a good idea to wait for kamailio to acknowledge the registration before trying to complete the call. Beside that, it's probably not a good approach to try to implement both the android and apple protocol directly into the sems app, rather than being able to configure an URL which sems will connect to, with support to pick various sip header elements and put it into the URL, like "http://example.org/push/$H(P-Push-ID)". That way, you could implement an http proxy which is doing whatever you like, e.g. contacting the google/apple server or doing something fancy with it, while sems is waiting for the registration to complete while streaming some early announcement file. Andreas
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Sems mailing list [email protected] http://lists.iptel.org/mailman/listinfo/sems
