<html><head><meta http-equiv="Content-Security-Policy" content="script-src 'self'; img-src * cid: data:;"></head><body contenteditable="false"><div id="response_container_BBPPID" style="outline: none; font-family: Calibri, "Slate Pro", sans-serif, sans-serif;" dir="auto"> <div name="BB10" id="BB10_response_div_BBPPID" dir="auto" style="font-size: initial; width: 100%;"><span style="font-size: x-small; font-family: helvetica, arial;">Hello</span></div><div id="blackberry_signature_BBPPID" name="BB10" dir="auto"><div id="_signaturePlaceholder_BBPPID" name="BB10" dir="auto"><div id="bloop_customfont" style="font-family: helvetica, arial; margin: 0px;"><font size="1"><br></font></div><div id="bloop_customfont" style="font-family: helvetica, arial; margin: 0px;"><font size="1">I’d like to solicit some insight/ideas on the best way to reliably defer the origination of a single call leg when using the bridge command. Our requirement is to ring a sip phone and a mobile app running on iOS. The iOS device can be in one of three states; actively running and registered, backgrounded, or simply not running. We are using Apple’s Call Kit feature to deliver a push notification to the device, which prompts the application to wake up and register to Freeswitch (if it’s not already running and registered).</font></div><div id="bloop_customfont" style="font-family: helvetica, arial; margin: 0px;"><font size="1"><br></font></div><div id="bloop_customfont" style="font-family: helvetica, arial; margin: 0px;"><font size="1">A few things:</font></div><div id="bloop_customfont" style="font-family: helvetica, arial; margin: 0px;"><font size="1">1. We want the user experience to be such that when the mobile application or desk phone is answered, the others stops ringing immediately.</font></div><div id="bloop_customfont" style="font-family: helvetica, arial; margin: 0px;"><font size="1">2. We would prefer to use a single bridge command, so we can ensure things like “execute_on_answer” are only executed by the winning extensions and only once.</font></div><div id="bloop_customfont" style="font-family: Helvetica, Arial; margin: 0px;"><font size="1">3. We would prefer to use a single bridge command, so we can control the overall timeout of the ring time (despite any possible differences in call setup latency between legs).</font></div><div id="bloop_customfont" style="font-family: helvetica, arial; margin: 0px;"><font size="1">4. The mobile app does not share the same SIP credentials with the SIP phone, so it appears as a separate extension to Freeswitch.</font></div><div id="bloop_customfont" style="font-family: helvetica, arial; margin: 0px;"><font size="1"><br></font></div><div id="bloop_customfont" style="font-family: helvetica, arial; margin: 0px;"><font size="1">Here’s the idea (using Perl + Event Socket):</font></div><div id="bloop_customfont" style="font-family: helvetica, arial; margin: 0px;"><font size="1">send_a_callkit_push_notification();</font></div><div id="bloop_customfont" style="font-family: Helvetica, Arial; margin: 0px;"><div id="bloop_customfont" style="margin: 0px;"><font size="1">execute('bridge', "{originate_timeout=60}user/deskphone\@domain,[leg_timeout=10]user/mobileapp\@domain,[leg_delay_start=10]user/mobileapp\@domain");</font></div></div><div id="bloop_customfont" style="font-family: helvetica, arial; margin: 0px;"><font size="1"><br></font></div><div id="bloop_customfont" style="font-family: helvetica, arial; margin: 0px;"><div id="bloop_customfont" style="margin: 0px;"><font size="1">Given that we want both deskphone and mobileapp to ring, and then try mobileapp again after 10 seconds (along side deskphone, if it's still ringing), we are using a single bridge command. We are trying to defer the third call attempt, but have not found a reliable way to defer it. “leg_delay_start” is close, but when the other two channels are offline, it does not work the way we need.. Other than leg_delay_start, we’ve unsuccessfully tried using various combinations of “originate_delay_start", "originate_retries”, “originate_retry_sleep_ms”, and . We’ve even rolled the dice with the undocumented ”api_on_pre_originate” to see if we can get it to run “sleep 10” :)</font></div></div><div id="bloop_customfont" style="font-family: helvetica, arial; margin: 0px;"><font size="1"><br></font></div><div id="bloop_customfont" style="font-family: helvetica, arial; margin: 0px;"><font size="1">At the end of the day, all we’re just looking for is a way to ensure one of the calls legs always waits at least 10 seconds before dialing out, without interfering with other call legs that may be ringing alongside it.. Has anyone encountered this situation? any recommendations?</font></div><div id="bloop_customfont" style="font-family: helvetica, arial; margin: 0px;"><font size="1"><br></font></div><div id="bloop_customfont" style="font-family: helvetica, arial; margin: 0px;"><font size="1">Thanks!</font></div><div id="bloop_customfont" style="font-size: 13px; font-family: helvetica, arial; margin: 0px;"><br></div><br><br></div> </div></div></body></html>