Chan_Dongle & USB E160 Dongle as Voice Trunk

I have installed successfully Stable-6.12.65 Release Date-2014 FreePBX 12, Linux 6.5 Asterisk 11 or 13

I need Step by Step Guide to install and configure Chan_Dongle in order to use USB E160 Voice activated as Trunk to make Outgoing Call & Receiving Incoming Call on SIP extensions.

I could not find Full Step by Step instruction so far after spending week to search for.

if someone provide the clean and full instruction will be highly appreciated in advance.

Incomming:

In dongle.conf change context=default to context=from-trunk

To save Subscriber Number, you can write an entry for OWN NUMBERS storage
on SIM. For example, in asterisk CLI
dongle cmd dongle0 AT+CPBS=“ON"
dongle cmd dongle0 AT+CPBW=1,”+556191000000",145

Restart Asterisk

In FreePBX Create a Inbound Route with Name: Your Inbound and Description like +556191000000. Destination: Queue or Extensions etc

See more details in http://wiki.e1550.mobi/doku.php?id=usage

Outgoing:

In Outgoing I write in extensions_custom.conf

exten => _[5-9]XXXXXXX,1,Progress() ;Mobile route Brazil
same => n(inicia),Dial(Dongle/dongle0/${EXTEN},60,tTL(3600000))
same => n(desliga),Hangup()

The problem is that thus nothing will be recorded on the CDR Reports FreePBX .

Studying FreePBX code through the files extensions_additional.conf draws some lines and programmed as follows

exten => _[5-9].,1,Progress()
same => n,Set(CALLFILENAME=${CALLERID(num)}.${STRFTIME(${EPOCH},%Y%m%d-%H%M%S)}.${UNIQUEID})
same => n,MixMonitor(${MIXMON_DIR}${CALLFILENAME}.${MIXMON_FORMAT},${MIXMON_POST})
same => n(check),Set(__MON_FMT=${IF($["${MIXMON_FORMAT}"=“wav49”]?WAV:${MIXMON_FORMAT})})
same => n,Set(CDR(recordingfile)=${CALLFILENAME}.${MON_FMT})
same => n(inicia),Dial(Dongle/dongle0/${EXTEN},60,tTL(3600000))
same => n(desliga),Hangup()

And Now CDR Reports show calls and record all.

1 Like

I found this on Russian website and used as follow:
In dongle.conf changed context=default to from-dongle-in
I have used in extensions_custom.config the following
[from-dongle-in]

exten => +447963607426,1,Set(CALLERID(all)=${CALLERID(num)})
exten => +447963607426,n,Set(CALLERID(num)=${CALLERID(num):3})
exten => +447963607426,n,goto(from-trunk,${DONGLEIMEI},1)

CDR Reports show all calls now.

I made test incoming call and it was successful.

below is the log could you see is there anything wrong

-- [dongle0] Trying to connect on /dev/ttyUSB2...
-- [dongle0] Dongle has connected, initializing...
-- [dongle0] Dongle initialized and ready
-- Executing [+447963607426@from-dongle-in:1] Set("Dongle/dongle0-0100000000", "CALLERID(all)=07951505215") in new stack
-- Executing [+447963607426@from-dongle-in:2] Set("Dongle/dongle0-0100000000", "CALLERID(num)=51505215") in new stack
-- Executing [+447963607426@from-dongle-in:3] Goto("Dongle/dongle0-0100000000", "from-trunk,353142039341147,1") in new stack
-- Goto (from-trunk,353142039341147,1)
-- Executing [353142039341147@from-trunk:1] NoOp("Dongle/dongle0-0100000000", "Catch-All DID Match - Found 353142039341147 - You probably want a DID for this.") in new stack

