BB Unix Network Monitor - Message
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: {bb} BB sms variables empty
On Tue, 2006-01-17 at 12:11, gerric wrote:
> Hello All
>
> I seem to be having a problem trying to include the variables in a sms
> message. I am using the BulkSMS http api to send a message from the bb
> to some users this is the command
>
> /usr/bin/lynx -dump "http://www.bulksms.co.uk:7512/eapi/1.0/
> send_sms.mc?username=<uname>&password=<password>&message=$BBNUMERIC+
> $BBSVCNAME+$BBCOLORLEVEL+$BBHOSTSVC+Test&msisdn=<mynumber>&sender=
> Big_Brother&cost_route=<route>&want_report=1" 1>bbsms2.log
> 2>bbsms2error.log
>
> I have placed this line in the bin/sendmsg file so that it sends a
> message every time there is an alert for a specific degree. I receive
> the sms fine but it only contains the word Test, none of the variable
> info is included in the SMS. Shouldn't these variables and their info be
> accessible from all the scripts bb runs? Should I include this line in a
> different file so that i can receive the variable info?
The bin/sendmsg wrapper script does not appear to have (or need)
access to those environment variables. The required data is supplied
on the command line.
You could modify that script to split the message and process the
information in the way you want, but I don't think that it will
include all the bits that you want. A better option would probably
be to use a custom paging script. They do have access to those
environment variables and should provide you with the maximum
flexibility.
On a related note, if you are going to include variable names
within a larger string (without spaces around it), you should
probably use braces (curly brackets) to prevent confusion. Some
other characters will terminate a variable name, but it's very
easy to end up with bugs that are difficult to trace.
Cheers, Phil.
--
By the time they had diminished from 50 to 8, the other dwarves
began to suspect 'Hungry.' (Gary Larson, "The Far Side")
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list
send e-mail to mailto:majordomo@bb4.com with unsubscribe bb -and/or-
subscribe bb-digest in the BODY of the message.
Home |
Main Index |
Thread Index