--alcatel-mseq-melody-file-send MSEQ-melody encapsulation implemented
authorshort <>
Fri, 4 Jan 2002 12:06:07 +0000 (12:06 +0000)
committershort <>
Fri, 4 Jan 2002 12:06:07 +0000 (12:06 +0000)
GSM/examples/commandline/gsmcmd

index 79d71d0..9fda42e 100755 (executable)
@@ -26,16 +26,18 @@ my $opt_ems_animation_send;
 my $opt_alcatel_name;
 my $opt_alcatel_picture_send;
 my $opt_alcatel_animation_send;
+my $opt_alcatel_mseq_melody_file_send;
 GetOptions( 
-       "v|verbose"                => \$opt_verbose,
-       "transport:s"              => \$opt_transport,
-       "ring-send:s"              => \$opt_ring_send,
-       "logo-group-send:s"        => \$opt_logo_group_send,
-       "ems-picture-send:s"       => \$opt_ems_picture_send,
-       "ems-animation-send:s"     => \$opt_ems_animation_send,
-       "alcatel-name:s"           => \$opt_alcatel_name,
-       "alcatel-picture-send:s"   => \$opt_alcatel_picture_send,
-       "alcatel-animation-send:s" => \$opt_alcatel_animation_send,
+       "v|verbose"                       => \$opt_verbose,
+       "transport:s"                     => \$opt_transport,
+       "ring-send:s"                     => \$opt_ring_send,
+       "logo-group-send:s"               => \$opt_logo_group_send,
+       "ems-picture-send:s"              => \$opt_ems_picture_send,
+       "ems-animation-send:s"            => \$opt_ems_animation_send,
+       "alcatel-name:s"                  => \$opt_alcatel_name,
+       "alcatel-picture-send:s"          => \$opt_alcatel_picture_send,
+       "alcatel-animation-send:s"        => \$opt_alcatel_animation_send,
+       "alcatel-mseq-melody-file-send:s" => \$opt_alcatel_mseq_melody_file_send,
 );
 
 unless ( @ARGV ) {
@@ -48,6 +50,7 @@ Usage: $0 [--verbose] [--transport=<transport.conf>]
        [--alcatel-name=<resource name>]
        [--alcatel-picture-send=<image file>]
        [--alcatel-animation-send=<image file>]
+       [--alcatel-mseq-melody-file-send=<MSEQ file>]
        <phone numbers>...
 EOT
        exit(1);
@@ -113,6 +116,15 @@ for $msisdn (@ARGV) {
                $udh->[0]{"name"}=$opt_alcatel_name if defined $opt_alcatel_name;
                $nbs->sendsms($msisdn, $msg, udh=>$udh);
        }
+
+       if ($opt_alcatel_mseq_melody_file_send) {
+               local (*F);
+               open F, $opt_alcatel_mseq_melody_file_send;
+               my $mseq_melody_file_data = <F>;
+               close F;
+               my ($msg, $udh) = GSM::SMS::NBS::Alcatel->alcatel_mseq_melody_file($mseq_melody_file_data);
+               $nbs->sendsms($msisdn, $msg, udh=>$udh);
+       }
 }
 
 exit(0);