Set sender's phone number to max 15 characters

E.164 standard.
Fixes #866.
This commit is contained in:
TimZ99 2020-02-11 20:07:59 +01:00
parent 098a552774
commit 02f8484b3b
No known key found for this signature in database
GPG Key ID: 4D8268DC68E8339D
8 changed files with 9 additions and 9 deletions

View File

@ -131,7 +131,7 @@ class CMBulkSMS extends Core
),
'msg' => array(
array(
'from' => substr($this->originator, 0, 11),
'from' => substr($this->originator, 0, 15),
'to' => $recipients,
'body' => array(
'content' => $message
@ -172,7 +172,7 @@ class CMBulkSMS extends Core
$msg = $xml->addChild('MSG');
// From
$msg->addChild('FROM', substr($this->originator, 0, 11));
$msg->addChild('FROM', substr($this->originator, 0, 15));
// Recipients
foreach ($this->recipients as $recipient) {

View File

@ -64,7 +64,7 @@ class ClickSend extends Core
foreach ($this->recipients as $recipient) {
$data['messages'][] = array(
'source' => 'phpservermon',
'from' => substr($this->originator, 0, 11),
'from' => substr($this->originator, 0, 15),
'to' => $recipient,
'body' => $message,
);

View File

@ -63,7 +63,7 @@ class FreeVoipDeal extends Core
array(
"username" => $this->username,
"password" => $this->password,
"from" => substr($this->originator, 0, 11),
"from" => substr($this->originator, 0, 15),
"to" => $recipient,
"text" => $message,
)

View File

@ -63,7 +63,7 @@ class Mosms extends Core
array(
"username" => $this->username,
"password" => $this->password,
"customsender" => substr($this->originator, 0, 11),
"customsender" => substr($this->originator, 0, 15),
"nr" => $recipient,
"type" => "text",
"data" => $message,

View File

@ -72,7 +72,7 @@ class Octopush extends Core
"api_key" => $this->password,
"sms_recipients" => $recipients,
"sms_type" => $smsType,
"sms_sender" => substr($this->originator, 0, 11),
"sms_sender" => substr($this->originator, 0, 15),
"sms_text" => $message,
)
));

View File

@ -58,7 +58,7 @@ class Smsglobal extends Core
$recipients = join(',', $this->recipients);
$from = substr($this->originator, 0, 11); // Max 11 Characters
$from = substr($this->originator, 0, 15); // Max 15 Characters
$message = substr(rawurlencode($message), 0, 153);
$curl = curl_init();

View File

@ -64,7 +64,7 @@ class Smsit extends Core
"apiKey" => $this->password,
"mobile" => $recipient,
"message" => urlencode($message),
"senderId" => substr($this->originator, 0, 11),
"senderId" => substr($this->originator, 0, 15),
)
));

View File

@ -66,7 +66,7 @@ class SolutionsInfini extends Core
"api_key" => $this->password,
"method" => "sms",
"to" => $recipients,
"sender" => substr($this->originator, 0, 11),
"sender" => substr($this->originator, 0, 15),
"message" => $message,
)
));