[Asterisk-Users] * -> SMS w/out PSTN (dialplan confusion)

Mark Charlton asterisk at mcwebtree.com
Thu Mar 24 16:03:33 MST 2005


Hi

I tried to setup this system, and tried to follow their, bayhamsystems,
instructions for installing the app version of the util, but there was no
makefile.patch in the apps source folder so that failed, (I don't really
understand the make business on linux anyway), so I tried to use the perl
AGI version. My query about priority would apply to all sms providers I
assume.

I installed and configured the perl script as instructed, then came to set
up the dialplan.  My dial plan is below, based on the one from bayhamsystems
at http://www.bayhamsystems.com/asterisk.html.  I couldn't figure out how
theirs worked as if you hung up after leaving the voicemail their call to
the AGI script never executed, so I modified it as below.

However I have problems that I don't understand.

1) on h,1 the hasnewvoicemail command should add 101 to the priority, what
does it do if there is no mail? What does priority h,2 do? They had it going
to the equivilent of priority +98. Is that just so it hangs up if it gets an
invalid priority goto?  The wiki entry on hasnewvoicemail is very quiet on
what happens if there is no newmail.

2) if a caller left a voicemail, then the hasnewvoicemail returned true and
went to h2,102 however if the second caller rang, and hung up BEFORE leaving
a message, since the first callers message was still waiting, another call
to the AGI was made, to notify me of a message I was already aware of,
(incuring extra cost).  I changed the voicemail.conf to
attach=yes|delete=yes, (since I was emailing the vm anyway), and now the
hasnewvoicemail always returns false. Please suggest any alternative
approaches.

3) the AGI returns with exit code 0 as in completed successfully, however I
don't see any texts, nor does my credit count decrease at bayhamsystem
account mangement page.  However a test message sent from their web site
arrived at my phone within 2 minutes of being sent.

;;;;;;;
;; snip from dial plan
;;;;;;;
exten => 0,1,goto(sales|s|1)

exten => _[123],1,SetVar(dialed_extn=${EXTEN})
exten => _[123],2,Dial(SIP/200&SIP/202|2|m)
exten => _[123],3,Playback,hold1
exten => _[123],4,Dial(SIP/200&SIP/202|2|m)
exten => _[123],5,playback,all-busy
exten => _[123],6,Voicemail(30${EXTEN})
exten => _[123],7,playback,thank-call
exten => _[123],8,Hangup

exten => h,1,HasNewVoiceMail(30${dialed_extn})
exten => h,2,goto(h,100)
exten => h,102,DeadAGI(fastsms|447803xxxxxx|Caller ${CALLERID} left a new
voice mail at ${DATETIME} on Sales extn ${dialed_extn)|asterisk)
exten => h,103,Hangup

-----Original Message-----
From: William Suffill

http://www.bayhamsystems.com/ has a app for sending SMS with asterisk.
Don't know how their prices stack up for the UK though.





More information about the asterisk-users mailing list