From: Frank Brehm Date: Sat, 19 Aug 2006 13:07:26 +0000 (+0000) Subject: Angabe der SMS-Zentrale in der Konfiguration X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=6dff3ea9249c5ce7adab95d3a2a8fd38fb00d91e;p=scripts%2Fsolaris.git Angabe der SMS-Zentrale in der Konfiguration --- diff --git a/smsd.conf.default b/smsd.conf.default index 68ae132..a8b2102 100644 --- a/smsd.conf.default +++ b/smsd.conf.default @@ -83,4 +83,6 @@ User sms # Number of Inboxfolder in Mobilephone (Nokia 6310: 1 for SIM-Inbox, 3 for Phone-Inbox) #InboxFolderNr 1 + # Number of the SMS-Central +#SMSC +491722270333 diff --git a/smsd.pl b/smsd.pl index 42ac4a7..5f3970a 100755 --- a/smsd.pl +++ b/smsd.pl @@ -149,6 +149,8 @@ my $childs = 0; my $zombies = 0; my $timeout = 30; +my $smsc = undef; + my ( $help, $show_version, $cmdline_verbose, $signal_name, $i ); my $o_inbox = 1; my $o_outbox = 1; @@ -830,7 +832,7 @@ sub perform_send( $ ) { my $sms = shift; my ( @EMailRcpt, @R, @S ); - my ( $rec, $CmdLine, $smsc, $res, $mail_subject, $out, $gammu_pid ); + my ( $rec, $CmdLine, $used_smsc, $res, $mail_subject, $out, $gammu_pid ); my $rcpt = $sms->{'header'}->recipient(); my $emails = $sms->{'header'}->confirmemailaddress() || @@ -844,9 +846,9 @@ sub perform_send( $ ) { '-autolen' => $maxlen, '-validity' => 'MAX', ); - $smsc = $sms->{'header'}->smscnumber() || $sms->{'header'}->smsc(); - push @Params, '-smscnumber' => $smsc if $smsc; - #$params .= sprintf( " -smscnumber %s", $smsc ) if $smsc; + $used_smsc = $sms->{'header'}->smscnumber() || $sms->{'header'}->smsc() || $smsc; + push @Params, '-smscnumber' => $used_smsc if $used_smsc; + #$params .= sprintf( " -smscnumber %s", $used_smsc ) if $used_smsc; if ( $emails ) { @@ -1179,6 +1181,7 @@ sub read_config() { 'maxlength' => 1500, 'countlocations' => 20, 'inboxfoldernr' => 1, + 'smsc' => '', }; if ( -r $config_file ) { @@ -1365,6 +1368,8 @@ sub read_config() { $syslog_facility = $config{'syslogfacility'}; $syslog_ident = $config{'syslogidentification'}; + $smsc = $config{'smsc'} ? $config{'smsc'} : undef; + %config = (); undef $defaults;