Sponsored Content
Top Forums Shell Programming and Scripting Need shell script for SMS via telnet command Post 302888621 by wasay on Sunday 16th of February 2014 05:19:38 AM
Old 02-16-2014
Blade Need shell script for SMS via telnet command

I am not very much familiar with telnet based scripting so I would need your help to directly submitting sms as deliver_sm or submit_sm msg to SMSC (IP & system_id and password are already known). So, need your help to provide such script. I previously used such script but my harddisk crashed and now I don't have any such clue how it runs. Only I remember that I have predefined format of system_id and password and SMSC IP&port.

When we run script, it calls its config file with such info and make telnet request and input predefined values to that SMSC IP & port and then it submits that msg.

I have searched many posts sending sms in email, but I don't want that and I also don't want to use any unix utilities (eg, smsclient/kannel/etc), I need direct telnet IP port and sms parameters & text related code.
Kindly help me about such code. Thanks.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

telnet & su in shell script

Hi, Any scripting experts out there that can point me to the right direction of writing a script using telnet and su to access a server without any users interaction such as login and entering passwd. Thanks. Thanks in advance vastare (1 Reply)
Discussion started by: vastare
1 Replies

2. UNIX for Advanced & Expert Users

Unix shell Script To Send SMS

hi , can anyone help with a script to send SMS to some mobile numbers on some conditions. (1 Reply)
Discussion started by: sdcoms
1 Replies

3. Solaris

using shell script to telnet

I would like to log into a server read a certain file and get the results back. I have tried like below to no avail; #!/bin/ksh -x ( sleep 2 echo sdpuser sleep 2 echo cs3reloaded sleep 5 cd /export/home/scripts/daily_checks sleep 5 head daily_check_report.txt > test160108.txt exit )... (6 Replies)
Discussion started by: ricky katix
6 Replies

4. HP-UX

sending sms through shell script

pl. if any one can help me in this . i wouldlike to know if there is a way to send sms through unix box. i have tried using mailx option. but what type of servers will be required . if any one can give me references... Thankxs in advance Regards, Alpa (1 Reply)
Discussion started by: alpareshamwala
1 Replies

5. Shell Programming and Scripting

usage of telnet in shell script

Hi All, How could I use telnet to connect to Primary Host in the below shell script: Could I use: ( echo user sleep 2 echo password sleep 2 echo "ls ~" sleep 2 echo "exit" ) | telnet hostname ... (1 Reply)
Discussion started by: a1_win
1 Replies

6. Shell Programming and Scripting

Telnet using shell script

Hi I need to telnet a device with IP Address and port. After logging in, I need to execute some commands in that device. Please find the example below telnet 170.10.11.1 2100 #170.10.11.1 is the IP address. 2100 is the Port after telnet, the device will show the command prompt as : ... (2 Replies)
Discussion started by: sudharsan23
2 Replies

7. Shell Programming and Scripting

Need help on setting up New shell script for sending SMS

Hello guys, I have been given a task to set up a new shell script, which needs to trigger the SMS(Short Messaging Service) to the phone numbers if an event occurs like filesystem goes beyond the threshold value of 70%. I am having the script to send a mail to recipients if that incident happens... (3 Replies)
Discussion started by: vpraveenn
3 Replies

8. Shell Programming and Scripting

Using telnet in my shell script

Hello Guys, I have a linux server where I already logged in, once logged in, i telnet to local host using some dedicated port and do some action. This I can easily do manually. Since I need to fire a lot requests so I would like to optimize it using a shell script to avoid telnetting each... (3 Replies)
Discussion started by: umarsatti
3 Replies

9. Shell Programming and Scripting

Sending sms through Shell script

Can anyone please help me to in scripting of sending sms through shell script (1 Reply)
Discussion started by: gargidas15
1 Replies

10. UNIX for Advanced & Expert Users

Need shell script for SMS via telnet command to SMSC directly

