Read(,,,noanswer) on BT Dahdi line

The answer to this may be “you can’t” in which case at least I can stop wasting time trying, but perhaps there is a magic setting I have yet to discover.

The basic goal is to be able to call in and trigger a transfer to an IVR with a button press while the phone is ringing. The esoteric peculiarities of this setup mean that I don’t want to answer the line prematurely to have an IVR of no relevance to most callers (essentially, this is an admin menu) at the start of the call and nor can I have an IVR or tone detection in dialplan just before voicemail because incoming calls go to a ring group with an external answerphone on it. That leaves me, insofar as I can see, with trying to pick up a DTMF tone during the ringing process.

The line in question is a standard domestic UK BT landline going into a TDM400P card.

Read() has a noanswer option which does the trick nicely with the following dialplan when called from a local analogue extension connected to an FXO port of the same TDM400P which has the BT line going into its FXS.

exten => 1706,1,Ringing()
same => n,NoOp(READING DIGITS ------------------------)
same => n,Read(NUMBER,1,n,1,5)
same => n,wait(10)
same => n,NoOp(GOT THE DIGIT ------------------------ ${NUMBER})

This gives me the following output:

-- Executing [1706@from-internal:1] Ringing("DAHDI/3-1", "") in new stack
-- Executing [1706@from-internal:2] NoOp("DAHDI/3-1", "READING DIGITS ------------------------") in new stack
-- Executing [1706@from-internal:3] Read("DAHDI/3-1", "NUMBER,,1,n,1,5") in new stack
-- Accepting a maximum of 1 digits.
-- User entered '5'
-- Executing [1706@from-internal:4] Wait("DAHDI/3-1", "10") in new stack
-- Executing [1706@from-internal:5] NoOp("DAHDI/3-1", "GOT THE DIGIT ------------------------ 5") in new stack

However, when I point incoming calls to that dialplan and call in on the BT line, it fails like so:

-- Executing [s@testcondnew:2] NoOp("DAHDI/4-1", "READING DIGITS ------------------------") in new stack
-- Executing [s@testcondnew:3] Read("DAHDI/4-1", "NUMBER,,1,n,1,5") in new stack
-- Accepting a maximum of 1 digits.

[2016-07-29 20:19:10] WARNING[12291][C-000001e5]: channel.c:3697 ast_waitfordigit_full: Unexpected control subclass ‘2’
[2016-07-29 20:19:13] WARNING[12291][C-000001e5]: channel.c:3697 ast_waitfordigit_full: Unexpected control subclass ‘2’
– User entered nothing.
– Executing [s@testcondnew:4] Wait(“DAHDI/4-1”, “10”) in new stack
– Executing [s@testcondnew:5] NoOp(“DAHDI/4-1”, "GOT THE DIGIT ------------------------ ") in new stack

From this I conclude that the problem lies not with the dialplan, nor the fact it’s an analogue line, nor the hardware at my end, but rather must be something to do with the calls coming in over BT infrastructure. So my questions are whether anyone knows whether I’m correct and whether there is anything which can be done to “fix” this and enable the behaviour I’m after.

Thanks,

Adrian

No PSTN operator is going to allow early media to or from end users. It makes no commercial sense.

1 Like

Ah, I get you. I think I was stuck in tunnel vision mode on this and should have stepped back to think. D’oh! Thanks for setting me straight.