12-10-2024 11:33 AM
I have a working CME 12.0 system with 7975 phones for my home and my home office. On each ephone I have ephone-5 assigned to button 3 as this is my main business phone number/line. When calls come into this number, all phones ring as they should. The problem is that when I am working in my office, a separate building on the same property, my elderly mother hears the phone in the living room ring and then comes to my office to tell me that I missed a call even though I hear and answer it in my office. I would set up Night-Service to fix this but I am already using that service for another task.
What I would like to do is be able to dial a number such as *22 to disable the ephone and *23 to re-enable it or to un-assign button 3 on the living room ephone from the main line and then back on.
I have tried something that I found on the web but I cannot seem to get it to work. Here is the config part that is relevant to this issue."
!
ephone-dn 5 octo-line
ring feature primary
number 13864003060 no-reg both
label 3060 - Durham Insurance Agency
description 3060 - Durham Insurance Agency
name Durham Ins Agcy
mobility
snr calling-number local
snr 3525381577 delay 0 timeout 45 cfwd-noan 5000
snr ring-stop
call-forward busy 5000
call-forward noan 5000 timeout 25
corlist incoming Keyring-National
!
!
ephone-dn 22 dual-line
number 1122 no-reg both
label Living Room
description Living Room
name Living Room
call-forward busy 5000
call-forward noan 5000 timeout 25
corlist incoming Keyring-National
!
!
ephone 22
device-security-mode none
description living room 7975 phone
mac-address 5C50.1545.AA1D
ephone-template 1
type 7975
mwi-line 3
button 1:22 2:1 3f5 4:111
button 5:117 6:121 7:107 8:119
!
!
dial-peer voice 401 pots
preference 1
service flash:toggle_ringing.tcl
destination-pattern *2[23]
incoming called-number *2[23]
!
# TCL Script: toggle_ringing.tcl
proc act_SetRingStatus {callInfo ringStatus} {
global callid
set callid [infotag get callinfo callid]
# Extract the DN number to toggle
set dn_to_toggle "22" ;# Replace with the ephone-dn number for ephone 22
if {$ringStatus eq "disable"} {
# Disable ringing
set cmd "ephone-dn $dn_to_toggle\n no ring"
} else {
# Enable ringing
set cmd "ephone-dn $dn_to_toggle\n ring"
}
# Apply the configuration dynamically
cli_open
cli_exec $cmd
cli_close
# Send an announcement back to the caller
leg setupack leg_incoming
leg proceeding leg_incoming
set response "Ringing is now $ringStatus for ephone-dn $dn_to_toggle."
puts $response
}
proc act_InvokeRingingToggle {callInfo} {
global callid
set callid [infotag get callinfo callid]
# Get dialed digits
set dialed [infotag get evt_leg setupid]
if {$dialed eq "*22"} {
# Disable ringing
act_SetRingStatus $callInfo "disable"
} elseif {$dialed eq "*23"} {
# Enable ringing
act_SetRingStatus $callInfo "enable"
} else {
# Invalid code, hang up
leg setupack leg_incoming
leg proceeding leg_incoming
leg disconnect leg_incoming
}
}
# Main execution
set evt [infotag get evt_leg evtype]
if {$evt eq "setup"} {
act_InvokeRingingToggle $callInfo
}
As soon as I dial *2 I get a fast busy. Any debugging suggestions or change suggestion would be appreciated
I also tried this but still fast busy with *2
!
dial-peer voice 400 voip
preference 1
service flash:toggle_ringing.tcl
destination-pattern *2[23]
incoming called-number *2[23]
!
The .tcl file is in the root directory
Thank You,
Michael
12-10-2024 12:34 PM
As far as I know, there isn't a way to enable/disable a DN in CME on a per-line basis.
But I think Extension Mobility might be the way to go to solve your issue. Set up the host phone with the ephone-dn 5 line and set up the EM Profile without. This means you would log into EM when leaving the area where your Mother is, and since the line is not on the EM profile that phone would not ring.
Maren
12-11-2024 06:42 AM
I will look into the EM option. However, I really like the .tcl option that ChatGBT presented to me because I can enable to disable that phone form any phone on the system except the Living Room (ephone 22) when it is disabled. That way, if I forget to re-enable ephone 22 when I leave my office, I can go to the phone in my bedroom and easily enable ephone 22 without having to go back outside and to my office to do such. I am not sure if EM would also give me this flexibility.
Can anyone see why the .tcl option would not be working? What debugging options should I set to see what is going on?
Thank You!
12-11-2024 07:22 AM
I don't have a router to attempt a troubleshooting of your script. It might be helpful to look for other .tcl scripts posted on the Internet and look for syntax that might not match up.
Maren
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide