Hi all,
I have setup the below to create a BLF on a phone to enable/disable call forwarding from the SIP provider to a mobile (the only way to have correct caller id on the mobile):
[from-internal-custom]
exten => 888,1,goto(turnonoff,s,1)
exten => 888,hint,Custom:888
[turnonoff]
exten => s,1,GotoIf($["${DEVICE_STATE(Custom:888)}"="NOT_INUSE"]?turn_on:turn_off)
same => n(turn_on),Set(DEVICE_STATE(Custom:888)=RINGING)
same => n,dial(SIP/Modulus/*21*xxxxxxxxx#)
same => n,hangup()
same => n(turn_off),Set(DEVICE_STATE(Custom:888)=NOT_INUSE)
same => n,dial(SIP/Modulus/#21#)
same => n,Hangup()
It works as expected.
I now have a different line which I also want to forward from the provider using the same button.
Is it possible for the above dialplan to hangup the first call, after say 5 seconds (I don’t need to hear the complete message that forwarding has been enabled) and place a second call to the other provider?
Thank you in advance.