Please help me to install Dongle- Huawei E153 (voice enabled)

any one here to help me. I want to install USB dongle GSM gateway. I tried lot of google search and fed-up.

Dongle- Huawei E153 (voice enabled)
Asterisk version 13.22.0
FreePBX version 14.0.13.4

Have you looked here? This should get you started

https://wiki.e1550.mobi/doku.php

1 Like

i am a newbie. I just installed freepbx and configured sip trunk and configured some sip phones through GUI. Not very much knowledge in CLI. can you explain me step by step installation. I downloaded and installed stable

SNG7-PBX-64bit-1904. Is it possible to install chan_Dongle to this version of free pbx? please seek your advice.

thank bro. I followed Chan_dongle

Now I can make outbound calls through GSM dongle. But cannot receive call. Below is the log while I receive calls. Probably what would be the issue. Please advise.

Connected to Asterisk 13.22.0 currently running on freepbx (pid = 13570)
[2019-08-24 11:45:05] WARNING[19597][C-00000011]: pbx.c:4418 __ast_pbx_run: Channel ‘Dongle/dongle0-010000000b’ sent to invalid extension but no invalid handler: context,exten,priority=default,+1234567890,1
– Executing [h@default:1] Macro(“Dongle/dongle0-010000000b”, “hangupcall,”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“Dongle/dongle0-010000000b”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [s@macro-hangupcall:3] ExecIf(“Dongle/dongle0-010000000b”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [s@macro-hangupcall:4] NoOp(“Dongle/dongle0-010000000b”, " montior file= ") in new stack
– Executing [s@macro-hangupcall:5] GotoIf(“Dongle/dongle0-010000000b”, “1?skipagi”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [s@macro-hangupcall:7] Hangup(“Dongle/dongle0-010000000b”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 7) exited non-zero on ‘Dongle/dongle0-010000000b’ in macro ‘hangupcall’
== Spawn extension (default, h, 1) exited non-zero on ‘Dongle/dongle0-010000000b’

This right here is the problem:

Channel ‘Dongle/dongle0-010000000b’ sent to invalid extension but no invalid handler:

You need to check your inbound route.

now I changed dongle.conf “context=from-trunk”. The log as shown below. When I dial to my phone number I am receiving the number you are dialing is invalid message.

freepbx*CLI>
– Executing [+1234567890@from-trunk:1] Set(“Dongle/dongle0-0100000010”, “__FROM_DID=+1234567890”) in new stack
– Executing [+1234567890@from-trunk:2] NoOp(“Dongle/dongle0-0100000010”, “Received an unknown call with DID set to +1234567890”) in new stack
– Executing [+1234567890@from-trunk:3] Goto(“Dongle/dongle0-0100000010”, “s,a2”) in new stack
– Goto (from-trunk,s,2)
– Executing [s@from-trunk:2] Answer(“Dongle/dongle0-0100000010”, “”) in new stack
[2019-08-24 12:15:23] WARNING[22801][C-00000016]: chan_sip.c:22996 func_header_read: This function can only be used on SIP channels.
– Executing [s@from-trunk:3] Log(“Dongle/dongle0-0100000010”, "WARNING,Friendly Scanner from ") in new stack
[2019-08-24 12:15:23] WARNING[22801][C-00000016]: Ext. s:3 @ from-trunk: Friendly Scanner from
– Executing [s@from-trunk:4] Wait(“Dongle/dongle0-0100000010”, “2”) in new stack
– Executing [s@from-trunk:5] Playback(“Dongle/dongle0-0100000010”, “ss-noservice”) in new stack
– <Dongle/dongle0-0100000010> Playing ‘ss-noservice.slin16’ (language ‘en’)
– Executing [h@from-trunk:1] Macro(“Dongle/dongle0-0100000010”, “hangupcall,”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“Dongle/dongle0-0100000010”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [s@macro-hangupcall:3] ExecIf(“Dongle/dongle0-0100000010”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [s@macro-hangupcall:4] NoOp(“Dongle/dongle0-0100000010”, " montior file= ") in new stack
– Executing [s@macro-hangupcall:5] GotoIf(“Dongle/dongle0-0100000010”, “1?skipagi”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [s@macro-hangupcall:7] Hangup(“Dongle/dongle0-0100000010”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 7) exited non-zero on ‘Dongle/dongle0-0100000010’ in macro ‘hangupcall’
== Spawn extension (from-trunk, h, 1) exited non-zero on ‘Dongle/dongle0-0100000010’

Check your inbound route. It’s either wrong or you didn’t create one.

In order for calls to get in, you must have a valid inbound route.

Modify that route and delete DID and CID so it becomes a ANY/ANY route. Start there.

WOW. Thank you very much. Works like a champ!!. Thanks a lot…

Now I am able to receive calls. But how could I manage SMS. Now my voip phone is ringing while I receive the sms on the dongle. Is there any way to view the SMS or send the sms automatically to my email box.

I don’t think your extension should ring when an SMS is received, unless some step of the dongle configuration took care of doing that on purpose.
In any case, you should read those instructions again carefully, just to be on the safe side.

I followed the below steps. Now the sms is saving in /var/log/asterisk/smsmail. But it doesn’t send to email.

add to /etc/asterisk/extensions_custom.conf
[from-pstn-custom]
include => dongle-incoming-sms
include => dongle-incoming-ussd

[dongle-incoming-sms]
exten => sms,1,Noop(Incoming SMS from ${CALLERID(num)} ${BASE64_DECODE(${SMS_BASE64})})
exten => sms,2,System(echo “Subject: SMS received from ${CALLERID(num)}” > /var/log/asterisk/smsmail)
exten => sms,3,System(echo " " >> /var/log/asterisk/smsmail)
exten => sms,4,System(echo “${BASE64_DECODE(${SMS_BASE64})}” >> /var/log/asterisk/smsmail)
exten => sms,5,System(/usr/sbin/ssmtp [email protected] < /var/log/asterisk/smsmail)
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()

[dongle-incoming-ussd]
exten => ussd,1,Noop(Incoming USSD: ${BASE64_DECODE(${USSD_BASE64})})
exten => ussd,n,System(echo ‘${STRFTIME(${EPOCH},%Y-%m-%d %H:%M:%S)} - ${DONGLENAME}: ${BASE64_DECODE(${USSD_BASE64})}’ >> /var/log/asterisk/ussd.txt)
exten => ussd,n,Hangup()

That is probably because ssmtp is not properly configured to send outgoing mail.
Try manually sending a mail using that command and move forward from there, so you get any error messages that might be generated.

The is the log while I receive SMS

[dongle0] Got SMS from +966583513765: ‘how are you’
– Executing [sms@from-trunk:1] NoOp(“Local/sms@from-trunk-00000007;1”, “Incoming SMS from +96658351XXXX how are you”) in new stack
– Executing [sms@from-trunk:2] System(“Local/sms@from-trunk-00000007;1”, “echo “Subject: SMS received from +9665835XXXX” > /var/log/asterisk/smsmail”) in new stack
– Executing [sms@from-trunk:3] System(“Local/sms@from-trunk-00000007;1”, “echo " " >> /var/log/asterisk/smsmail”) in new stack
– Executing [sms@from-trunk:4] System(“Local/sms@from-trunk-00000007;1”, “echo “how are you” >> /var/log/asterisk/smsmail”) in new stack
– Executing [sms@from-trunk:5] System(“Local/sms@from-trunk-00000007;1”, “/usr/sbin/ssmtp [email protected] < /var/log/asterisk/smsmail”) in new stack
[2019-08-24 19:27:37] WARNING[23608][C-0000000d]: app_system.c:148 system_exec_helper: Unable to execute '/usr/sbin/ssmtp [email protected] < /var/log/asterisk/smsmail’
== Spawn extension (from-trunk, sms, 5) exited non-zero on ‘Local/sms@from-trunk-00000007;1’
– Executing [h@from-trunk:1] Macro(“Local/sms@from-trunk-00000007;1”, “hangupcall,”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“Local/sms@from-trunk-00000007;1”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [s@macro-hangupcall:3] ExecIf(“Local/sms@from-trunk-00000007;1”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [s@macro-hangupcall:4] NoOp(“Local/sms@from-trunk-00000007;1”, " montior file= ") in new stack
– Executing [s@macro-hangupcall:5] GotoIf(“Local/sms@from-trunk-00000007;1”, “1?skipagi”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [s@macro-hangupcall:7] Hangup(“Local/sms@from-trunk-00000007;1”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 7) exited non-zero on ‘Local/sms@from-trunk-00000007;1’ in macro ‘hangupcall’
== Spawn extension (from-trunk, h, 1) exited non-zero on ‘Local/sms@from-trunk-00000007;1’

There is the error right there

Unable to execute '/usr/sbin/ssmtp [email protected]

Sorry if my next comment seems rude, by no means I want to be rude, but it seems as if you are expecting us to do some reading for you. Until this moment, all questions asked could at least been initially answered by yourself if you would take the time to read and search for more info.

sorry brother. But why this message " Unable to execute '/usr/sbin/ssmtp [email protected]" coming? what should I do the automatically send the sms to my email? appreciated your effort.

Why don’t you try to run that command manually on the Linux command line to see if it returns any error?

Some questions that quickly come to mind:
Is ssmtp even installed on /usr/sbin ?
If installed, does it need any configuration file to be modified?

This command is not related to FreePBX or asterisk at all, so start there. I really encourage you to do some reading, searching and troubleshooting by yourself first, and then when you have exhausted all possibilities, seek help here explaining what the issue is and what have you done to try and fix it.