I am not very much familiar with telnet based scripting so I would need your help to directly submitting sms as deliver_sm or submit_sm msg to SMSC (IP & system_id and password are already known). So, need your help to provide such script. I previously used such script but my harddisk crashed and... (0 Replies)
Discussion started by: wasay
0 Replies
Device::Gsm::Sms(3pm)					User Contributed Perl Documentation				     Device::Gsm::Sms(3pm)

NAME
Device::Gsm::Sms - SMS message internal class that represents a single text SMS message SYNOPSIS
# A list of Device::Gsm::Sms messages is returned by # Device::Gsm messages() method. use Device::Gsm; ... @sms = $gsm->messages(); if( @sms ) { foreach( @sms ) { print $msg->storage() , " "; print $msg->recipient() , " "; print $msg->sender() , " "; print $msg->content() , " "; print $msg->time() , " "; print $msg->type() , " "; } } # Or you can instance a sms message from raw PDU data my $msg = new Device::Gsm::Sms( header => '+CMGL: ...', pdu => `[encoded pdu data]', storage=> 'ME', # or 'SC' ); if( defined $msg ) { print $msg->recipient() , " "; print $msg->sender() , " "; print $msg->content() , " "; # or $msg->text() print $msg->time() , " "; print $msg->type() , " "; } $msg->delete(); DESCRIPTION
"Device::Gsm::Sms" class implements very basic SMS message object, that can be used to decode "+CMGL" GSM command response to build a more friendly high-level object. METHODS
The following is a list of methods applicable to "Device::Gsm::Sms" objects. content() See text() method. decode() Starts the decoding process of pdu binary data. If decoding process ends in success, return value is true and sms object is filled with all proper values. If decoding process has errors or pdu data is not provided, return value is 0 (zero). delete() Delete the current SMS message from sim card. Example: $gsm = Device::Gsm->new(); ... my @msg = $gsm->messages(); $msg[0] && $msg[0]->delete(); new() Basic constructor. You can build a new "Device::Gsm::Sms" object from the raw +CMGL header and PDU data. Those data is then decoded and a new sms object is instanced and all information filled, to be available for subsequent method calls. The allowed parameters to new() method are: header This is the raw +CMGL header string as modem outputs when you issue a +CMGL command pdu Binary encoded sms data storage Tells which storage to delete the message from. Check the documentation of your phone to know valid storage values. Default values are: "ME" Deletes messages from gsm phone memory. "SC" Deletes messages from sim card. index() Returns the sms message index number, that is the position of message in the internal device memory or sim card. This number is used for example to delete the message. my $gsm = Device::Gsm->new(port=>'/dev/ttyS0'); ... my @messages = $gsm->messages(); ... # Delete the first returned message my $msg = shift @messages; $gsm->delete_sms( $msg->index() ); recipient() Returns the sms recipient number (destination address = DA) as string (ex.: +39012345678). sender() Returns the sms sender number (originating address = OA) as string. status() Status of the message can be one value from the following list: storage() Returns the storage where SMS has been read from. text() Returns the textual content of sms message. token() Returns the given PDU token of the decoded message (internal usage). type() SMS messages can be of two types: SMS_SUBMIT and SMS_DELIVER, that are defined by two constants with those names. type() method returns one of these two values. Example: if( $sms->type() == Device::Gsm::Sms::SMS_DELIVER ) { # ... } elsif( $sms->type() == Device::Gsm::Sms::SMS_SUBMIT ) { # ... } REQUIRES
o Device::Gsm EXPORTS
None TODO
o Complete and proof-read documentation and examples COPYRIGHT
Device::Gsm::Sms - SMS message simple class that represents a text SMS message Copyright (C) 2002-2009 Cosimo Streppone, cosimo@cpan.org This program is free software; you can redistribute it and/or modify it only under the terms of Perl itself. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Perl licensing terms for details. AUTHOR
Cosimo Streppone, cosimo@cpan.org SEE ALSO
Device::Gsm, perl(1) perl v5.14.2 2012-03-08 Device::Gsm::Sms(3pm)
All times are GMT -4. The time now is 02:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy