PBX is set up with a single Digium TDM-400 card with slot 1 configured as FSX and slots 2-4 configured as FXO. The incoming call comes in Slot 2, an analog phone is connected to Slot 1, and another phone line is connected to Slot 3, primarily for outgoing calls.
Here is a snippet out of my call plan. The objective is when a call is received, it is directed to the analog phone that’s plugged into the Slot 1, and if that phone doesn’t answer within 20 seconds, the call is redirected to my cell phone (shown here as “555-1111”) by calling out on the phone line that’s connected to Slot 3. If THAT call doesn’t get answered within 30 seconds, the incoming call gets a message saying no one is available (eventually it’ll go to voicemail) and then hangs up.
exten => 21,1,Dial(Zap/1,20)
exten => 21,2,Dial(Zap/3/5551111,30) ; No answer on office phone, try cell
exten => 21,n,Wait,1
exten => 21,n,Playback(BNP/bnp-ericnotavail)
exten => 21,n,Hangup
What is happening is that the first Dial times out as expected and executes the second Dial, but that one never times out … it just keeps ringing.
Does the “timeout” parameter for Dial not work if it’s a POTS phone number that is being Dial’ed?
if you look at the console with enough verbosity for the second dial, you’ll notice that Asterisk thinks the Zap channel answers straight away … it doesn’t detect the remote answer.
i’m sure there are other kludges to get around this, when it’s been an issue, i’ve either upgraded to a PRI or installed hardware that can use ‘answeronpolarityswitch=yes’ (e.g. Sangoma AFT200, but requires telco to provide correct supervision)
if you look at the console with enough verbosity for the second dial,
you’ll notice that Asterisk thinks the Zap channel answers straight
away … it doesn’t detect the remote answer.
Is that because it’s dialing an outside phone number and not just accesing a phone connected to a local port?
i’m sure there are other kludges to get around this, when it’s been
an issue, i’ve either upgraded to a PRI or installed hardware that
can use ‘answeronpolarityswitch=yes’ (e.g. Sangoma AFT200,
but requires telco to provide correct supervision)
I’m pretty unclear on what “upgraded to a PRI” means, but in any case I’m stuck with the hardware I have (Digium TDM-400). Does this mean that there is not a way to get it to detect timeout when it’s dialing an outside number?
if you feel so inclined, reading through the Asterisk-users list archives will show you how frequently people complain about the functionality in Zaptel when it comes to this. unless your telco provides you with signalling to tell you the call has been answered, the ringing you get when calling is just part of the audio … how is the software going to know whether it’s answered or not. phones attached to the FXS port are obviously easier to detect.
here in the UK we get a polarity reversal when the call is answered. it doesn’t seem to work with the Digium hardware, but the option i mentioned earlier means i can detect an answer and so the timeout works.
a PRI would be an E1 or T1 or ISDN30 … there are lots of variants in name.
the ringing you get when calling is just part of the audio …
how is the software going to know whether it’s answered
or not. phones attached to the FXS port are obviously
easier to detect.
Oh, yeah, I see what you mean.
Actually it shouldn’t be that hard to detect … the software should be able to differentiate between a regular on-and-off sound-and-silence interval of a ringtone, and the random on-and-off of speech. Maybe I’ll dig into the Asterisk source and see if I can find someplace to insert that capability … unfortunately won’t be able to do that before the end of tomorrow so I guess I can live with the failure to timeout for now, especially since the only reason I really need it is for voicemail and the numbers I’ll be calling all have voicemail anyway.
an option you might want to think about is Newman Telecom applications :
voip-info.org/wiki/view/Newman+Telecom
an option you might want to think about is Newman Telecom applications
Is that Justin Newman from Oregon?
I worked with him for a time on a VoIP project in Huntsville, AL earlier this year, and we were going to get together in our off-time and make this Asterisk thing work (would have been a good opportunity since Digium is right there in Huntsville), but we ended up not having the time and I only just got around to actually working with it over the last couple of days.
OK, thanks, I’ll check it out.