Dial option "d" not working for incoming --> ex

I’ve setup TrixBox (used to be Asterisk@Home) for very simple home use but I’d like to setup the following type of system for incoming calls:

When a call comes into Asterisk (via PSTN/Sipura3000 or SIP/Broadvoice) it immediately dials the FXS extension on my Sipura3000. This means the phone system appears to work like a normal POTS system (eg. somebody calls my number and the phone rings)

If nobody answers the phone it goes into my voicemail. This works great.

However, I’d like to be able to enter special extensions (if I’m the incoming caller) while the phone is ringing. So for example, if I’m at work I can call home to check my voicemail messages, etc.

Supposedly the Dial() option “d” will let me enter a one digit extension while the phone is ringing but it doesn’t appear to work.

Here is my extensions.conf code for the incoming calls:

exten => s,1,Answer()
exten => s,2,SipAddHeader(Alert-Info: Bellcore-r5)
exten => s,3,Dial(SIP/50,23,r,d)
exten => s,4,VoiceMail(u50@default)
exten => s,5,Playback(vm-goodbye)
exten => s,6,Hangup

exten => 1,1,SayDigits(1)
exten => 2,1,SayDigits(2)
exten => 10,1,SayDigits(10)

I’ve also tried removing the Answer() at the top (so the incoming caller doesn’t get that initial “suttered ring” (because Asterisk answers the phone but immediately dials and extension and provides another ringing sound)

So can anybody help me? All I want to do is be able to call into my home Asterisk box and “secretly” enter codes to check my voicemail or the weather, etc… but I want normal callers to hear ringing and then get placed into my voicemail if nobody answers.

Thanks!!

the first thing is that there shouldn’t a comma between your options :

i would have thought you need to Answer() first, as Asterisk is going to need to “hear” the DTMF you’re sending.

as to whether it works, i can’t say, haven’t tried it. but it looks interesting, providing you secure the context you exit the dial to.

Thanks! That was the problem!

However, you are correct in that I need to have an “Answer()” first. However, that causes the caller to hear an initial stuttered ring (it rings normal, but then Asterisk answers and then dials my home phone extension).

Is there any way to correct this? I’m guessing probably not :frowning:

The only reason I’d like to fix this is that my wife’s parents might think our phone line is broken or something because whenever they call in the ring will sound strange at first…

do you have your locale indications set right ? is the Asterisk-generated ringtone different to the telco-generated one ? perhaps you could reduce the ringing time before Asterisk answers, so that the caller never actually hears the telco tone.

having said that, i never like Asterisk answering unless it’s an IVR or VM … the caller gets charged as soon as we pickup and if we are just going to ring it doesn’t sit well with me.

I’m not sure what “locale indications” (are these the settings in my Sipura 3000?), but I’m from the United States so the defaults should be fine (?).

The Asterisk ring is just a tiny bit louded than the telco/PSTN ring, but after reading your post I have ideas:

  1. Change my Sipura 3000 so it doesn’t wait at all because passing the call to Asterisk (right now it’s set to 2 seconds or something). However, I was told I need this 2-second delay to allow CallerID information to be passed in.

  2. Try putting in a slight delay (eg. Wait(1)) in my dial plan so that the timing isn’t between rings. For example, right now the telco/PSTN line rings, but is interrupted by the Asterisk ring (and thus the initial stuttered ring), but if I could wait until just after the first telco ring, it wouldn’t stutter ring anymore. The first ring would be the telco, and the second would be Asterisk. (this doesn’t solve the slight increase in volume between the Asterisk and telco rings)

the effectiveness of 1 would depend on whether you want CallerID or not. unfortunately (?) in the US you have to wait, while here in the UK we get CallerID before the first ring.

2 sounds ok, but to lower the Asterisk-generated ring, is there an option in the SPA setup to reduce the gain on the FXO port ? although this would then lower the volume of your voice and all Asterisk-sounds to the caller.

looks like you have some tinkering to do :smiley:

Well, right now I’m using a PSTN line for incoming calls, but I’m also looking to switch to VOIP for incoming. For VOIP I don’t need to wait, right? If I understand correctly, the incoming caller won’t hear ANY rings until Asterisk starts ringing an extension, etc.

At least I do have some options though. I really think I can work something out at least.

Thanks for all of your help!