I've read quite a bit in the older mailing list posts and the wiki but
I'm missing some simple point.
1) What is required to send an SMS to a mobile outside the office given:
Channel: ZAP/1
send it to $SMS_RECIPIENT (which includes the final "extra" digit)
via
$SMS_CENTER=the national message center server for sending messages
$MESSAGE= the message text
How is the .call file organized?
2) When an SMS is received from $SMS_CENTER2, how to get the $MESSAGE from it?
using
exten => s/${SMS_CENTER2},NoOp(${CALLERID})
exten => wait, answer
then?
The SMS in asterisk is not SMS like you're thinking... Its not for sending to mobile phones and not something usable in the US. bkw> -----Original Message----- > From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users- > bounces@lists.digium.com] On Behalf Of Wilson Pickett > Sent: Sunday, December 19, 2004 1:42 PM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: [Asterisk-Users] SMS - how to send one > > I've read quite a bit in the older mailing list posts and the wiki but > I'm missing some simple point. > > 1) What is required to send an SMS to a mobile outside the office given: > > Channel: ZAP/1 > send it to $SMS_RECIPIENT (which includes the final "extra" digit) > via > $SMS_CENTER=the national message center server for sending messages > > $MESSAGE= the message text > > How is the .call file organized? > > > 2) When an SMS is received from $SMS_CENTER2, how to get the $MESSAGE from > it? > > using > > exten => s/${SMS_CENTER2},NoOp(${CALLERID}) > exten => wait, answer > > then? > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
Hi Stefan & co,> I second the request for some config info. I've read > everything I could find on this and it wasn't enough. I'm > still missing some basic concept.As I seem to be the third 'mee too'-cry for SMS-help, may I beg you for updating the asterisk+SMS page in the wiki with a basic working configuration? That would be very useful for us 'still-fighting' people ;-) Stefan -- Stefan M?rkle Netpioneer GmbH Leitender Systemarchitekt Beiertheimer Allee 18 <stefan.maerkle@netpioneer.de> 76137 Karlsruhe
B G wrote:> I have two phone lines, one for Asterisk and one for the SMS enabled > fixned phone. I also config the fixed phone to have the SMS Center > number as the phone number for Asterisk.This may be a dumb suggestion, but do you have CLI enabled on your phone line ? I read somewhere that some phones look for the CLI, before deciding its a data (sms) call. Also, what happens when you send an SMS from asterisk the the phone ? 1. Does it just keep ringing ? 2. If you pick up the phone, do you hear some tones ? Your question is of great interest to me. If you do find a solution, I urge you to please update the Wiki pages. Thanks Shahed
In extensions.conf
[smsdial]
exten = _X.,1,SMS(${CALLERIDNUM},,${EXTEN},${CALLERIDNAME})
exten = _X.,2,SMS(${CALLERIDNUM})
exten = _X.,3,Hangup
[local]
exten => 077777,1,wait(1)
exten => 077777,2,Answer
exten => 077777,3,GotoIf($[foo${CALLERIDNUM} = foo]?12:4)
exten => 077777,4,GotoIf($[${CALLERIDNUM:0:10} = 8005875290]?9:5) //this is
the number sms text messages come from
exten => 077777,5,system(play /var/lib/asterisk/sounds/ring3.wav -v3 &)
exten => 077777,6,Playback(welcome)
exten => 077777,7,musiconhold
exten => 077777,8,Hangup
exten => 077777,9,SMS(${EXTEN:3},a)
exten => 077777,10,System(/usr/lib/asterisk/smsin ${EXTEN:3})
exten => 077777,11,Hangup
exten => 077777,12,system(play /var/lib/asterisk/sounds/uh-uhhh.wav -v1
&)
exten => 077777,13,Wait(1)
exten => 077777,14,Playback(withheld)
exten => 077777,15,Hangup
I have a PHP program to send the messages
$timeout = 7500;
$socket = fsockopen("10.0.0.99","5038", $errno,
$errstr,
$timeout);
if ($socket)
{
fputs($socket, "Action: Login\r\n");
fputs($socket, "UserName: manageruser\r\n"); // must be
defined
in manager.conf
fputs($socket, "Secret: mysecretpassword\r\n\r\n");
fputs($socket, "Action: Originate\r\n");
fputs($socket, "callerid: " . $your_text_message .
"<$your_sending_number>\r\n"); // your sending number
fputs($socket, "exten: " . $mobile_number .
"\r\n");
fputs($socket, "Channel: Zap/g1/147017094009\r\n"); //this
is
the bt message center
fputs($socket, "Context: smsdial\r\n");
fputs($socket, "Priority: 1\r\n\r\n");
}
incoming messages go into /var/spool/asterisk/sms/sc-me.777
i had to register with BT first by sending a blank message to telephone
number 00000
----- Original Message -----
From: "Wilson Pickett" <spamsucks2005@gmail.com>
To: "Asterisk Users Mailing List - Non-Commercial Discussion"
<asterisk-users@lists.digium.com>
Sent: Sunday, December 19, 2004 7:41 PM
Subject: [Asterisk-Users] SMS - how to send one
> I've read quite a bit in the older mailing list posts and the wiki but
> I'm missing some simple point.
>
> 1) What is required to send an SMS to a mobile outside the office given:
>
> Channel: ZAP/1
> send it to $SMS_RECIPIENT (which includes the final "extra"
digit)
> via
> $SMS_CENTER=the national message center server for sending messages
>
> $MESSAGE= the message text
>
> How is the .call file organized?
>
>
> 2) When an SMS is received from $SMS_CENTER2, how to get the $MESSAGE from
> it?
>
> using
>
> exten => s/${SMS_CENTER2},NoOp(${CALLERID})
> exten => wait, answer
>
> then?
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users@lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>