[asterisk-users] sending an SMS via Asterisk?

Yuan LIU yliu11 at hotmail.com
Tue Apr 17 22:03:35 MST 2007


>From: Per Jessen <per at computer.org>
>Date: Tue, 17 Apr 2007 09:40:18 +0200
>
>I've been googling and reading a lot, but I'm not getting any closer to
>getting an SMS sent via Asterisk.
>
>Prior to switching to asterisk, I used sms_client on an ISDN line to
>dial one of two Swisscom SMS centers:  0900900941 or 0794998990.
>
>My dialplan looks like this:
>
>exten => 0900900941,1,Goto(smsmotx,${CALLERIDNUM},1)
>exten => 0794998990,1,Goto(smsmotx,${CALLERIDNUM},1)

How do callers get into these extensions?

>; outgoing SMS
>[smsmotx]
>exten => _X.,1,Set(smsFrom=${CALLERIDNUM})
>exten => _X.,n,SMS(${smsFrom},,${EXTEN},${CALLERIDNAME}) ; Create an SMS
>exten => _X.,n,SMS(${smsFrom}) ; Send queued SMS
>exten => _X.,n,Hangup()
>
>When I attempt to send an SMS using smsq, Asterisk appears to be
>behaving normally, a call is made etc., but the SMS never arrives ...

I'm a bit confused about your procedures.  On one hand, if you use smsq, you 
don't need to use SMS application (unless you are in the receiving end, 
where you don't use smsq, either).  You'll need to show the actual smsq 
command line.

On the other hand, based on the dial plan snippet you provided, you are 
dialing whoever dialed you (CALLERIDNUM), not Swisscom SMS centers.  Not 
sure why your caller never complained about spam calls, if Asterisk indeed 
made the calls.

A quick fix would be (untested)
exten => 0900900941,1,Goto(smsmotx,${EXTEN},1)
exten => 0794998990,1,Goto(smsmotx,${EXTEN},1)

Hope this helps.

Yuan Liu

>What am I doing wrong?  Let me know what diagnostics I need to provide
>if anyone wants to take a closer look.
>
>
>thanks
>/Per Jessen, Zürich




More information about the asterisk-users mailing list