Sip registered phone and ring group

Hello,

I have two mobile sip phone (csipsimple app on android phones) and an analog phone plugged in an linksys spa3000. All incoming calls are directed to a ring group with every phone and a ring all strategy.

I would like the ring group to shutdown when no mobile sip phone are registered.

Is that possible ? how should I proceed ?

Best regards,
Bidule from Guadeloupe

You could use the ChanIsAvail command before you do your dial to check the status of your mobile peers.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_ChanIsAvail

Then you can use ExecIf to only dial if your channel is available.

Thank you, I have never wrote any script and even if I think I understand what is ChanIsAvail and ExecIf I do not know how to write the script. What tuto would you recommand to learn how to write scripts for asterisk ?

Best regards,
Bidule

Ring group it is a Freepbx 's concept. Anyway you can use ${DIALSTATUS} variable to make a logical decision

ok I will have a look thank you very much (but I must learn how to script beforeā€¦)

How did you write your current dialplan if you have never written any scripts?

I used raspbx (on raspberry pi 3) which is with freepbx so I did all the configuration through the web interface

I would recommend looking for a support forum for that product then. I know FreePBX has a forum at https://community.freepbx.org I have not heard of raspx.

OK thank you very much, I will look with freepbx if it can be done through the web interface