App_rpt.c: Cannot start dialtone

Hello, I am trying to get auto patch and reverse autopatch working on ASL 2.0 and I am encountering quite some frustration. I have followed the doc in the wiki “Setup Autoopatch” and I have tried with both SIP (using another doc found here) and the IAX2 method however looking at the log entries for ASL every time I enter the autopatch keyup command I am given the following lines:

[Oct 18 18:02:30] NOTICE[28212] chan_simpleusb.c: Got DTMF char *
[Oct 18 18:02:31] NOTICE[28212] chan_simpleusb.c: Got DTMF char 6
[Oct 18 18:02:31] WARNING[28243] app_rpt.c: Cannot start dialtone

I have ensured ASL is registering with my outside Asterisk based PBX as well.

Does anyone know what I am doing wrong here or provide a working guide on getting this to work?

Your not alone here. I hope someone helps to provide an answer. I am encountering the same thing. I can receive calls from the SIP no problem, but when I try to dial out I get this:
[Oct 19 22:03:10] NOTICE[19181]: chan_voter.c:1537 voter_mix_and_send: Voter 525242 Got DTMF char *
[Oct 19 22:03:11] NOTICE[19181]: chan_voter.c:1537 voter_mix_and_send: Voter 525242 Got DTMF char 6
[Oct 19 22:03:11] WARNING[19430]: app_rpt.c:11125 rpt_call: Cannot start dialtone

So I found that if I add “quiet=1” to the autopatch section, it dials out and doesn’t complain about not starting dialtone. It would be nice to find the right way to fix this, as I’d like the voice messages for autopatch. But maybe if you add quiet=1 to yours it will start working.

; Autopatch Commands
; Note, This may be a good place for other 2 digit frequently used commands

6 = autopatchup,noct = 1,farenddisconnect = 1,dialtime = 20000*,quiet = 1* ; Autopatch up
0 = autopatchdn ; Autopatch down

; autopatchup can optionally take comma delimited setting=value pairs:

; context = string ; Override default context with “string”
; dialtime = ms ; Specify the max number of milliseconds between phone number digits (1000 milliseconds = 1 second)
; farenddisconnect = 1 ; Automatically disconnect when called party hangs up
; noct = 1 ; Don’t send repeater courtesy tone during autopatch calls
; quiet = 1 ; Don’t send dial tone, or connect messages. Do not send patch down message when called party hangs up
; Example: 123=autopatchup,dialtime=20000,noct=1,farenddisconnect=1

