Call another number if the first number doesn't answer

when somebody calls 6001, i want to try ring linphone first, then if not answered, ring the mobile number something like:

exten => 6001,1,NoOp(call for Alice)
same => n,Dial(PJSIP/6001)
same => n,GotoIf($[ "${DIALSTATUS}" != "ANSWER" ]?Dial(PJSIP/1111111@provider),1)
same => n,Hangup

but this doesn’t work because Dial is a function. how could i achieve this?

If you want to execute an app under a conditional statement use ExecIf, if you want to jump to other place in the dial plan under a conditional statement is when you use GotoIf

Thank you! This works

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.