On 12/6/23 02:08, Axel Rau wrote:
I have a simple config with some phones ringing simultaneously.
Some of them are softphones (zoiper apps on iPhone w/o push notification).
If such an app did bot register in time, it has no chance to pick up the call.
If I could configure a retry loop checking for registered candidates,
say once a second until one phone takes the call, this would allow me
to pick up the call with zoiper app registered late.

How could this be done in ansible?

Did you mean asterisk ?

If so, then you might look into the While()/EndWhile() applications, combined with timeouts to Dial() application, starting with something very basic such as the following:

same = n,Set(tries=0)
same = n,While($[${INC(tries)}<99])
same = n,Set(PUSH(team,&)=${PJSIP_DIAL_CONTACTS(1234)})
same = n,Set(PUSH(team,&)=${PJSIP_DIAL_CONTACTS(5678)})
same = n,Dial(${team},10)
same = n,Wait(1)
same = n,EndWhile()

...at most that would be 11 seconds in between registration of x5678 and the next time it gets called when x1234 is not answering.

Other approaches might involve Queue()'s with some ChannelRedirect()'s or even Bridge()'s, maybe AGI/ARI, etc.

BTW the Asterisk Forums are a great place to post these kinds of questions in the future: https://community.asterisk.org

Regards,

--
🤠 C. Maj, TechnoCaptain
🐧 Penguin PBX Solutions
📞 Denver 720-32-42-72-9
💡 Beyond 1-833-PNGN-PBX
🌐 http://PeNGuiNPBX.com


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
     https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to