Re: [Asterisk-Users] SMS - how to send one

2004-12-30 Thread Gary Ruddock (Swift Drinks)
In extensions.conf
[smsdial]
exten = _X.,1,SMS(${CALLERIDNUM},,${EXTEN},${CALLERIDNAME})
exten = _X.,2,SMS(${CALLERIDNUM})
exten = _X.,3,Hangup
[local]
exten = 07,1,wait(1)
exten = 07,2,Answer
exten = 07,3,GotoIf($[foo${CALLERIDNUM} = foo]?12:4)
exten = 07,4,GotoIf($[${CALLERIDNUM:0:10} = 8005875290]?9:5)  //this is 
the number sms text messages come from
exten = 07,5,system(play /var/lib/asterisk/sounds/ring3.wav -v3 )
exten = 07,6,Playback(welcome)
exten = 07,7,musiconhold
exten = 07,8,Hangup

exten = 07,9,SMS(${EXTEN:3},a)
exten = 07,10,System(/usr/lib/asterisk/smsin ${EXTEN:3})
exten = 07,11,Hangup
exten = 07,12,system(play /var/lib/asterisk/sounds/uh-uhhh.wav -v1 )
exten = 07,13,Wait(1)
exten = 07,14,Playback(withheld)
exten = 07,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 0


- Original Message - 
From: Wilson Pickett [EMAIL PROTECTED]
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
___
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


Re: [Asterisk-Users] SMS - how to send one

2004-12-21 Thread B G
Hello,

I am trying to exchange SMS between a fixed phone and an Asterisk. The
intention is to make the Asterisk become a SMS Center, because we do
not have public SMS Center in our country.

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.

Currently, I can send SMS from the fixed phone to Asterisk. However, I
cannot send SMS from Asterisk to the phone. I try a lot but the fixed
phone does not answer the Asterisk when the Asterisk rings the phone.

A friend of mine told me that the signal for SMS communication is
different from the signal for voice communication. If the sms_app and
Asterisk are not compatible with the PSTN network, Asterisk cannot
send SMS signals to the phone, then the phone cannot detect an
incoming SMS. That is why it does not answer an incoming SMS from
Asterisk because it thinks that incoming SMS is a normal phone.

Does anyone have any hint for me for this problem? Is there any
special requirement for Asterisk and fixed phones to exchange SMS
through normal PSTN?

Thanks a lot
Hoa Nguyen
___
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


Re: [Asterisk-Users] SMS - how to send one

2004-12-21 Thread Shahed
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
___
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


AW: [Asterisk-Users] SMS - how to send one

2004-12-21 Thread Gutzke Klaus
Is it possible to use the sms_app over zap without the .call file?

I tried the example with zap behind a hipath. Reciving a SMS works fine, but if 
i send an SMS using the .call file i recive an SMS without a message. 
Why didn't you use the lines?
Application: SMS
Data: default,,MOBILE NUMBER,MESSAGE TO SEND
You didn't need the smsdial context that way!!!

