I am trying to get asterisk to configure and answer incoming call. This is just the first step towards the development. Once the modem picks up the call I will start developing the dial plan. Please review my conf files
dongle.conf
[general]
interval=15
[defaults]
context=dongle-incoming
group=0
rxgain=0
txgain=0
autodeletesms=yes
resetdongle=yes
u2diag=-1
usecallingpres=yes
callingpres=allowed_passed_screen
disablesms=no
language=en
mindtmfgap=45
mindtmfduration=80
mindtmfinterval=200
callwaiting=auto
disable=no
exten=+1234567890
dtmf=relax unaltered diaplan
[dongle0]
audio=/dev/ttyUSB1
data=/dev/ttyUSB0
imei=<valid>
imsi=<valid>
extensions.conf
[general]
static = yes
writeprotect = no
clearglobalvars = no
[globals]
CONSOLE = Console/dsp ; Console interface for demo
;CONSOLE=DAHDI/1
;CONSOLE=Phone/phone0
IAXINFO = guest ; IAXtel username/password
;IAXINFO=myuser:mypass
TRUNK = DAHDI/G2 ; Trunk interface
TRUNKMSD = 1 ; MSD digits to strip (usually 1 or 0)
FEATURES =
DIALOPTIONS =
RINGTIME = 20
FOLLOWMEOPTIONS =
PAGING_HEADER = Intercom
[dongle-incoming]
exten => sms,1,Verbose(Incoming SMS from ${CALLERID(num)} ${SMS})
exten => sms,n,System(echo '${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)} - ${DONGLE} - ${CALLERID(num)}: ${SMS}' >> /var/log/asterisk/sms.txt)
exten => sms,n,Hangup()
exten => ussd,1,Verbose(Incoming USSD: ${USSD})
exten => ussd,n,System(echo '${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)} - ${DONGLE}: ${USSD}' >> /var/log/asterisk/ussd.txt)
exten => ussd,n,Hangup()
exten => s,1,Dial(SIP/100,,)
exten => s,n,Hangup()
Some debugging steps
-------------- Status -------------
Device : dongle0
State : Free
Audio : /dev/ttyUSB1
Data : /dev/ttyUSB0
Voice : Yes
SMS : Yes
Manufacturer : huawei
Model : E303D
Firmware : 21.157.72.00.356
IMEI : <valid>
IMSI : <valid>
GSM Registration Status : Registered, home network
RSSI : 18, -114 dBm
Mode : No Service
Submode : No service
Provider Name : IDEA
Location area code : "A03D"
Cell ID : "B96B"
Subscriber Number : Unknown
SMS Service Center : <valid>
Use UCS-2 encoding : Yes
USSD use 7 bit encoding : No
USSD use UCS-2 decoding : Yes
Tasks in queue : 0
Commands in queue : 0
Call Waiting : Disabled
Current device state : start
Desired device state : start
When change state : now
Calls/Channels : 0
Active : 0
Held : 0
Dialing : 0
Alerting : 0
Incoming : 0
Waiting : 0
Releasing : 0
Initializing : 0
dongle sms dongle0 +911234567890 hi
, the sms is sent and it worksdongle cmd dongle0 dongle cmd dongle0 ATD+91123456789T;
, this works, the outbound call happensdongle cmd dongle0 ATSO=1;
goes through, but calls are still not picked up at all. Ideally should pickup after 1 ring.What am I missing in the config ? I know its something small and silly.
After doing a lot of trial and error. I finally fixed the issue. The dongle.conf had to be changed to audio=ttyUSB1
and data=ttyUSB2
. This only got to the stage of the incoming call notification coming in. From then on, the dongle.conf needs one more change. The context needs to point to your helloworld in extension.conf. So I created a context=dongle-incoming
. In the extensions.conf I put in
[dongle-incoming]
exten => s,1,Answer(500)
exten => s,n,SayPhonetic(hello to taxeeta)
Also in extensions.conf I put include=>dongle-incoming
and removed include=>default
.