Problem
Note |
---|
Applies to VoipNow 3.0.6 and newer! |
Voicemail is not allowed to answer by default if the call comes from an ICR and the extension is not registered or unreachable.
Solution
Let's consider the following scenario:
- A - external caller
- B - extension with ICR to C,D,E
- C,D,E - local extensions
Let's say D is unregistered and has a transfer to voicemal. In this case, when A calls B, D's voicemail is not allowed to answer. This allows C and E to ring and potentially answer the call. Without the change, ring group functionality was often broken by unregistered extensions that basically "stole" the call.
The macro below is default and it serves the functionality above:
Code Block |
---|
[macro-check-icr] exten => s,1,GotoIf($["${VMICRTARGET}" = "0"]?10:20); value 1 means the extension is registered and active, 0 means the extension is not registerd or active exten => s,10,Hangup exten => s,20,Set(VMICRTARGET=) exten => s,21,Return() |
Depending on the user's needs, this can be further customized.
By default, D's voicemail is still allowed to answer on Busy/Cancel/DND. To block that as well, the following macro can be used in extensions_custom.conf:
Code Block |
---|
[macro-check-icr] exten => s,1,GotoIf($["foo${VMICRTARGET}" != "foo"]?10:20) exten => s,10,Hangup exten => s,20,Set(VMICRTARGET=) exten => s,21,Return() |
If you wish to allow D's voicemail to answer regardless of the status, the following macro can be used:
Code Block |
---|
[macro-check-icr] exten => s,1,GotoIf($["${VMICRTARGET}" = "0"]?20:20); value 1 means the extension is registered and active, 0 means the extension is not registerd or active exten => s,10,Hangup exten => s,20,Set(VMICRTARGET=) exten => s,21,Return() |
Note |
---|
Always place dialplan customizations in extensions_custom.conf. Do NOT perform changes in extensions_main.conf. |
For changes to take effect, run the following command:
Shell |
---|
asterisk -rx "dialplan reload" |
Related articles
Content by Label | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Page properties | ||
---|---|---|
| ||
|
Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.