We've got a customer who is using the multi-extension script to ring all of his extensions when a call comes in. They asked us to block all calls from a certain caller ID. We tried blocking it at each extension, but it doesn't seem to work (not sure why yet, but I suspect multi-extension is breaking it). Is there a way to block calls at the inbound route level so that I don't have to set it at each extension?
Oh, come on, Erik! You're
Oh, come on, Erik! You're supposed to say, "Yes, if you write it yourself. All you have to do is......" The "...."s are replace by exactly what I need to do in the script! ;->
I will think about this a little more. Maybe the other solutions is to understand why we aren't able to block calls with the multi-extension script. Is anyone doing that?
I dont see why the
I dont see why the multi-exten script does not observe call blocking, trace the dialplan and compare the lines to see if something is returning 0 when it should be a 1 :)
The only time i have _ever_ used call blocking was on installations at schools so that parents cant call into the classrooms. We block everyone then put the administration office phones into the allow list so they can get calls from secretary or principal etc.
The multi-exten script uses
The multi-exten script uses tl-userexten-rg-base, and it doesn't call tl-userexten-base which seems to be where the call block/screen logic lives. I wonder if it would be easy to add the call block code to tl-userexten-rg-base. I guess the first obstacle would be where does it get the block info. tl-userexten-base gets it from BLOCK_NUM=${DB(${THISEXT}/BLOCKN${i})}. But, will that work when there are multiple extensoins?
This is the first time we've had a request for it.
well yes, the only
well yes, the only difference between calling 1 extension and calling 5 is in the Dial() command. Instead of Dial(SIP/101) it's Dial(SIP/101&SIP/102&SIP/103). So it would be possible to create a multi-device script that called userexten-base instead of userexten-rg-base. You simply would have to pass all the extensions onto the dial command. The other handlers like blocking forwarding etc occur before this dial so if they activate the handsets simply don't ring (an expected behavior)
You could setup a extension
You could setup a extension as a multi device extension, and point the inbound reoute to that extension, and play around with that extension to set call blocikng
No need to write any code
[macro-tl-multidevice-exten]
[macro-tl-multidevice-exten]
exten => s,1,Set(__DIALED_NUMBER=${MACRO_EXTEN})
exten => s,n,Set(RING_DEVICES=${IF($["${ARG3}" != ""]?${ARG1}&${ARG3}:${ARG1})})
exten => s,n,GotoIf($["${RINGGROUP_TIMEOUT}" != "" & "${BLINDTRANSFER}" = ""]?doingringgroup)
exten => s,n,Macro(tl-userexten-base,${RING_DEVICES},${ARG2},${ARG4})
exten => s,n,MacroExit
exten => s,n(doingringgroup),Macro(tl-userexten-rg-base,${RING_DEVICES},${RINGGROUP_TIMEOUT})
confirmed, if you're somehow arriving at userexten-rg-base it is because you have a RINGGROUP_TIMEOUT channel variable set.
Moshe, that seems to solve
Moshe, that seems to solve my problem. Thanks! I don't think I've ever created a multi-device extension like that.
Erik, it looks like RINGGROUP_TIMEOUT is getting set in the scripts somewhere. I'm not setting it via an ARG. Would it make sense to consider adding the call block code to tl-userexten-rg-base?
If I have blocking on ext
If I have blocking on ext 101, I can have a route that goes directly to ext 101 and the blocking works as expected.
If I have the same blocking on ext 101, I set the inbound route as Multi-device-extension, have 101 as the “Phone to ring” and 102 & 103 as the “Additional phones to ring”, it does not use the call blocking programming, ext 101 rings.
What is different?
-Matt
multi-device-exten is only
multi-device-exten is only for extensions, not routes...
go to ext 101... change its script to multi-device-exten
select a 2nd phone device to be exten 101 also
go to inbound route... change that script to 'go to user extension' and select 101
only if you write one :)