Can someone please help make head and tails of this error:
[2013-06-23 10:34:37] WARNING[7185][C-0000003a] pbx.c: Channel 'Dongle/dongle0-0100000008' sent to invalid extension but no invalid handler: context,exten,priority=from-trunk-dongle,+XXXXXXXXXXXX,1
I’ve checked the incoming route and all extensions/misc destinations but I can’t seem to find the one that’s creating the error.
What is from-trunk-dongle? Something you made up? Does that context exist?
I have a voip-gsm gateway running on freepbx with Huawei dongles as gsm trunk. The context from-trunk-dongle contains the dialplan that forwards sms received by any of the dongles to my mobile.
[from-trunk-dongle]
exten => sms,1,Verbose(Incoming SMS from ${CALLERID(num)} ${BASE64_DECODE(${SMS_BASE64})})
exten => sms,n,System(echo ‘${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)} – ${DONGLENAME} – ${CALLERID(num)}: ${BASE64_DECODE(${SMS_BASE64})}’ >> /var/log/asterisk/sms.txt)
exten => sms,n,Hangup()
Got this from here Calling on GSM/3G Networks | Asterisk for Raspberry Pi
It was working well for more than a week then suddenly yesterday I got that error. I have not been tinkering with the server for a few days. Dunno what went wrong.
Thanks.
oopps I missed the a line of the context… the whole thing should read:
[from-trunk-dongle]
exten => sms,1,Verbose(Incoming SMS from ${CALLERID(num)} ${BASE64_DECODE(${SMS_BASE64})})
exten => sms,n,DongleSendSMS(dongle0,+XXXXXXXXXXXX,From: ${CALLERID(num)} Msg: ${BASE64_DECODE(${SMS_BASE64})})
exten => sms,n,System(echo ‘${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)} – ${DONGLENAME} – ${CALLERID(num)}: ${BASE64_DECODE(${SMS_BASE64})}’ >> /var/log/asterisk/sms.txt)
exten => sms,n,Hangup()
Got it…
Been wondering what’s the purpose of these two lines…
exten => _.,1,Set(CALLERID(name)=${CALLERID(num)})
exten => _.,n,Goto(from-trunk,${EXTEN},1)
Logs are reporting a warning:
[2013-06-23 17:36:28] WARNING[3646] pbx_config.c: The use of '_.' for an extension is strongly discouraged and can have unexpected behavior. Please use '_X.' instead at line 10 of /etc/asterisk/extensions_custom.conf
[2013-06-23 17:36:28] VERBOSE[3646] pbx.c: -- Added extension '_.' priority 1 to from-trunk-dongle
[2013-06-23 17:36:28] WARNING[3646] pbx_config.c: The use of '_.' for an extension is strongly discouraged and can have unexpected behavior. Please use '_X.' instead at line 11 of /etc/asterisk/extensions_custom.conf
so I changed it accordingly… that was the source of the error.
Thanks.