diff options
Diffstat (limited to 'localsendsms')
-rwxr-xr-x | localsendsms | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/localsendsms b/localsendsms index ec1468a..0bd22c2 100755 --- a/localsendsms +++ b/localsendsms @@ -27,6 +27,10 @@ my $sms_cp = $ENV{SMS_CP} || "utf8"; my $sms_concat = $ENV{SMS_CONCAT}; my $sms_dlr_mask = $ENV{SMS_DLR_MASK}; my $sms_dlr_url = $ENV{SMS_DLR_URL}; +my $sms_validity = $ENV{SMS_VALIDITY}; +my $sms_req_feat = $ENV{SMS_REQ_FEAT}; +my $sms_binfo = $ENV{SMS_BINFO}; +my $stripprefix = $ENV{stripprefix}; # decode data if passed from kannel if ($urldecode) { @@ -36,7 +40,8 @@ my ($phone) = shift @ARGV; # strip international prefix # (prefix is optional some places and illegal at other places - forgot where) -#$phone =~ s/\+/ /g; +$phone =~ s/^\+//g if ($stripprefix); +$sms_phone =~ s/^\+//g if ($stripprefix); if ($debug) { Log::Log4perl->easy_init($DEBUG); @@ -77,6 +82,9 @@ sub sendmsg { $url .= '&concat=' . uri_escape($sms_concat) if ($sms_concat); $url .= '&dlr-mask=' . uri_escape($sms_dlr_mask) if ($sms_dlr_mask); $url .= '&dlr-url=' . uri_escape($sms_dlr_url) if ($sms_dlr_url); + $url .= '&validity=' . uri_escape($sms_validity) if ($sms_validity); + $url .= '&req_feat=' . uri_escape($sms_req_feat) if ($sms_req_feat); + $url .= '&binfo=' . uri_escape($sms_binfo) if ($sms_binfo); $url .= '&' . $sms_msgtag . '=' . uri_escape(transliterate($sms_cp, $msg)); DEBUG "Sending request: $url"; my $response = $ua->request(HTTP::Request->new('GET', $url)); |