[2015-01-26 14:47:10] WARNING[3288][C-00000000]: chan_sip.c:21976 func_header_read: This function can only be used on SIP channels.
– Executing [353142039341147@from-trunk:2] Log(“Dongle/dongle0-0100000000”, "WARNING,Friendly Scanner from ") in new stack
[2015-01-26 14:47:10] WARNING[3288][C-00000000]: Ext. 353142039341147:2 @ from-trunk: Friendly Scanner from
– Executing [353142039341147@from-trunk:3] Set(“Dongle/dongle0-0100000000”, “__FROM_DID=353142039341147”) in new stack
– Executing [353142039341147@from-trunk:4] Goto(“Dongle/dongle0-0100000000”, “ext-did,s,1”) in new stack
– Goto (ext-did,s,1)
– Executing [s@ext-did:1] ExecIf(“Dongle/dongle0-0100000000”, “0?Set(__FROM_DID=s)”) in new stack
– Executing [s@ext-did:2] Gosub(“Dongle/dongle0-0100000000”, “app-blacklist-check,s,1()”) in new stack
– Executing [s@app-blacklist-check:1] GotoIf(“Dongle/dongle0-0100000000”, “0?blacklisted”) in new stack
– Executing [s@app-blacklist-check:2] Set(“Dongle/dongle0-0100000000”, “CALLED_BLACKLIST=1”) in new stack
– Executing [s@app-blacklist-check:3] Return(“Dongle/dongle0-0100000000”, “”) in new stack
– Executing [s@ext-did:3] Set(“Dongle/dongle0-0100000000”, “CDR(did)=353142039341147”) in new stack
– Executing [s@ext-did:4] ExecIf(“Dongle/dongle0-0100000000”, “1 ?Set(CALLERID(name)=51505215)”) in new stack
– Executing [s@ext-did:5] Set(“Dongle/dongle0-0100000000”, “CHANNEL(musicclass)=default”) in new stack
– Executing [s@ext-did:6] Set(“Dongle/dongle0-0100000000”, “__MOHCLASS=default”) in new stack
[2015-01-26 14:47:10] WARNING[3288][C-00000000]: func_channel.c:538 func_channel_read: Unknown or unavailable item requested: ‘reversecharge’
– Executing [s@ext-did:7] GotoIf(“Dongle/dongle0-0100000000”, “0?macro-hangupcall”) in new stack
[2015-01-26 14:47:10] WARNING[3288][C-00000000]: func_callerid.c:910 callerpres_read: CALLERPRES is deprecated. Use CALLERID(name-pres) or CALLERID(num-pres) instead.
– Executing [s@ext-did:8] Set(“Dongle/dongle0-0100000000”, “__CALLINGPRES_SV=allowed_not_screened”) in new stack
– Executing [s@ext-did:9] Set(“Dongle/dongle0-0100000000”, “CALLERPRES()=allowed_not_screened”) in new stack
– Executing [s@ext-did:10] Goto(“Dongle/dongle0-0100000000”, “from-did-direct,100,1”) in new stack
– Goto (from-did-direct,100,1)
– Executing [100@from-did-direct:1] GotoIf(“Dongle/dongle0-0100000000”, “1?ext-local,100,1”) in new stack
– Goto (ext-local,100,1)
– Executing [100@ext-local:1] Set(“Dongle/dongle0-0100000000”, “__RINGTIMER=15”) in new stack
– Executing [100@ext-local:2] Macro(“Dongle/dongle0-0100000000”, “exten-vm,100,100,0,0,0”) in new stack
– Executing [s@macro-exten-vm:1] Macro(“Dongle/dongle0-0100000000”, “user-callerid,”) in new stack
– Executing [s@macro-user-callerid:1] Set(“Dongle/dongle0-0100000000”, “TOUCH_MONITOR=1422283630.0”) in new stack
– Executing [s@macro-user-callerid:2] Set(“Dongle/dongle0-0100000000”, “AMPUSER=51505215”) in new stack
– Executing [s@macro-user-callerid:3] GotoIf(“Dongle/dongle0-0100000000”, “0?report”) in new stack
– Executing [s@macro-user-callerid:4] ExecIf(“Dongle/dongle0-0100000000”, “1?Set(REALCALLERIDNUM=51505215)”) in new stack
– Executing [s@macro-user-callerid:5] Set(“Dongle/dongle0-0100000000”, “AMPUSER=”) in new stack
– Executing [s@macro-user-callerid:6] GotoIf(“Dongle/dongle0-0100000000”, “0?limit”) in new stack
– Executing [s@macro-user-callerid:7] Set(“Dongle/dongle0-0100000000”, “AMPUSERCIDNAME=”) in new stack
– Executing [s@macro-user-callerid:8] GotoIf(“Dongle/dongle0-0100000000”, “1?report”) in new stack
– Goto (macro-user-callerid,s,16)
– Executing [s@macro-user-callerid:16] GotoIf(“Dongle/dongle0-0100000000”, “0?continue”) in new stack
– Executing [s@macro-user-callerid:17] ExecIf(“Dongle/dongle0-0100000000”, “1?Set(__CALLEE_ACCOUNCODE=)”) in new stack
– Executing [s@macro-user-callerid:18] Set(“Dongle/dongle0-0100000000”, “__TTL=64”) in new stack
– Executing [s@macro-user-callerid:19] GotoIf(“Dongle/dongle0-0100000000”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,30)
– Executing [s@macro-user-callerid:30] Set(“Dongle/dongle0-0100000000”, “CALLERID(number)=51505215”) in new stack
– Executing [s@macro-user-callerid:31] Set(“Dongle/dongle0-0100000000”, “CALLERID(name)=51505215”) in new stack
– Executing [s@macro-user-callerid:32] Set(“Dongle/dongle0-0100000000”, “CDR(cnum)=51505215”) in new stack
– Executing [s@macro-user-callerid:33] Set(“Dongle/dongle0-0100000000”, “CDR(cnam)=51505215”) in new stack
– Executing [s@macro-user-callerid:34] Set(“Dongle/dongle0-0100000000”, “CHANNEL(language)=en”) in new stack
– Executing [s@macro-exten-vm:2] Set(“Dongle/dongle0-0100000000”, “RingGroupMethod=none”) in new stack
– Executing [s@macro-exten-vm:3] Set(“Dongle/dongle0-0100000000”, “__EXTTOCALL=100”) in new stack
– Executing [s@macro-exten-vm:4] Set(“Dongle/dongle0-0100000000”, “__PICKUPMARK=100”) in new stack
– Executing [s@macro-exten-vm:5] Set(“Dongle/dongle0-0100000000”, “RT=15”) in new stack
[2015-01-26 14:47:10] WARNING[3288][C-00000000]: chan_sip.c:21976 func_header_read: This function can only be used on SIP channels.
– Executing [s@macro-exten-vm:6] ExecIf(“Dongle/dongle0-0100000000”, “0?Macro(vm,100,DIRECTDIAL,)”) in new stack
[2015-01-26 14:47:10] WARNING[3288][C-00000000]: chan_sip.c:21976 func_header_read: This function can only be used on SIP channels.
[2015-01-26 14:47:10] WARNING[3288][C-00000000]: chan_sip.c:21976 func_header_read: This function can only be used on SIP channels.
– Executing [s@macro-exten-vm:7] ExecIf(“Dongle/dongle0-0100000000”, “0?MacroExit()”) in new stack
[2015-01-26 14:47:10] WARNING[3288][C-00000000]: chan_sip.c:21976 func_header_read: This function can only be used on SIP channels.
– Executing [s@macro-exten-vm:8] Gosub(“Dongle/dongle0-0100000000”, “sub-record-check,s,1(exten,100,)”) in new stack
– Executing [s@sub-record-check:1] GotoIf(“Dongle/dongle0-0100000000”, “0?initialized”) in new stack
– Executing [s@sub-record-check:2] Set(“Dongle/dongle0-0100000000”, “__REC_STATUS=INITIALIZED”) in new stack
– Executing [s@sub-record-check:3] Set(“Dongle/dongle0-0100000000”, “NOW=1422283630”) in new stack
– Executing [s@sub-record-check:4] Set(“Dongle/dongle0-0100000000”, “__DAY=26”) in new stack
– Executing [s@sub-record-check:5] Set(“Dongle/dongle0-0100000000”, “__MONTH=01”) in new stack
– Executing [s@sub-record-check:6] Set(“Dongle/dongle0-0100000000”, “__YEAR=2015”) in new stack
– Executing [s@sub-record-check:7] Set(“Dongle/dongle0-0100000000”, “__TIMESTR=20150126-144710”) in new stack
– Executing [s@sub-record-check:8] Set(“Dongle/dongle0-0100000000”, “__FROMEXTEN=51505215”) in new stack
– Executing [s@sub-record-check:9] Set(“Dongle/dongle0-0100000000”, “__MON_FMT=wav”) in new stack
– Executing [s@sub-record-check:10] NoOp(“Dongle/dongle0-0100000000”, “Recordings initialized”) in new stack
– Executing [s@sub-record-check:11] ExecIf(“Dongle/dongle0-0100000000”, “0?Set(ARG3=dontcare)”) in new stack
– Executing [s@sub-record-check:12] Set(“Dongle/dongle0-0100000000”, “REC_POLICY_MODE_SAVE=”) in new stack
– Executing [s@sub-record-check:13] GotoIf(“Dongle/dongle0-0100000000”, “5?checkaction”) in new stack
– Goto (sub-record-check,s,16)
– Executing [s@sub-record-check:16] GotoIf(“Dongle/dongle0-0100000000”, “1?sub-record-check,exten,1”) in new stack
– Goto (sub-record-check,exten,1)
– Executing [exten@sub-record-check:1] NoOp(“Dongle/dongle0-0100000000”, “Exten Recording Check between 51505215 and 100”) in new stack
– Executing [exten@sub-record-check:2] Set(“Dongle/dongle0-0100000000”, “CALLTYPE=external”) in new stack
– Executing [exten@sub-record-check:3] ExecIf(“Dongle/dongle0-0100000000”, “0?Set(CALLTYPE=)”) in new stack
– Executing [exten@sub-record-check:4] Set(“Dongle/dongle0-0100000000”, “CALLEE=dontcare”) in new stack
– Executing [exten@sub-record-check:5] ExecIf(“Dongle/dongle0-0100000000”, “0?Set(CALLEE=dontcare)”) in new stack
– Executing [exten@sub-record-check:6] GotoIf(“Dongle/dongle0-0100000000”, “1?callee”) in new stack
– Goto (sub-record-check,exten,11)
– Executing [exten@sub-record-check:11] Gosub(“Dongle/dongle0-0100000000”, “recordcheck,1(dontcare,external,100)”) in new stack
– Executing [recordcheck@sub-record-check:1] NoOp(“Dongle/dongle0-0100000000”, “Starting recording check against dontcare”) in new stack
– Executing [recordcheck@sub-record-check:2] Goto(“Dongle/dongle0-0100000000”, “dontcare”) in new stack
– Goto (sub-record-check,recordcheck,3)
– Executing [recordcheck@sub-record-check:3] Return(“Dongle/dongle0-0100000000”, “”) in new stack
– Executing [exten@sub-record-check:12] Return(“Dongle/dongle0-0100000000”, “”) in new stack
– Executing [s@macro-exten-vm:9] GotoIf(“Dongle/dongle0-0100000000”, “1?macrodial”) in new stack
– Goto (macro-exten-vm,s,15)
– Executing [s@macro-exten-vm:15] GosubIf(“Dongle/dongle0-0100000000”, “0?clrheader,1()”) in new stack
– Executing [s@macro-exten-vm:16] Macro(“Dongle/dongle0-0100000000”, “dial-one,15,Ttr,100”) in new stack
– Executing [s@macro-dial-one:1] Set(“Dongle/dongle0-0100000000”, “DEXTEN=100”) in new stack
– Executing [s@macro-dial-one:2] Set(“Dongle/dongle0-0100000000”, “DIALSTATUS_CW=”) in new stack
– Executing [s@macro-dial-one:3] GosubIf(“Dongle/dongle0-0100000000”, “0?screen,1()”) in new stack
– Executing [s@macro-dial-one:4] GosubIf(“Dongle/dongle0-0100000000”, “0?cf,1()”) in new stack
– Executing [s@macro-dial-one:5] GotoIf(“Dongle/dongle0-0100000000”, “1?skip1”) in new stack
– Goto (macro-dial-one,s,8)
– Executing [s@macro-dial-one:8] GotoIf(“Dongle/dongle0-0100000000”, “0?nodial”) in new stack
– Executing [s@macro-dial-one:9] GotoIf(“Dongle/dongle0-0100000000”, “0?continue”) in new stack
– Executing [s@macro-dial-one:10] Set(“Dongle/dongle0-0100000000”, “EXTHASCW=ENABLED”) in new stack
– Executing [s@macro-dial-one:11] GotoIf(“Dongle/dongle0-0100000000”, “0?next1:cwinusebusy”) in new stack
– Goto (macro-dial-one,s,23)
– Executing [s@macro-dial-one:23] GotoIf(“Dongle/dongle0-0100000000”, “1?next3:continue”) in new stack
– Goto (macro-dial-one,s,24)
– Executing [s@macro-dial-one:24] ExecIf(“Dongle/dongle0-0100000000”, “0?Set(DIALSTATUS_CW=BUSY)”) in new stack
– Executing [s@macro-dial-one:25] GotoIf(“Dongle/dongle0-0100000000”, “0?nodial”) in new stack
– Executing [s@macro-dial-one:26] GosubIf(“Dongle/dongle0-0100000000”, “1?dstring,1():dlocal,1()”) in new stack
– Executing [dstring@macro-dial-one:1] Set(“Dongle/dongle0-0100000000”, “DSTRING=”) in new stack
– Executing [dstring@macro-dial-one:2] Set(“Dongle/dongle0-0100000000”, “DEVICES=100”) in new stack
– Executing [dstring@macro-dial-one:3] ExecIf(“Dongle/dongle0-0100000000”, “0?Return()”) in new stack
– Executing [dstring@macro-dial-one:4] ExecIf(“Dongle/dongle0-0100000000”, “0?Set(DEVICES=00)”) in new stack
– Executing [dstring@macro-dial-one:5] Set(“Dongle/dongle0-0100000000”, “LOOPCNT=1”) in new stack
– Executing [dstring@macro-dial-one:6] Set(“Dongle/dongle0-0100000000”, “ITER=1”) in new stack
– Executing [dstring@macro-dial-one:7] Set(“Dongle/dongle0-0100000000”, “THISDIAL=SIP/100”) in new stack
– Executing [dstring@macro-dial-one:8] GosubIf(“Dongle/dongle0-0100000000”, “1?zap2dahdi,1()”) in new stack
– Executing [zap2dahdi@macro-dial-one:1] ExecIf(“Dongle/dongle0-0100000000”, “0?Return()”) in new stack
– Executing [zap2dahdi@macro-dial-one:2] Set(“Dongle/dongle0-0100000000”, “NEWDIAL=”) in new stack
– Executing [zap2dahdi@macro-dial-one:3] Set(“Dongle/dongle0-0100000000”, “LOOPCNT2=1”) in new stack
– Executing [zap2dahdi@macro-dial-one:4] Set(“Dongle/dongle0-0100000000”, “ITER2=1”) in new stack
– Executing [zap2dahdi@macro-dial-one:5] Set(“Dongle/dongle0-0100000000”, “THISPART2=SIP/100”) in new stack
– Executing [zap2dahdi@macro-dial-one:6] ExecIf(“Dongle/dongle0-0100000000”, “0?Set(THISPART2=DAHDI/100)”) in new stack
– Executing [zap2dahdi@macro-dial-one:7] Set(“Dongle/dongle0-0100000000”, “NEWDIAL=SIP/100&”) in new stack
– Executing [zap2dahdi@macro-dial-one:8] Set(“Dongle/dongle0-0100000000”, “ITER2=2”) in new stack
– Executing [zap2dahdi@macro-dial-one:9] GotoIf(“Dongle/dongle0-0100000000”, “0?begin2”) in new stack
– Executing [zap2dahdi@macro-dial-one:10] Set(“Dongle/dongle0-0100000000”, “THISDIAL=SIP/100”) in new stack
– Executing [zap2dahdi@macro-dial-one:11] Return(“Dongle/dongle0-0100000000”, “”) in new stack
– Executing [dstring@macro-dial-one:9] GotoIf(“Dongle/dongle0-0100000000”, “1?doset”) in new stack
– Goto (macro-dial-one,dstring,12)
– Executing [dstring@macro-dial-one:12] Set(“Dongle/dongle0-0100000000”, “DSTRING=SIP/100&”) in new stack
– Executing [dstring@macro-dial-one:13] Set(“Dongle/dongle0-0100000000”, “ITER=2”) in new stack
– Executing [dstring@macro-dial-one:14] GotoIf(“Dongle/dongle0-0100000000”, “0?begin”) in new stack
– Executing [dstring@macro-dial-one:15] Set(“Dongle/dongle0-0100000000”, “DSTRING=SIP/100”) in new stack
– Executing [dstring@macro-dial-one:16] Return(“Dongle/dongle0-0100000000”, “”) in new stack
– Executing [s@macro-dial-one:27] GotoIf(“Dongle/dongle0-0100000000”, “0?nodial”) in new stack
– Executing [s@macro-dial-one:28] GotoIf(“Dongle/dongle0-0100000000”, “0?skiptrace”) in new stack
– Executing [s@macro-dial-one:29] GosubIf(“Dongle/dongle0-0100000000”, “1?ctset,1():ctclear,1()”) in new stack
– Executing [ctset@macro-dial-one:1] Set(“Dongle/dongle0-0100000000”, “DB(CALLTRACE/100)=51505215”) in new stack
– Executing [ctset@macro-dial-one:2] Return(“Dongle/dongle0-0100000000”, “”) in new stack
– Executing [s@macro-dial-one:30] Set(“Dongle/dongle0-0100000000”, “D_OPTIONS=Ttr”) in new stack
– Executing [s@macro-dial-one:31] ExecIf(“Dongle/dongle0-0100000000”, “0?SIPAddHeader(Alert-Info: )”) in new stack
– Executing [s@macro-dial-one:32] ExecIf(“Dongle/dongle0-0100000000”, “0?SIPAddHeader()”) in new stack
– Executing [s@macro-dial-one:33] ExecIf(“Dongle/dongle0-0100000000”, “1?Set(CHANNEL(musicclass)=default)”) in new stack
– Executing [s@macro-dial-one:34] GosubIf(“Dongle/dongle0-0100000000”, “0?qwait,1()”) in new stack
– Executing [s@macro-dial-one:35] Set(“Dongle/dongle0-0100000000”, “__CWIGNORE=”) in new stack
– Executing [s@macro-dial-one:36] Set(“Dongle/dongle0-0100000000”, “__KEEPCID=TRUE”) in new stack
– Executing [s@macro-dial-one:37] GotoIf(“Dongle/dongle0-0100000000”, “0?usegoto,1”) in new stack
– Executing [s@macro-dial-one:38] GotoIf(“Dongle/dongle0-0100000000”, “1?godial”) in new stack
– Goto (macro-dial-one,s,43)
– Executing [s@macro-dial-one:43] Macro(“Dongle/dongle0-0100000000”, “dialout-one-predial-hook,”) in new stack
– Executing [s@macro-dialout-one-predial-hook:1] MacroExit(“Dongle/dongle0-0100000000”, “”) in new stack
– Executing [s@macro-dial-one:44] Dial(“Dongle/dongle0-0100000000”, “SIP/100,15,Ttr”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/100
[2015-01-26 14:47:10] WARNING[3288][C-00000000]: channel.c:1002 channel_indicate: [Dongle/dongle0-0100000000] Don’t know how to indicate condition 22
[2015-01-26 14:47:10] WARNING[3288][C-00000000]: channel.c:1002 channel_indicate: [Dongle/dongle0-0100000000] Don’t know how to indicate condition 22
[2015-01-26 14:47:10] WARNING[3288][C-00000000]: channel.c:1002 channel_indicate: [Dongle/dongle0-0100000000] Don’t know how to indicate condition 33
[2015-01-26 14:47:11] WARNING[3288][C-00000000]: channel.c:1002 channel_indicate: [Dongle/dongle0-0100000000] Don’t know how to indicate condition 33
– SIP/100-00000000 is ringing
[2015-01-26 14:47:18] WARNING[3288][C-00000000]: channel.c:1002 channel_indicate: [Dongle/dongle0-0100000000] Don’t know how to indicate condition 33
[2015-01-26 14:47:18] WARNING[3288][C-00000000]: channel.c:1002 channel_indicate: [Dongle/dongle0-0100000000] Don’t know how to indicate condition 22
– SIP/100-00000000 answered Dongle/dongle0-0100000000
> 0x7f7268063580 – Probation passed - setting RTP source address to 86.147.231.40:49676
> 0x7f7268063580 – Probation passed - setting RTP source address to 86.147.231.40:49676
– Executing [h@macro-dial-one:1] Macro(“Dongle/dongle0-0100000000”, “hangupcall,”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“Dongle/dongle0-0100000000”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [s@macro-hangupcall:3] ExecIf(“Dongle/dongle0-0100000000”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [s@macro-hangupcall:4] Hangup(“Dongle/dongle0-0100000000”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘Dongle/dongle0-0100000000’ in macro ‘hangupcall’
localhost*CLI>

are you brazilian? Is there a distrubution with channel_dongle included?

I still cannot make outgoing calls work!
I can recieve calls from the sim card in my 3G dongle, and i can forward them to any SIP extension i have, but i can’t figure out how to make outbound calls work from chan_dongle. I’m starting to lose hope, thinking that this might not be possible at all! :sweat:

I tried following your answer, but i must say i’m confused, the “outgoing” part of your solution seems to forward calls to the dongle, which is technically ‘handling incoming calls’

Where do i dial to get outgoing calls? If i dial using my SIP client (i use zoiper) I obviously can’t directly call a gsm number, so i need to forward calls from SIP to the dongle, something that your answer didn’t cover.

Can you please give a more detailed answer? I’m new to Asterisk/PBX and i need to make this work, thanks in advance :slight_smile:

See the simple example

Asterisk:

In /etc/asterisk/extensions_custom.conf insert de code:

[from-internal-custom]
exten => _[6-9]XXXXXXXX,1,Progress() ;Call to mobile rule in Brazil
same => n,Dial(Dongle/dongle0/${EXTEN})
same => n,Hangup()

Or in FreePBX GUI

Go to Connectivity=> Trunks - Add Custom trunk with Custom Dial String: Dongle/g0/$OUTNUM$

Then create your routes in Connectivity=> Outbound routes

1 Like

First of all, I apologize for the late reply (I frankly didn’t expect to get one) and THANK YOU!

The only thing i was doing wrong apparently was using the wrong context, also i had to make the dial pattern match algerian numbers, and then everything worked!

Thanks again for your help, and sorry for the noob question!

Take care.