@dewdude
I don’t know what you mean by “send a dialtone”.
Maybe I’m not using the right words. All I know is that I’ve noticed that, since I added my “prompt which DID to call with” feature, somehow I have a number of calls to “real” phone numbers that either 1) do not result in me hearing the ringing tone and which often just hang up after a while, or 2) in particular case, caused the error message I mentioned in the OP.
To be fair, I haven’t actually checked whether using my old configuration fixes the issue or not. I suppose I should have tried calling one of the problematic numbers with my old configuration (that doesn’t have the DID prompt) before asking this question. I’ll try in a few days, with a verbose asterisk log like @InterLinked suggested (duh, I should have thought about that).
I will have to sit down and actually follow all your sub routines.
Let me explain what the prompt is to help you do that. I want my config to be kind of plug and play, so with my current (apparently problematic) config you just initially specify which DIDs you have when installing my configuration, and then you would not have to remember any particular “digit prefix to DID” sort of thing since on every outbound call the dialplan just looks at the smallest prefix of the DIDs that allows disabiguating between them and tells the caller what the possible prefixes are. E.g., with DIDs “123-456-7890” and “129-876-5430”, the smallest prefixes is “123” and “129”, so the Read()
prompt would be: “Please specify which number to call with: 123 or 129”.
Is it situations with a single DID causing the problem?
No, basically my config supports having a single DID (in which case yes, I want to skip the prompt) but I myself use three, do get the prompt, but still have the issues I described with some phone numbers.
@david551
He’d need early media support on the phone (which he might well have) to do his current interaction flow without answering.
I’ll have a look at what that is and whether it could help me select the DID to call with while avoiding my current problems.
On the other hand, he could make the caller ID selection be controlled by prefix digits on the dialled number, which I suspect is what most people would do.
Yeah, I thought about doing that initially, but I decided to use a voice prompt instead because that would be easier to use with several DID numbers. As I explained to dewdude above, I want my config to be kind of plug and play, so with my current (apparently problematic) config you just initially specify which DIDs you have when installing my configuration, and then you would not have to remember any particular “digit prefix to DID” sort of thing since on every outbound call the dialplan just looks at the smallest prefix of the DIDs that allows disabiguating between them and tells the caller what the possible prefixes are.
Whether or not this choice was best is debatable I suppose, but either way it doesn’t explain my issue.
@InterLinked
Asterisk can play a dial tone, but it’s not clear from your config what would be doing so - I don’t see Read, DISA, BackGround, DialTone, or any of the like applications that would generally do that. Please explain where that comes in.
Basically what I said to dewdude: I just felt from the one error audio message that that was the problem. I’ll try this out again in a few days, probably comparing a verbose log using my old config with a verbose log using my new config. By the way, my dialplay does invoke Read()
here, right after Answer()
.
I also don’t understand why you have:
; Answer() in case we skipped because of having a single DID configured.
same => n(answer2),Answer()
Basically this subroutine has two cases: 1) If the configuration has a single DID, then we skip the prompt asking which DID to call with (as you can see at line 254)) Otherwise, we Answer()
and perform the prompt. I called Answer()
here merely because I wanted both cases to make me end up in the same scenario: the channel has been Answer()
ed and we know which DID we will call with. I didn’t want to have to handle both cases separately other than skipping the prompt.