my $opt_ems_force_variable;
my $opt_ems_picture_send;
my $opt_ems_animation_send;
+my $opt_ems_melody_file_send;
my $opt_alcatel_name;
my $opt_alcatel_picture_send;
my $opt_alcatel_animation_send;
"ems-force-variable" => \$opt_ems_force_variable,
"ems-picture-send:s" => \$opt_ems_picture_send,
"ems-animation-send:s" => \$opt_ems_animation_send,
+ "ems-melody-file-send:s" => \$opt_ems_melody_file_send,
"alcatel-name:s" => \$opt_alcatel_name,
"alcatel-picture-send:s" => \$opt_alcatel_picture_send,
"alcatel-animation-send:s" => \$opt_alcatel_animation_send,
[--ems-force-variable]
[--ems-picture-send=<image file>]
[--ems-animation-send=<image file>]
+ [--ems-melody-file-send=<iMelody file>]
[--alcatel-name=<resource name>]
[--alcatel-picture-send=<image file>]
[--alcatel-animation-send=<image file>]
} ]);
}
+ if ($opt_ems_melody_file_send) {
+ local (*F);
+ open F, $opt_ems_melody_file_send;
+ my $ems_melody_file_data = <F>;
+ close F;
+ warn "EMS iMelody file format not recognized, wrapping anyway"
+ if $ems_melody_file_data!~/^BEGIN:IMELODY\r\n.*END:IMELODY\r\n$/s;
+ $nbs->sendsms($msisdn, "", udh=>[ {
+ "type"=>"ems_melody",
+ TEXT_POSITION=>0,
+ "textdata"=>$ems_melody_file_data,
+ } ]);
+ }
+
if ($opt_alcatel_picture_send) {
my $bitmap = GSM::SMS::Bitmap->new($opt_alcatel_picture_send);
my ($msg, $udh) = GSM::SMS::NBS::Alcatel->alcatel_picture($bitmap);