[Asterisk-Users] Trouble getting SMS working

Mick mick at wow.nailed.org
Fri Jun 9 23:08:49 MST 2006


Hi, 

Thanks for your reply.
I'm a bit confused as to what is going on too.
I am only making an guess but it seems the phone can't see the asterisk messages.
If my understanding of the protocol is correct the answering side should send a 
link established packet (EST) to the calling party.

so when * answers it sends
-- SMS TX 93 00 6D 00 00 00...
93 being the EST,

but * doesn't seem to get a response after that.
From looking at app_sms.c (not that I understand any of it), it seems the
'no data' message  is printed out after a timeout waiting for a response.

When I initiate the SMS from *,
The phone answers and sends the EST which * receives.
-- SMS RX 93 00 6D 00 00 00
* replies with
-- SMS TX 94 00 6C 00 00 00
Which is a 'release connection' message (what ever that means :)
but nothing seems to happen after that.

All I have done so far is verify that data will come from the phone to *, 
but it seems that the phone doesn't receive or recognise the messages coming back from *.
I dropped my fixed line, so I am unable to test anything against the Telstra servers.
I am wondering if maybe something is not configured/behaving correctly inside the pap2 ?

I tried putting in a delay like you suggested, but it had no effect.

Thanks again for your help.

Mick.


> I'm a bit confused about exactly what isn't working... you have given
> the asterisk receiving parts of extensions.conf, and say that when you
> send a message from the phone to * you get a 'no data' message, but then
> say that * is able to receive messages from the phone and that sending
> to the phone doesn't work?
> 
> I have set sms up on an x100p for receiving (which you may already have
> working), and found that upon answering the phone I had to do a short
> Wait, otherwise it just didn't work. 1 second worked, I think even .1
> second was okay.
> 
> For sending, I have this in my dialplan:
> 
> [default]
> exten => 0198339100,1,Goto(sms_tx,s,1)
> 
> [sms_tx]
> exten => s,1,Dial(Zap/1/0198339100)
> exten => s,2,SMS()
> exten => s,3,Hangup
> 
> and send with a command like:
> smsq --motx-channel Local/0198339100 0417352712 Pie is in the oven.
> 
> For receiving:
> [fxo]
> exten => s/0198339100,1,Goto(sms_rx,s,1)
> 
> [sms_rx]
> exten => s,1,Answer
> exten => s,2,Wait(1)
> exten => s,3,SMS(${CALLERIDNUM},a)
> exten => s,4,System(/usr/local/bin/sms_rx)
> exten => s,5,Hangup
> 
> 
> But of course I'm doing motx and you are doing mttx, so the rules are be
> a bit different.
> 
> James
> 
> > Hi,
> > 
> > I have been trying to get my asterisk box to send SMS's to my
> Panasonic
> > dect phone via
> > a Linksys pap2. I believe I have the message centers setup correctly
> > between * and the phone.
> > The pap2 is configured to only use G711a.
> > The Asterisk version is 1.0.7.
> > 
> > In my /etc/asterisk/extensions.conf I have
> > [smsphone]
> > exten = 199,1,Goto(smsmorx,${CALLERIDNUM},1)
> > 
> > [smsmorx]
> > exten = _X.,1,SMS(${EXTEN}|sa)
> > exten = _X.,2,System(/tmp/smstest ${EXTEN} ${CALLERIDNUM}
> ${CALLERIDNAME})
> > exten = _X.,3,Hangup
> > 
> > 
> > When trying to send an SMS from the phone to *, I get the following:
> > 
> > /var/log/asterisk/event_log:
> >     asterisk[15345]: No data, hanging up
> > 
> > asterisk -grv with verbosity set to 7 shows this:
> > 
> >     -- Executing Goto("SIP/phone1-3037", "smsmorx|101|1") in new stack
> >     -- Goto (smsmorx,101,1)
> >     -- Executing SMS("SIP/phone1-3037", "101|sa") in new stack
> >     -- SMS TX 93 00 6D 00 00 00...
> >     -- Executing System("SIP/phone1-3037", "/tmp/smstest 101 101
> Office")
> > in new stack
> >     -- Executing Hangup("SIP/phone1-3037", "") in new stack
> >     == Spawn extension (smsmorx, 101, 3) exited non-zero on
> 'SIP/phone1-
> > 3037'
> > 
> > 
> > When trying to send an SMS to the phone with the command:
> > smsq -o19900 -q101 --mttx-callerid 19900 --mttx-channel sip/phone1
> --ud
> > "test"
> > 
> > /var/log/asterisk/event_log:
> > asterisk[15493]: Queued call to sip/phone1 completed
> > 
> > asterisk -grv
> >     -- Attempting call on sip/phone1 for application SMS(101|s) (Retry
> 1)
> >     > Channel SIP/phone1-8c85 was answered.
> >     > Lauching SMS(101|s) on SIP/phone1-8c85
> >     -- SMS RX 93 00 6D 00 00 00...
> >     -- SMS TX 94 00 6C 00 00 00...
> > May 10 06:16:47 NOTICE[15493]: pbx_spool.c:242 attempt_thread: Call
> > completed to sip/phone1
> > 
> > The phone shows "Receiving Message" for a short while, then nothing.
> > 
> > It appears that * is able to receive messages from the phone, but the
> > phone isn't receiving the messages from * ?
> > 
> > Would anyone have any ideas on how to get this going ?
> > 
> > Thanks
> > 
> > Mick.
> > 
> > 
> > _______________________________________________
> > --Bandwidth and Colocation provided by Easynews.com --
> > 
> > Asterisk-Users mailing list
> > To UNSUBSCRIBE or update options visit:
> >    http://lists.digium.com/mailman/listinfo/asterisk-users
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
> 
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
> 



More information about the asterisk-users mailing list