So now I can receive calls just like before, and asterisk is finally executing the dialplan for outgoing calls from the radio, but now I am getting another error.(I redacted the phone number and put *'s.

[Oct 20 09:47:24] NOTICE[8951]: chan_voter.c:1537 voter_mix_and_send: Voter 525242 Got DTMF char *
[Oct 20 09:47:25] NOTICE[8951]: chan_voter.c:1537 voter_mix_and_send: Voter 525242 Got DTMF char 6
[Oct 20 09:47:25] NOTICE[8951]: chan_voter.c:1537 voter_mix_and_send: Voter 525242 Got DTMF char 1
[Oct 20 09:47:25] NOTICE[8951]: chan_voter.c:1537 voter_mix_and_send: Voter 525242 Got DTMF char 5
[Oct 20 09:47:26] NOTICE[8951]: chan_voter.c:1537 voter_mix_and_send: Voter 525242 Got DTMF char 6
[Oct 20 09:47:26] NOTICE[8951]: chan_voter.c:1537 voter_mix_and_send: Voter 525242 Got DTMF char 2
[Oct 20 09:47:26] NOTICE[8951]: chan_voter.c:1537 voter_mix_and_send: Voter 525242 Got DTMF char *
[Oct 20 09:47:27] NOTICE[8951]: chan_voter.c:1537 voter_mix_and_send: Voter 525242 Got DTMF char *
[Oct 20 09:47:27] NOTICE[8951]: chan_voter.c:1537 voter_mix_and_send: Voter 525242 Got DTMF char *
[Oct 20 09:47:27] NOTICE[8951]: chan_voter.c:1537 voter_mix_and_send: Voter 525242 Got DTMF char *
[Oct 20 09:47:28] NOTICE[8951]: chan_voter.c:1537 voter_mix_and_send: Voter 525242 Got DTMF char *
[Oct 20 09:47:28] NOTICE[8951]: chan_voter.c:1537 voter_mix_and_send: Voter 525242 Got DTMF char *
[Oct 20 09:47:29] NOTICE[8951]: chan_voter.c:1537 voter_mix_and_send: Voter 525242 Got DTMF char *
– Executing [1562*******@radio:1] Goto(“DAHDI/pseudo-763818903”, “check_route|1562*******|1”) in new stack
– Goto (check_route,1562*******,1)
– Executing [1562*******@check_route:1] NoOp(“DAHDI/pseudo-763818903”, “1562*******”) in new stack
– Executing [1562*******@check_route:2] Goto(“DAHDI/pseudo-763818903”, “voipms|562*******|1”) in new stack
– Goto (voipms,562*******,1)
– Executing [562*******@voipms:1] Ringing(“DAHDI/pseudo-763818903”, “”) in new stack
– Executing [562*******@voipms:2] Hangup(“DAHDI/pseudo-763818903”, “”) in new stack
== Spawn extension (voipms, 562*******, 2) exited non-zero on ‘DAHDI/pseudo-763818903’
– Hungup ‘DAHDI/pseudo-763818903’
– Hungup ‘DAHDI/pseudo-2107410432’
– Hungup ‘DAHDI/pseudo-1338447767’

Here’s my outbound dialplan for this:

; okay, route it
exten = _1NXXXXXXXXX,2,Goto(voipms|${EXTEN:1}|1)
exten = _X.,2,Goto(invalidnum|s|1)

[voipms]
include => voipms-inbound
include => voipms-outbound

; THIS IS FOR OUTGOING AUTOPATCH CALLS
[voipms-outbound]
exten => _1NXXNXXXXXX,1,Dial(SIP/${EXTEN}@voipms)
exten => _1NXXNXXXXXX,n,Hangup()
exten => _NXXNXXXXXX,1,Dial(SIP/1${EXTEN}@voipms)
exten => _NXXNXXXXXX,n,Hangup()
exten => _011.,1,Dial(SIP/${EXTEN}@voipms)
exten => _011.,n,Hangup()
exten => _00.,1,Dial(SIP/${EXTEN}@voipms)
exten => _00.,n,Hangup()

Any insight is appreciated.

Well I switched over from SIP to IAX2 and had to add caller id in the dial plan before it calls out.
Reference: iax-bug
Now in bound and outbound calls work just fine…
Now if any insight to the problem with the generated dial tone. I have to keep auto patch quiet turned on to do anything with it. If I take quiet=1 out of it in rpt.conf, it breaks and asterisk complained it cannot start dial tone.

Hello! Is there any solution to this bug? Having the same issue with fresh RPi install. It seems that autopatch uses dahdi to generate dialtone and for some reason it’s unable to do this properly.

Just noticed the post. I doubt it is any bug. Dialtone is generated internal by asterisk.

I think the two of you are suffering from a ‘context’ problem.

If you would post your iax/sip .conf (mask any passwords)
and the full context of your dialing plan (within extensions.conf) - whichever context you are dialing/rx calls

and I will sift through it as I have time this week.

I also need to know if you are using the beta version of the software.

@k6ian Just a FYI, when you dial out with the default autopatch command, you are in the ‘radio’ context unless you specify otherwise.
So your dialing plan for outbound must be made inside that ‘radio’ context of your extensions.conf.

That is something I was not able to determine from the limited text you show, so I’m saying it now.

Inbound calls need to be directed to the same context as you want to handle the incoming, and that context can be redirected with the dial plan if needed.

But if you want the radio to answer, it needs to be in the radio context directed to a specific node or nodes in the dial string. Or duplicate the extensions/nodes in the context of the inbound.

Things like that are better used when you send it to a common area and use a sort of ivr where the user can select to call the radio node or some sip extension. But you have to get it right before you can expand on it.

I’m here to help but I need to see the files to see where you are going stray.

rpt.conf
[555]
context = autopatch-out
[functions]
61 = autopatchup,noct = 1,farenddisconnect = 1,dialtime = 20000

iax.conf

[123]
username=123
type=friend
secret=xxx
insecure=invite
host=sip.xyz.com
fromuser=123
fromdomain=sip.xyz.com
dtmfmode=rfc2833
disallow=all
canreinvite=no
allow=ulaw

[321]
username=123
type=peer
transport=udp
secret=xxx
insecure=invite
host=sip.xyz.com
fromuser=123
fromdomain=sip.xyz.com
dtmfmode=rfc2833
disallow=all
canreinvite=no
allow=ulaw

extensions.conf
[autopatch-in] (just haven’t tried to make it work)
exten => 321,1,Dial(SIP/555)

[autopatch-out].
exten => _XXX.,1,Dial(SIP/123/${EXTEN})
exten => _XXX.,2,Congestion

I see several things and plenty more questions from what I do not see.

What is this doing in rpt.conf - what is it ?

Your autopatch function does not describe a separate context, therefore it is in the ‘radio’ context and outbound dialing from the radio will be directed to that context in extensions.conf

Try this to redirect it to a new context if you must…

61=autopatchup,noct=1,context=YOURDESIREDCONTEXT=1,farenddisconnect=1,dialtime=20000

Then actions should be in either the radio context (default) or the one you describe in the command function.

[radio] or [yourdesiredcontext]
exten => _5xxx,1,Dial(sip/${EXTEN:1},32) ;dial ext/funtions on this box
exten => _5xxx,2,VoiceMail(5000) ; voicemail if failed
exten => _5xxx,3,Hangup

Now your actual dialing string will not be the same, but this should get you half of the way there.
My example dials a sip phone on the same server. Dialing out of a sip trunk would be similar but describing the context as well if not the same.
Looking something like this, but not exactly.
exten=_NXXNXXNXXX,1,Dial,SIP/didsipoutboundcontext/${EXTEN}

Of course that string would have to have a valid matching and working context in sip.conf
[didsipoutboundcontext]
where the work of connecting/passing the outbound extension to the sip trunk

While it is easy to think of all connections by number, you need to adjust your thinking to include dialing by context. Asterisk will redirect on context before an extension.
It is all about program ‘flow’
Hope that helps. I will be back around this eve if you are still stuck. Hopefully, I did not misspeak in any of that.

In addition to the above,
No extensions should be described in rpt.conf (just radio nodes which are a radio extension)
If it is a SIP extension, then sip.conf
if it is a IAX connection, then iax.conf

According to wiki:
This setting directs the autopatch for the node to use a specific context in extensions.conf for outgoing autopatch calls. The default is to specify a context name of radio.

I have tried this method as well, with the same result.

In the future, there will be 2 autopatchup functions with differernt contexts specified, one of which will be available using the DTMF and will provide the ability to make calls within local HAM PBX, and the second will be available using the MDC RAC and will provide the ability to make calls to PSTN.

The configuration that I published above was simplified as much as possible for testing, since the node is remote, testing was carried out using VoIP service, for this reason the extension is configured to make calls through this service, the dial plan was simplified too, just to eliminate possible errors.

This configuration is functional, but only when quiet = 1 within autopatchup command function.

…Deleted by myself after some confusion…

Having a new look at your info,
I see that you have a private node 555 you are actually dialing from.
That confused me a bit. In my thinking it was a sip extension as most 3 digit numbers are.

But then in your sip.conf, you are naming your trunks with a extension number.
Maybe ok but it would be a preferred method to use something more contextual as a alfa string.
Makes it harder for a mistake when asterisk searches for a match.

Here is something to try in your dialing for the autopatch command
quiet = 0
so it would look like this…
61 = autopatchup,noct = 1,farenddisconnect = 1,dialtime = 20000,quiet = 0

This would tell the software that you want dialtones but I don’t see why it would be 1 by default.
Are you using hamvoip by chance ?

I have to use quiet=1, because only in this case it is possible to make calls. When quiet=0 is used, the system will give dialtone error.
I would not like to switch to a hamvoip, there are many interesting features, but for us the most important feature is simple voting and a little more flexibility inherent in ASL

Well, I’m not suggesting you switch to it, just need to know where to stop because I am not aware of the many differences with it. Don’t like going down rabbit holes unnecessarily.

So back to your files…
Having a good sleep on it (best thinking time for me LOL)

Looking at your sip conf, I see a lot of things I would never use because of security concerns.
And trust me, over the last 15 years, I have seen a lot of security breaches with asterisk. Not saying you have one, only most I see in your file shown are very bad practices. And I’m not sure a few are even supported in our version. I realize you have caught the use and format from some internet help pages that are old.

But I doubt you have any matching context in sip.conf and can not see the whole file to know.

Would you try as a test to configure your extension as follows…
Change your dialing context in 555 back to radio so this is easier to follow.
sip.conf

[123]
deny=0.0.0.0/0.0.0.0
username=123
secret=xxx ; < - put ur passw in
dtmfmode=rfc2833
canreinvite=yes
context=radio ; ; ← matching the context from 555
host=dynamic
trustrpid=yes
sendrpid=no
type=peer
nat=no
port=5060
qualify=yes
qualifyfreq=60
transport=udp
encryption=no
dial=SIP/123
permit=192.168.1.50/255.255.255.255 ;<- make your local box ip, it’s a security qualification
callerid=RadioSip<123>
allow=ulaw,alaw,gsm,h263 ; <-add your preferred codecs

rpt.conf
[555]
context = radio ;<- matching context in sip ext
[functions]
61 = autopatchup,noct = 1,farenddisconnect = 1,dialtime = 20000

comment out your existing for safe keeping and insert the above.

Since the extension does not have a context= then any setting in sip.conf general setting would apply ‘if there is one’. So I am forcing the issue inside of the sip definition since I can’t see your whole file to know what is up.

Don’t forget to change your autopatch command to normal -quite=0/remove quite=1

While asterisk if finding the extension, it did not get there by context is my thinking and not carrying the full parameter list because of it. Asterisk will search the context first and the extension 2nd.

At least getting the dialer and sip context to match.

Give it a try and let me know.

Oh… almost forgot…
[radio]. ; <-proper matching context
exten => _XXX.,1,Dial(SIP/123/${EXTEN})
exten => _XXX.,2,Congestion

Having error with this config.
WARNING[2873]: app_dial.c:1242 dial_exec_full: Unable to create channel of type ‘SIP’ (cause 20 - Unknown)

Without quiet=0 the call does not even start.
Obviously, the problem occurs before the SIP configuration is processed.

one mistake I made…
This should be the ip of the extension for qualification…
permit=192.168.1.50/255.255.255.255 ;<- make your local box ip, it’s a security qualification

or this to match any on your local network…
permit=192.168.1.0/255.255.255.0 ;<- make your local box ip, it’s a security qualification

Sorry, I wrote this late last night but failed to send it before I shut down.