Executive summary: How can I check if a phone line is currently ringing?
Hello,
Appologies for the nine year gap since my last post, but honestly Asterisk has been fullfilling my limited requirements just fine. Now, to my problem.
I have a Wildecard X100P FXO card which is connected to my phone line together with a DECT phone. I would like Asterisk to act as an anserphone so I have writtin the following in extensions.ael.
context incoming {
s => {
Wait(15);
Answer();
VoiceMail(1000,su);
Hangup;
};
};
This basically works fine and even reliably detects when the calling party has hung up. So far so good. The problem occurs if we are in and during the 15 second wait someone picks up the DECT phone. We can now talk to the caller, but 15 seconds after the phone started ringing our conversation is interrupted by âHelllo we are not in at the moment, please leave a messageâ
Clearly, what is happening here is that Asterisk doesnât notice that the phone has stopped ringing and just presses on with doing the VoiceMail thing. I have tried to add a âIs the line still ringing testâ just before the VoiceMail command using ChanIsAvail and DEVICE_STATE but I canât seem to get either to tell me anything useful.
Does anyone have any ideas how this might be addressed?
One solution which I could explore is to get Asterisk to immediately answer the phone and then ring the DECT phones via SIP (they are these dual protocol Seimens Gigaset things). I think that this would work as Asterisk would reliably know that someone has picked it up. The problem is that the caller would be charged a connection fee immediately. So, if I phoned home from my mobile and hung up after 10 seconds concluding that everyone was out I would still be charged because Asterisk had âansweredâ the call.
Thanks,