-Ursprüngliche Nachricht-
Von: Stefan Reuter [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 20. Dezember 2004 08:41
An: Asterisk Users Mailing List - Non-Commercial Discussion
Betreff: Re: [Asterisk-Users] SMS - how to send one


 I realize that the most interesting aspect for some is to talk back
 and forth between phone and asterisk on the local server which is
 nice too.

yes i almost forgot about that one. app_sms can also act as a message
center itself: so if you connect some sms capable fixed line phone to
asterisk you can send sms messages to and receive messages from that
phone.

 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.

ok. the best resource is probably the wiki 
http://www.voip-info.org/tiki-index.php?page=Asterisk%20cmd%20Sms
- but i am sure you already got that.
I am using asterisk-1.0.2 with the following config:

extensions.conf:

[capi-in]
exten = s/01930100,1,NoOp(incoming sms ${CALLERIDNUM})
exten = s/01930100,2,Answer
exten = s/01930100,3,Wait(2)
exten = s/01930100,4,SMS(default,a)
exten = s/01930100,5,Hangup
...

[smsdial]
exten = _X.,1,SMS(default,,${EXTEN},${MSG})
exten = _X.,2,SMS(default)
exten = _X.,3,Hangup
exten = h,1,Hangup

The [capi-in] context is the context where i send all my incoming calls
from pots to. Based on the callerid (01930100 is the callerid the t-com
message center sends, see list in wiki) incoming sms messages are
detected and send to app_sms in answer mode. (Note the wait(2) which is
really needed in order to allow the message center to catch up)

The [smsdial] context is used for sending outgoing sms messages.
To send messages i am using a small perl script that places a .call file
into /var/spool/asterisk/outgoing with the following content:

Channel: CAPI/MY MSN:bNUMBER OF MESSAGE CENTER, i.e. 0193010
MaxRetries: 2
RetryTime: 60
WaitTime: 30
Context: smsdial
Extension: MOBILE NUMBER
Priority: 1
SetVar: MSG=MESSAGE TO SEND

You will find the perl script attached but be warned it is not ready for
production as it doesn't do any input validation!

 I will be asking French Telecom to enable SMS on our fixed line today
 (and we'll see if that stops the nice lady from reading hello world
 with a French accent) Fixed line SMS has been advertised for at least
 a year here.

Thats what i did here, too. So german telecom knows i dont like that
lady, but any other mobile providers still talk to me.

stefan
___
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


Re: AW: [Asterisk-Users] SMS - how to send one

2004-12-21 Thread Stefan Reuter
On Tue, 2004-12-21 at 17:05 +0100, Gutzke Klaus wrote:
 Is it possible to use the sms_app over zap without the .call file?

in newer versions of asterisk there is smsq - a tool that sends sms from
the command line.
see the wiki at http://www.voip-info.org/wiki-Asterisk+cmd+Sms

 I tried the example with zap behind a hipath. Reciving a SMS works fine, but 
 if i send an SMS using the .call file i recive an SMS without a message. 
 Why didn't you use the lines?
 Application: SMS
 Data: default,,MOBILE NUMBER,MESSAGE TO SEND
 You didn't need the smsdial context that way!!!

you can go without that context but then you have to create too calls.
The context contains:

exten = _X.,1,SMS(default,,${EXTEN},${MSG})
exten = _X.,2,SMS(default)
exten = _X.,3,Hangup

The first call to SMS queues the message and the second one actually
sends it.
AFAIK you can't run two commands (applications) within a call file.
Nevertheless if you don't need an officially released version of
asterisk go for CVS head and use smsq.

stefan

___
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


Re: [Asterisk-Users] SMS - how to send one

2004-12-20 Thread Stefan Märkle
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
[EMAIL PROTECTED]  76137 Karlsruhe 
___
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


Re: [Asterisk-Users] SMS - how to send one

2004-12-20 Thread Wilson Pickett
 [capi-in]
 exten = s/01930100,1,NoOp(incoming sms ${CALLERIDNUM})
 exten = s/01930100,2,Answer
 exten = s/01930100,3,Wait(2)
 exten = s/01930100,4,SMS(default,a)
 exten = s/01930100,5,Hangup

Where does the received message go?

 [smsdial]
 exten = _X.,1,SMS(default,,${EXTEN},${MSG})
 exten = _X.,2,SMS(default)
 exten = _X.,3,Hangup
 exten = h,1,Hangup

 Channel: CAPI/MY MSN:bNUMBER OF MESSAGE CENTER, i.e. 0193010

I'm using ZAP. What is MY MSN ? and b: ?

If the message center number was 01234567890 what would that line be using ZAP ?

thx
___
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


Re: [Asterisk-Users] SMS - how to send one

2004-12-20 Thread Mike Dent
Whilst not being part of Asterisk, I've used this in the past:
http://www.smsclient.org/
Seemed to work well.

Mike
___
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


Re: [Asterisk-Users] SMS - how to send one

2004-12-20 Thread Stefan Reuter
  exten = s/01930100,4,SMS(default,a)
 Where does the received message go?

it goes to the default queue, that is a file in 
/var/spool/asterisk/sms/sc-me.default (meaning service center to me, default 
queue).

  Channel: CAPI/MY MSN:bNUMBER OF MESSAGE CENTER, i.e. 0193010
 
 I'm using ZAP. What is MY MSN ? and b: ?
 If the message center number was 01234567890 what would that line be using 
 ZAP ?
then you dont need a msn...
when using ZAP I suppose its something like Channel: Zap/r1/01234567890
the normal syntax for dialing out

stefan
-- 
stefan reuter

[EMAIL PROTECTED], http://www.reucon.de, phone: 0700 88 REUTER
neusserstr. 110, d-50670 koeln, germany, fax: 0221 9723872

   pgp key 1024D/9A1FA605 http://www.reucon.de/pgp.asc
   2C89 AA8A 956F 5E7E A5F6   D397 4D46 7B5D 9A1F A605

___
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


AW: [Asterisk-Users] SMS - how to send one

2004-12-20 Thread Gutzke Klaus
Is it possible to get a conf.-example?

-Ursprüngliche Nachricht-
Von: Stefan Reuter [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 20. Dezember 2004 00:40
An: Asterisk Users Mailing List - Non-Commercial Discussion
Betreff: Re: [Asterisk-Users] SMS - how to send one


  Um, sorry, but if SMS is not for sending to mobile phones, then what is it
  for (if it matters, I'm not in the US) ?

i am in germany and use app_sms to send sms messgaes to mobile phones.
app_sms does not talk directly to mobile phones but to the sms message
center that in turn sends the sms to the mobile.
sending sms works very well to all mobile networks (i use it for
notification of voicemail new messages). receiving incoming sms is a bit
more tricky as you have to send a sms message from your mobile to a non
mobile number and some providers will use text to speech to read the
contents of the message if they detect a fixed line number as
destination number. therefore receiving sms works only if the sender
uses t-online or a fixed line phone via deutsche telekom.

hope that helps

stefan

___
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
___
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


[Asterisk-Users] SMS - how to send one

2004-12-19 Thread Wilson Pickett
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
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


RE: [Asterisk-Users] SMS - how to send one

2004-12-19 Thread Brian West
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: [EMAIL PROTECTED] [mailto:asterisk-users-
 [EMAIL PROTECTED] 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
 [EMAIL PROTECTED]
 http://lists.digium.com/mailman/listinfo/asterisk-users
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] SMS - how to send one

2004-12-19 Thread Antony Stone
On Sunday 19 December 2004 20:18, Brian West wrote:

 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.

Um, sorry, but if SMS is not for sending to mobile phones, then what is it for 
(if it matters, I'm not in the US) ?

Regards,

Antony.

-- 
Linux is going to be part of the future. It's going to be like Unix was.

 - Peter Moore, Asia-Pacific general manager, Microsoft

 Please reply to the list;
   please don't CC me.
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] SMS - how to send one

2004-12-19 Thread William Suffill
between asterisk boxes and fixed line SMS I believe but never was 100%
sure on this either.
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] SMS - how to send one

2004-12-19 Thread Antony Stone
On Sunday 19 December 2004 21:35, Antony Stone wrote:

 On Sunday 19 December 2004 20:18, Brian West wrote:
  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.

 Um, sorry, but if SMS is not for sending to mobile phones, then what is it
 for (if it matters, I'm not in the US) ?

Apologies for replying to my own posting, but a bit more digging has left me 
even more puzzled - I'm not using SMS yet, but I do plan to, and links such 
as http://lists.digium.com/pipermail/asterisk-cvs/2004-April/001843.html 
http://www.voip-info.org/wiki-Asterisk+cmd+Sms and  
http://www.aaisp.net.uk/aa/sms.html all seem to suggest that it can do what I 
want (and hope) - send  receive text messages to/from standard mobile 
phones.

Am I deluded in this hope?

Antony.

-- 
These clients are often infected by viruses or other malware and need to be 
fixed.  If not, the user at that client needs to be fixed...

 - Henrik Nordstrom, on Squid users' mailing list

 Please reply to the list;
   please don't CC me.
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] SMS - how to send one

2004-12-19 Thread Stefan Reuter
  Um, sorry, but if SMS is not for sending to mobile phones, then what is it
  for (if it matters, I'm not in the US) ?

i am in germany and use app_sms to send sms messgaes to mobile phones.
app_sms does not talk directly to mobile phones but to the sms message
center that in turn sends the sms to the mobile.
sending sms works very well to all mobile networks (i use it for
notification of voicemail new messages). receiving incoming sms is a bit
more tricky as you have to send a sms message from your mobile to a non
mobile number and some providers will use text to speech to read the
contents of the message if they detect a fixed line number as
destination number. therefore receiving sms works only if the sender
uses t-online or a fixed line phone via deutsche telekom.

hope that helps

stefan

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] SMS - how to send one

2004-12-19 Thread Socrates Varakliotis
Could you (or anyone else who got SMS working) please send some config files?
--
Socrates.


On Sun, 19 Dec 2004 23:39:45 +, Stefan Reuter [EMAIL PROTECTED] wrote:
   Um, sorry, but if SMS is not for sending to mobile phones, then what is it
   for (if it matters, I'm not in the US) ?
 
 i am in germany and use app_sms to send sms messgaes to mobile phones.
 app_sms does not talk directly to mobile phones but to the sms message
 center that in turn sends the sms to the mobile.
 sending sms works very well to all mobile networks (i use it for
 notification of voicemail new messages). receiving incoming sms is a bit
 more tricky as you have to send a sms message from your mobile to a non
 mobile number and some providers will use text to speech to read the
 contents of the message if they detect a fixed line number as
 destination number. therefore receiving sms works only if the sender
 uses t-online or a fixed line phone via deutsche telekom.
 
 hope that helps
 
 stefan
 
 ___
 Asterisk-Users mailing list
 [EMAIL PROTECTED]
 http://lists.digium.com/mailman/listinfo/asterisk-users
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
 


-- 
Socrates.
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] SMS - how to send one

2004-12-19 Thread Wilson Pickett
 i am in germany and use app_sms to send sms messgaes to mobile phones.
 app_sms does not talk directly to mobile phones but to the sms message
 center that in turn sends the sms to the mobile.
 sending sms works very well to all mobile networks

Stefan,

I am in Europe too and all I have read about SMS() leads me to believe
it is indeed for sending SMS to fixed line AND mobile phones through
the SMS server your national phone co provides. I realize that the
most interesting aspect for some is to talk back and forth between
phone and asterisk on the local server which is nice too.

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.

 receiving incoming sms is a bit
 more tricky as you have to send a sms message from your mobile to a non
 mobile number and some providers will use text to speech to read the
 contents of the message if they detect a fixed line number as
 destination number. therefore receiving sms works only if the sender

I will be asking French Telecom to enable SMS on our fixed line today
(and we'll see if that stops the nice lady from reading hello world
with a French accent) Fixed line SMS has been advertised for at least
a year here.
___
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


Re: [Asterisk-Users] SMS - how to send one

2004-12-19 Thread Stefan Reuter
 I realize that the most interesting aspect for some is to talk back
 and forth between phone and asterisk on the local server which is
 nice too.

yes i almost forgot about that one. app_sms can also act as a message
center itself: so if you connect some sms capable fixed line phone to
asterisk you can send sms messages to and receive messages from that
phone.

 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.

ok. the best resource is probably the wiki 
http://www.voip-info.org/tiki-index.php?page=Asterisk%20cmd%20Sms
- but i am sure you already got that.
I am using asterisk-1.0.2 with the following config:

extensions.conf:

[capi-in]
exten = s/01930100,1,NoOp(incoming sms ${CALLERIDNUM})
exten = s/01930100,2,Answer
exten = s/01930100,3,Wait(2)
exten = s/01930100,4,SMS(default,a)
exten = s/01930100,5,Hangup
...

[smsdial]
exten = _X.,1,SMS(default,,${EXTEN},${MSG})
exten = _X.,2,SMS(default)
exten = _X.,3,Hangup
exten = h,1,Hangup

The [capi-in] context is the context where i send all my incoming calls
from pots to. Based on the callerid (01930100 is the callerid the t-com
message center sends, see list in wiki) incoming sms messages are
detected and send to app_sms in answer mode. (Note the wait(2) which is
really needed in order to allow the message center to catch up)

The [smsdial] context is used for sending outgoing sms messages.
To send messages i am using a small perl script that places a .call file
into /var/spool/asterisk/outgoing with the following content:

Channel: CAPI/MY MSN:bNUMBER OF MESSAGE CENTER, i.e. 0193010
MaxRetries: 2
RetryTime: 60
WaitTime: 30
Context: smsdial
Extension: MOBILE NUMBER
Priority: 1
SetVar: MSG=MESSAGE TO SEND

You will find the perl script attached but be warned it is not ready for
production as it doesn't do any input validation!

 I will be asking French Telecom to enable SMS on our fixed line today
 (and we'll see if that stops the nice lady from reading hello world
 with a French accent) Fixed line SMS has been advertised for at least
 a year here.

Thats what i did here, too. So german telecom knows i dont like that
lady, but any other mobile providers still talk to me.

stefan


mail2sms.pl
Description: Perl program
___
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