We have a problem with the dadhi lines staying off hook. What happens, I think, is that the cell phone extensions may go out of range during a call, and so the call does not get hung up. All that I know to do is to reboot the server. That works when I am here, but if I am not here the line stays off hook - customers cannot call in on that line, and the line is basically unusable.
Is there a way Asterisk could detect this situation and hang up the external dadhi line, or at least a command I could run to hang up the line.
Asterisk can’t directly detect the state of a dahdi device, but the dahdi channel driver itself can, there are many posts here and elsewhere for setting dahdi’s “far end disconnect” capability and responsiveness depending on how your dahdi FXO lines are provisioned by your provider.
hangup request (tab) - tab means what? I’m sorry I don’t know more. Is it the channel? Then how do I know what channel is off hook? Is there a query that will tell me?
I will see if I can find more on “far end disconnect”.
If you can’t figure out your DAHDI hangup conditions as per your provider, then:-
rasterisk -x ‘core show channels verbose’
will expose the DAHDI channels and the lack of a “paired” channel or perhaps an unacceptably large “Duration” (field 9) could be used to script a “request hangup” of your “Channel” (field 1) from a cron job.
Thanks. This works:
rasterisk -x 'core show channels verbose’
shows the channel and inside the CLI:
channel request hangup DAHDI/2-1
hangs up the line.
Now, when I am here I can do this, but I want this to be either automatic, or else a script that can be run by anyone without granting admin privileges to the user. Any help in scripting this? Even setting it up as a “misc application” in the Freepbx GUI.
You really need to get the trunk configured correctly, however, as I wrote
. . . If you can’t figure out your DAHDI hangup conditions as per your provider, then:-
rasterisk -x ‘core show channels verbose’
will expose the DAHDI channels and the lack of a “paired” channel or perhaps an unacceptably large “Duration” (field 9) could be used to script a “request hangup” of your “Channel” (field 1) from a cron job.
. . .
channel request hangup <tab> . . . (which will clue you how to call the hangup request)
so from a shell , identify the channels open (core show channels ), then selectively, and individually , request the ‘hangup’ on the identified channels.
yep - thanks - but I was hoping to do all this automatically and ONLY for the page group - what I think I’ll have to do in the absence of a wildcard is use grep and a bash script.
Thanks though!