Retry call request if user offline

Hey, everybody. I need to send repeated call requests within a certain time if the user is offline. How to do this through dialplan?

What channel technology?

What period of time?

If analogue, you can’t tell the difference between offline and no answer.

I SIP, it is part of the protocol to make multiple attempts over 32 seconds.

SIP channel. I need to send invite package every 2 second for 1 minute

Is this a local call? If not, the question cannot be answered regardless of the channel technology. You simply cannot know the status of a distant user. SIP is not about two directly connected endpoints.

SIP will do this over a period of 32 seconds, but with an exponential backoff, rather than constant intervals. Because it will do this, you will not be able to initiate a new attempt at user level for at least 32 seconds. You may be able to tweak settings to reduce this time, in which case you would simply repeatedly call Dial until it connects. Typically you would check the HANGUPCAUSE

if it is only sip and offline you could make a context just for wating X time for a clinet to reregistre

very bad code exsample

exten => 200,1,goto(offline,30,1)

exten => _X!,1,Wait(1)
same => n,GotoIf($[${EXTENSION_STATE(pjsip/200)} = "UNAVAILABLE"]?$[${EXTEN}-1],1)
same => n,Dial(PJSIP/200)
same => n,Return(OK)
exten => 0,1,Return(UNAVAILABLE)

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