Route calls based on Sip status

Can anybody point me in the right direction how to do the following ?

I have a Softphone which I use most of the time, however when I am out in the field I use my cell phone.

I would like to have calls going to my cell phone when my sip softphone is not registered.

Anybody a suggestion how to handle that?

Thanks in advance!
Marco

Hi Just use devstate function and route accordingly

Ian

Thanks for your answer, you pushed me in the right direction, I didn’t have the guts to install the bri patches so ended up using dialstatus, that did the trick very nicely for me.

Thanks for the push :smile:

This is what I ended up with.

exten => s,n,Dial(SIP/210,22,tTr)
exten => s,n,Goto(s-${DIALSTATUS},1)

exten => s-NOANSWER,1,Goto(unreachable,s,1)
exten => s-CONGESTION,1,Goto(unreachable,s,1)
exten => s-CANCEL,1,Hangup
exten => s-BUSY,1,Goto(unreachable,s,1)
exten => s-CHANUNAVAIL,1,Goto(unreachable,s,1)