Hi @miguel,
Thanks so much for testing it.
I see the issue. I made a couple of changes, please test the below:
I changed 4 things.
- I deleted extension 100, since it was impossible to reach this dialplan.
- I changed the device it calls to PJSIP/103
- Increased the ring time to 35 seconds, so it can ring full 30 seconds on the cellphone.
- Changed the dialplan in
followme-confirmation
to properly set theGOSUB_RESULT
[cos-all-custom]
exten => 100,1,Noop(Testing follow me)
exten => 100,n,Dial(Local/deskphone-100@my-phones&Local/cellphone-100@my-phones,35)
exten => 100,n,Hangup
[my-phones]
exten => deskphone-100,1,Noop(Dialing device 103)
exten => deskphone-100,n,Dial(PJSIP/103)
exten => cellphone-100,1,Noop(Calling cellphone of extension 6406 and 5 seconds before dialing)
exten => cellphone-100,n,Wait(5)
exten => cellphone-100,n,Dial(local/845XXXXXXX@cos-all,,HhTtU(followme-confirmation))
[followme-confirmation]
exten => s,1,Noop(Entered follow me confirmation sub)
exten => s,n,Set(_GOSUB_RESULT=CONTINUE)
exten => s,n(start),Set(attempts=$[0${attempts}+1])
exten => s,n,Read(accept,followme/no-recording&followme/options,1,,,5)
exten => s,n,GotoIf($[$["${accept}" != ""] | $["${attempts}" = "3"]]?end:start)
exten => s,n(end),Set(_GOSUB_RESULT=${IF($["${accept}" = "1"]?:CONTINUE)})
exten => s,n,Return()
Let me know if you have any questions
Thank you