Chan_dongle GSM-VoIP gateway issue

I’m trying to set up a GSM-VoIP gateway using a Raspberry Pi and a USB modem, as described here: http://www.raspberry-asterisk.org/documentation/gsm-voip-gateway-with-chan_dongle/

I got the dongle connected, I can send SMS messages from the command line, but I can’t get the SIP-to-dongle transition working.

I have a pjsip extension which I connect to using Linphone. When I try sending an SMS from Linphone, I get these messages in the Asterisk log:

ERROR[1132][C-00000000]: translate.c:1320 ast_translator_best_choice: Cannot determine best translation path since one capability supports no formats
WARNING[1132][C-00000000]: channel.c:6203 ast_request: No translator path exists for channel type dongle (native (slin)) to (none)
WARNING[1132][C-00000000]: app_dial.c:2525 dial_exec_full: Unable to create channel of type 'dongle' (cause 58 - Bearer capability not available)
WARNING[1132][C-00000000]: app_macro.c:310 _macro_exec: No such context 'macro-outisbusy' for macro 'outisbusy'. Was called by XXXXXXXXXX@from-internal
ERROR[1132][C-00000000]: channel.c:5640 set_format: Unable to set format because channel Message/ast_msg_queue supports no formats
ERROR[1132][C-00000000]: channel.c:8131 ast_channel_start_silence_generator: Could not set write format to SLINEAR

And when I try to make a call, I get:

ERROR[1268]: at_response.c:466 at_response_error: [dongle0] Dial failed
ERROR[1268]: at_response.c:471 at_response_error: [dongle0] AT^DDSETEX failed
WARNING[2387][C-00000001]: app_macro.c:310 _macro_exec: No such context 'macro-outisbusy' for macro 'outisbusy'. Was called by +XXXXXXXXXXX@from-internal
WARNING[2387][C-00000001]: channel.c:5005 ast_prod: Prodding channel 'PJSIP/54321-00000000' failed

What am I missing?

It looks like you have multiple issues.

You are missing a context for macro-outisbusy but that doesn’t appear to be stopping you from dialing.

It looks like it may be a codec/format issue, I’ve never used a GSM-Voip gateway before, Are you sure you can use ulaw or does it need to use GSM?

Thanks for the reply.

It turns out that voice capability was disabled on the dongle. After enabling it, I’m able to make calls, but I only get one-way audio on inbound calls. If you have any suggestions for fixing that, I’d be happy to read them.

The SMS issue remains, but I think it’s because Linphone’s text messaging works only for SIP, not SMS. I probably need to use something else. For instance e-mail, XMPP or the web interface that chan_dongle offers.

I hope that helps. Here is my configuration:

—dongle.conf

[gsmgw]
context=gsmgw
imei=765432112345678
imsi=123456876543210

;audio=/dev/ttyUSB1 ; tty port for audio connection; no default value
;data=/dev/ttyUSB2 ; tty port for AT commands; no default value

—extensions.conf

;dial out via gsmgw

exten => _0.,1,Dial(Dongle/gsmgw/${EXTEN})
same => n,Hangup()

;incoming calls

[gsmgw]
; Incoming from GSM/3G GW to deskphone

exten => +98765412325,1,Dial(SIP/deskphone)