DialPlan customization?

Hi, thanks for time and help

i am running the next code:

 [from-internal-custom]
 exten => _XXXX,1,Ringing
 exten => _XXXX,2,AGI(vrf.sh,${EXTEN})
 exten => _XXXX,3,GotoIf($["${result}" = "yes"]?5) ;If result = yes go to 5 else 4
 exten => _XXXX,4,Goto(return back to dialplan)
 exten => _XXXX,5,Busy

my question is I want to verify if the user station is in use and execute X function, now if the user station is not in use I want to return to the normal dialplan and execute all its normal procedure, this is possible from the context from-internal-custom ?

This appears to be an extremely elaborate way to disable call waiting.

Each company has its requirements and standards, where work requires to know when the user has a call and take an action with the call

I want to add some condition like if the number is => 10 from incoming call allow the call if the number = <4 verifiy if the user is on call i know i can disable the call waiting but if i disable the call waiting i will disable to the internal call and external incoming call to the extension

There are also several problems with the code itself, but from a design perspective, it will work to describe what you want to do.

Yes, of course, the information that in the post is an example that is not the complete code, but the idea is to be able to signal the user who calls from station A to station B that that user is in a call now well if the user B is on a call and a call comes in from the PSTN that he can receive it.

Necessity is the mother of investions.

At another point does someone have an idea of how to execute the dialplan and if the condition is not met return to the normal dialplan?

Working:

exten => _11XX,1,NoOp(Starting verification of the extension status ${EXTEN})
exten => _11XX,n,Set(clidlen=${LEN(${CALLERID(num)})})
exten => _11XX,n,GotoIf($[${clidlen} <= 4]?vrfext:call)
exten => _11XX,n(vrfext),AGI(vrfext.sh,${EXTEN})
exten => _11XX,n(vrfext),GotoIf($["${result}" = "yes"]?busy:call)
exten => _11XX,n(call),Goto(ext-local,${EXTEN},1)
exten => _11XX,n(busy),PlayBack(vm-theperson)
exten => _11XX,n(busy),SayDigits(${EXTEN})
exten => _11XX,n(busy),PlayBack(not available)
exten => _11XX,n(busy),Set(MESSAGE(from)=sip:${EXTEN})
exten => _11XX,n(busy),Set(MESSAGE(body)=Call Me Back ${CALLERID(name)} ${CALLERID(num)})
exten => _11XX,n(busy),MessageSend(sip:${EXTEN},sip:${CALLERID(num)})
exten => _11XX,n(busy),Goto(ext-local,${EXTEN},1)

This logic verifies if the user that is being called has a line if the condition is fulfilled, it indicates to the user who is calling that the person is in a call, but even then the call is send to the user, can be some urgent or of great importance, also send a text to the destination phone indicating that the call is returning.

now in the company where I work with 400 employees know that the other user is on call and avoid letting the phone ring for an indefinite period of time and this does not bother the user who is on call.

the dial plan verifies that the call is only internal if it is external, the call passes even though the user is on the telephone.

Now the only problem is that I have to add a block for each block range of extensions configured in the pbx

this version send the call to the mailbox and verifiy if the user have mailbox

 exten => _56XX,n(vrfvm),AGI(vrfvm.sh,${EXTEN})
 exten => _56XX,n(vrfvm),GotoIf($["${result}" = "yes"]?onvm:offvm)
 exten => _56XX,n(onvm),Set(MESSAGE(from)=sip:${EXTEN})
 exten => _56XX,n(onvm),Set(MESSAGE(body)=Call Me Back ${CALLERID(name)} ${CALLERID(num)})
 exten => _56XX,n(onvm),MessageSend(sip:${CALLERID(num)},sip:${EXTEN})
 exten => _56XX,n(onvm),VoiceMail(${EXTEN})
 exten => _56XX,n(offvm),NoOp("No VoiceMail")
 exten => _56XX,n(offvm),PlayBack(not available)
 exten => _56XX,n(offvm),Set(MESSAGE(from)=sip:${EXTEN})
 exten => _56XX,n(offvm),Set(MESSAGE(body)=Call Me Back ${CALLERID(name)} ${CALLERID(num)})
 exten => _56XX,n(offvm),MessageSend(sip:${CALLERID(num)},sip:${EXTEN})

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