Hi

I am planing to use freeswitch with SIP clients on iPhone and I would like to use APNS to notify clients of incoming calls (so that clients can launch)
When I receive an incoming call, I should look up in a DB the extension/phone device id, send a notification to it, waits until client logs on or a timeout is reached, then proceed to bridge the call to the extension.

I could put this logic in a python script in the diaplan, that would block the execution of the dialplan.
<action application="python" data="send_notification_and_wait.py"/>
<action application="bridge" data="user/${user_data(${destination_number}@${domain_name} attr id)}@${domain_name}" />

I am wondering if this implementation would be acceptable regarding freeswitch design, or if diaplan/freeswitch offer cleaner ways to implement it.

Regards.

John