I have Asterisk 1.8 configured with chan_dongle and E303 Huawei 3G modem. I can establish a connection but when I call phone->dongle->asterisk->Twinkle(SIP) , audio from phone to Twinkle works, but audio from Twinkle to phone is terrible distorted(cannot understand anything).
When I reverse the connection (calling from Twinkle to phone) the audio is working one way only. When I configure dialplan to phone->dongle->asterisk_echo_test , the echo test works perfectly, I can here my echo clearly.
Does anyone know how to solve this?
And second question, maybe related to the above problem. My dialplan is suppose to record all connections to *.wav files. But it is recording only when I place a call phone, when I initiate the call from Twinkle there is no *.wav file created.
asteriskCLI , sip.conf and extensions.conf snapshots are below.
-- Executing [+1234567890@dongle-incomming:1] NoOp("Dongle/dongle0-0100000001", "Call from dongle . Start call recording.") in new stack
-- Executing [+1234567890@dongle-incomming:2] MixMonitor("Dongle/dongle0-0100000001", "1399136727.2.wav,ab") in new stack
-- Executing [+1234567890@dongle-incomming:3] Dial("Dongle/dongle0-0100000001", "SIP/2101") in new stack
== Begin MixMonitor Recording Dongle/dongle0-0100000001
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Called SIP/2101
-- SIP/2101-00000001 is ringing
== Spawn extension (dongle-incomming, +1234567890, 3) exited non-zero on 'Dongle/dongle0-0100000001'
== End MixMonitor Recording Dongle/dongle0-0100000001
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Executing [796099180@sip-local:1] NoOp("SIP/2101-00000002", "Dongle dialing 796099180. Start call recording.") in new stack
-- Executing [796099180@sip-local:2] MixMonitor("SIP/2101-00000002", "1399136778.4.wav,ab") in new stack
-- Executing [796099180@sip-local:3] Dial("SIP/2101-00000002", "dongle/dongle0/796099180") in new stack
-- Called dongle/dongle0/796099180
== Begin MixMonitor Recording SIP/2101-00000002
-- Dongle/dongle0-0100000002 is making progress passing it to SIP/2101-00000002
== Spawn extension (sip-local, 796099180, 3) exited non-zero on 'SIP/2101-00000002'
== End MixMonitor Recording SIP/2101-00000002
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Executing [796099180@sip-local:1] NoOp("SIP/2101-00000003", "Dongle dialing 796099180. Start call recording.") in new stack
-- Executing [796099180@sip-local:2] MixMonitor("SIP/2101-00000003", "1399136831.6.wav,ab") in new stack
-- Executing [796099180@sip-local:3] Dial("SIP/2101-00000003", "dongle/dongle0/796099180") in new stack
== Begin MixMonitor Recording SIP/2101-00000003
-- Called dongle/dongle0/796099180
-- Dongle/dongle0-0100000003 is making progress passing it to SIP/2101-00000003
[May 3 19:07:29] ERROR[13395]: chan_dongle.c:433 do_monitor_phone: [dongle0] timedout while waiting 'OK' in response to 'AT'
-- [dongle0] Dongle has disconnected
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing [796099180@sip-local:4] StopMixMonitor("SIP/2101-00000003", "") in new stack
-- Executing [796099180@sip-local:5] NoOp("SIP/2101-00000003", "Terminating call to 796099180. Stop call recording.") in new stack
-- Executing [796099180@sip-local:6] Hangup("SIP/2101-00000003", "") in new stack
== Spawn extension (sip-local, 796099180, 6) exited non-zero on 'SIP/2101-00000003'
== End MixMonitor Recording SIP/2101-00000003
-- [dongle0] Trying to connect on /dev/ttyUSB2...
-- [dongle0] Dongle has connected, initializing...
-- [dongle0] Dongle initialized and ready
[dongle-incomming]
exten => _+X.,1,NoOp(Call from dongle ${CALLERID}. Start call recording.)
same => n,MixMonitor(${UNIQUEID}.wav,ab)
same => n,answer()
same => n,Dial(SIP/2101)
same => n,StopMixMonitor()
same => n,NoOp(Call from dongle ${CALLERID} ended. Stop call recording.)
same => n,hangup()
[dongle-outcomming]
exten => _[+0-9]XXXXX.,1,NoOp(Dongle dialing ${EXTEN}. Start call recording.)
same => n,MixMonitor(${UNIQUEID}.wav,ab)
same => n,answer()
same => n,Dial(dongle/dongle0/${EXTEN})
same => n,StopMixMonitor()
same => n,NoOp(Terminating call to ${EXTEN}. Stop call recording.)
same => n,hangup()
;sip.conf
[soft-phone](!) ;(!) gives us a template
type=friend
context=sip-local ;The context name is what links to the extensions
;and can be any name.
host=dynamic ;device will register with asterisk
nat=yes ;allow network address translation
secret=1111 ;Password needed to authenticate
dtmfmode=auto ;Accept touch tones from device
canreinvite=no
disallow=all
allow=ulaw,alaw,speex,gsm,h261,h263,h263p
directmedia=no
[lenovo](soft-phone) ;lenovo is the name of the user which connects
bindport=5066 ;from the soft phone, it must match your SIP username
callerid=2101