From 88ebc8042c033f72a6a0f8f3a844bcfbd6068030 Mon Sep 17 00:00:00 2001
From: osaajani <>
Date: Fri, 25 Jun 2021 02:04:35 +0200
Subject: [PATCH 1/6] Working octopush shortcode
---
adapters/OctopushShortcodeAdapter.php | 141 +++++++++++++--------
adapters/OctopushVirtualNumberAdapter.php | 142 ++++++++++++++--------
controllers/publics/Callback.php | 2 +-
3 files changed, 183 insertions(+), 102 deletions(-)
diff --git a/adapters/OctopushShortcodeAdapter.php b/adapters/OctopushShortcodeAdapter.php
index 4a645e6..d7ed533 100644
--- a/adapters/OctopushShortcodeAdapter.php
+++ b/adapters/OctopushShortcodeAdapter.php
@@ -16,10 +16,8 @@ namespace adapters;
*/
class OctopushShortcodeAdapter implements AdapterInterface
{
- const ERROR_CODE_OK = '000';
- const SMS_TYPE_LOWCOST = 'XXX';
- const SMS_TYPE_PREMIUM = 'FR';
- const SMS_TYPE_INTERNATIONAL = 'WWW';
+ const SMS_TYPE_LOWCOST = 'sms_low_cost';
+ const SMS_TYPE_PREMIUM = 'sms_premium';
/**
* Data used to configure interaction with the implemented service. (e.g : Api credentials, ports numbers, etc.).
@@ -40,11 +38,17 @@ class OctopushShortcodeAdapter implements AdapterInterface
* Sender name to use instead of shortcode.
*/
private $sender;
+
+ /**
+ * Octopush SMS type
+ */
+ private $sms_type;
/**
* Octopush api baseurl.
*/
- private $api_url = 'https://www.octopush-dm.com/api';
+ private $api_url = 'https://api.octopush.com/v1/public';
+
/**
* Adapter constructor, called when instanciated by RaspiSMS.
@@ -58,6 +62,13 @@ class OctopushShortcodeAdapter implements AdapterInterface
$this->login = $this->data['login'];
$this->api_key = $this->data['api_key'];
+
+ $this->sms_type = self::SMS_TYPE_LOWCOST;
+ if (($this->data['sms_type'] ?? false) && $this->data['sms_type'] === 'premium')
+ {
+ $this->sms_type = self::SMS_TYPE_PREMIUM;
+ }
+
$this->sender = $this->data['sender'] ?? null;
}
@@ -130,6 +141,12 @@ class OctopushShortcodeAdapter implements AdapterInterface
'description' => 'Clef API octopush. Trouvable sur la page des identifiants API Octopush.',
'required' => true,
],
+ [
+ 'name' => 'sms_type',
+ 'title' => 'Type de SMS à employer',
+ 'description' => 'Type de SMS à employer coté Octopush, rentrez "low cost" ou "premium" selon le type de SMS que vous souhaitez employer. Laissez vide pour utiliser par défaut des SMS low cost.',
+ 'required' => false,
+ ],
[
'name' => 'sender',
'title' => 'Nom de l\'expéditeur',
@@ -209,21 +226,32 @@ class OctopushShortcodeAdapter implements AdapterInterface
try
{
- $data = [
- 'user_login' => $this->login,
- 'api_key' => $this->api_key,
- 'sms_text' => $text,
- 'sms_recipients' => str_replace('+', '00', $destination), //Must use 00 instead of + notation
- 'sms_sender' => '12345',
- 'sms_type' => self::SMS_TYPE_LOWCOST,
+ $headers = [
+ 'api-login: ' . $this->login,
+ 'api-key: ' . $this->api_key,
+ 'Content-Type: application/json',
];
- if (null !== $this->sender)
+ $data = [
+ 'text' => $text,
+ 'recipients' => [['phone_number' => $destination]],
+ 'sms_type' => $this->sms_type,
+ 'purpose' => 'alert',
+ ];
+
+ if ($this->sender)
{
- $data['sms_sender'] = $this->sender;
+ $data['sender'] = $this->sender;
+ }
+ else
+ {
+ $data['with_replies'] = "True";
}
- $endpoint = $this->api_url . '/sms/json';
+ $data = json_encode($data);
+
+
+ $endpoint = $this->api_url . '/sms-campaign/send';
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $endpoint);
@@ -231,10 +259,13 @@ class OctopushShortcodeAdapter implements AdapterInterface
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
- $response = curl_exec($curl);
+ curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
+
+ $curl_response = curl_exec($curl);
+ $http_code = (int) curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
- if (false === $response)
+ if (false === $curl_response)
{
$response['error'] = true;
$response['error_message'] = 'HTTP query failed.';
@@ -242,7 +273,7 @@ class OctopushShortcodeAdapter implements AdapterInterface
return $response;
}
- $response_decode = json_decode($response, true);
+ $response_decode = json_decode($curl_response, true);
if (null === $response_decode)
{
$response['error'] = true;
@@ -251,15 +282,15 @@ class OctopushShortcodeAdapter implements AdapterInterface
return $response;
}
- if (self::ERROR_CODE_OK !== $response_decode['error_code'])
+ if (200 !== $http_code)
{
$response['error'] = true;
- $response['error_message'] = 'Response indicate error code : ' . $response_decode['error_code'];
+ $response['error_message'] = 'Response indicate error code : ' . $response_decode['code'] . ' -> """' . $response_decode['message'] . '""" AND HTTP CODE -> ' . $http_code;
return $response;
}
- $uid = $response_decode['ticket'] ?? false;
+ $uid = $response_decode['sms_ticket'] ?? false;
if (!$uid)
{
$response['error'] = true;
@@ -297,34 +328,29 @@ class OctopushShortcodeAdapter implements AdapterInterface
return false;
}
- $data = [
- 'user_login' => $this->login,
- 'api_key' => $this->api_key,
+ if (!empty($this->data['sms_type']) && !in_array($this->data['sms_type'], ['premium', 'low cost']))
+ {
+ return false;
+ }
+
+ $headers = [
+ 'api-login: ' . $this->login,
+ 'api-key: ' . $this->api_key,
+ 'Content-Type: application/json',
];
//Check service name
- $endpoint = $this->api_url . '/balance/json';
+ $endpoint = $this->api_url . '/wallet/check-balance';
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $endpoint);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
+ curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($curl);
+ $http_code = (int) curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
- if (false === $response)
- {
- return false;
- }
-
- $response_decode = json_decode($response, true);
- if (null === $response_decode)
- {
- return false;
- }
-
- if (self::ERROR_CODE_OK !== $response_decode['error_code'])
+ if ($http_code !== 200)
{
return false;
}
@@ -343,14 +369,23 @@ class OctopushShortcodeAdapter implements AdapterInterface
header('Content-Encoding: none');
header('Content-Length: 0');
- $uid = $_POST['message_id'] ?? false;
- $status = $_POST['status'] ?? false;
+
+ $input = file_get_contents('php://input');
+ $content = json_decode($input, true);
+ if (null === $content)
+ {
+ return false;
+ }
+
+ $uid = $content['message_id'] ?? false;
+ $status = $content['status'] ?? false;
if (false === $uid || false === $status)
{
return false;
}
+
switch ($status)
{
case 'DELIVERED':
@@ -358,10 +393,8 @@ class OctopushShortcodeAdapter implements AdapterInterface
break;
+ case 'NOT_DELIVERED':
case 'NOT_ALLOWED':
- case 'INVALID_DESTINATION_ADDRESS':
- case 'OUT_OF_DATE':
- case 'EXPIRED':
case 'BLACKLISTED_NUMBER':
$status = \models\Sended::STATUS_FAILED;
@@ -387,10 +420,20 @@ class OctopushShortcodeAdapter implements AdapterInterface
header('Connection: close');
header('Content-Encoding: none');
header('Content-Length: 0');
+
+ $input = file_get_contents('php://input');
+ $content = json_decode($input, true);
+ if (null === $content)
+ {
+ $response['error'] = true;
+ $response['error_message'] = 'Cannot read input data from callback request.';
+
+ return $response;
+ }
- $number = $_POST['number'] ?? false;
- $text = $_POST['text'] ?? false;
- $at = $_POST['reception_date'] ?? false;
+ $number = $content['number'] ?? false;
+ $text = $content['text'] ?? false;
+ $at = $content['reception_date'] ?? false;
if (!$number || !$text || !$at)
{
@@ -400,11 +443,11 @@ class OctopushShortcodeAdapter implements AdapterInterface
return $response;
}
- $origin = \controllers\internals\Tool::parse_phone('+' . mb_substr($number, 2));
+ $origin = \controllers\internals\Tool::parse_phone($number);
if (!$origin)
{
$response['error'] = true;
- $response['error_message'] = 'Invalid origin number : ' . mb_substr($number, 2);
+ $response['error_message'] = 'Invalid origin number : ' . $number;
return $response;
}
diff --git a/adapters/OctopushVirtualNumberAdapter.php b/adapters/OctopushVirtualNumberAdapter.php
index ca3c986..4ea670d 100644
--- a/adapters/OctopushVirtualNumberAdapter.php
+++ b/adapters/OctopushVirtualNumberAdapter.php
@@ -16,10 +16,8 @@ namespace adapters;
*/
class OctopushVirtualNumberAdapter implements AdapterInterface
{
- const ERROR_CODE_OK = '000';
- const SMS_TYPE_LOWCOST = 'XXX';
- const SMS_TYPE_PREMIUM = 'FR';
- const SMS_TYPE_INTERNATIONAL = 'WWW';
+ const SMS_TYPE_LOWCOST = 'sms_low_cost';
+ const SMS_TYPE_PREMIUM = 'sms_premium';
/**
* Data used to configure interaction with the implemented service. (e.g : Api credentials, ports numbers, etc.).
@@ -40,16 +38,16 @@ class OctopushVirtualNumberAdapter implements AdapterInterface
* Number phone to use.
*/
private $number;
-
+
/**
- * Number phone to use formated for octopush compatibility.
+ * Octopush SMS type
*/
- private $formatted_number;
+ private $sms_type;
/**
* Octopush api baseurl.
*/
- private $api_url = 'https://www.octopush-dm.com/api';
+ private $api_url = 'https://api.octopush.com/v1/public';
/**
* Adapter constructor, called when instanciated by RaspiSMS.
@@ -64,7 +62,14 @@ class OctopushVirtualNumberAdapter implements AdapterInterface
$this->login = $this->data['login'];
$this->api_key = $this->data['api_key'];
$this->number = $this->data['number'];
- $this->formatted_number = '+' . mb_substr($this->data['number'], 2);
+
+ $this->sms_type = self::SMS_TYPE_LOWCOST;
+ if (($this->data['sms_type'] ?? false) && $this->data['sms_type'] === 'premium')
+ {
+ $this->sms_type = self::SMS_TYPE_PREMIUM;
+ }
+
+
}
/**
@@ -143,6 +148,12 @@ class OctopushVirtualNumberAdapter implements AdapterInterface
'required' => true,
'number' => true,
],
+ [
+ 'name' => 'sms_type',
+ 'title' => 'Type de SMS à employer',
+ 'description' => 'Type de SMS à employer coté Octopush, rentrez "low cost" ou "premium" selon le type de SMS que vous souhaitez employer. Laissez vide pour utiliser par défaut des SMS low cost.',
+ 'required' => false,
+ ],
];
}
@@ -214,16 +225,25 @@ class OctopushVirtualNumberAdapter implements AdapterInterface
try
{
- $data = [
- 'user_login' => $this->login,
- 'api_key' => $this->api_key,
- 'sms_text' => $text,
- 'sms_recipients' => str_replace('+', '00', $destination), //Must use 00 instead of + notation
- 'sms_sender' => $this->formatted_number,
- 'sms_type' => self::SMS_TYPE_LOWCOST,
+ $headers = [
+ 'api-login: ' . $this->login,
+ 'api-key: ' . $this->api_key,
+ 'Content-Type: application/json',
];
- $endpoint = $this->api_url . '/sms/json';
+ $data = [
+ 'text' => $text,
+ 'recipients' => [['phone_number' => $destination]],
+ 'sms_type' => $this->sms_type,
+ 'purpose' => 'alert',
+ 'sender' => $this->number,
+ 'with_replies' => "True",
+ ];
+
+ $data = json_encode($data);
+
+
+ $endpoint = $this->api_url . '/sms-campaign/send';
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $endpoint);
@@ -231,10 +251,12 @@ class OctopushVirtualNumberAdapter implements AdapterInterface
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
- $response = curl_exec($curl);
+ curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
+ $curl_response = curl_exec($curl);
+ $http_code = (int) curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
- if (false === $response)
+ if (false === $curl_response)
{
$response['error'] = true;
$response['error_message'] = 'HTTP query failed.';
@@ -242,7 +264,7 @@ class OctopushVirtualNumberAdapter implements AdapterInterface
return $response;
}
- $response_decode = json_decode($response, true);
+ $response_decode = json_decode($curl_response, true);
if (null === $response_decode)
{
$response['error'] = true;
@@ -251,15 +273,15 @@ class OctopushVirtualNumberAdapter implements AdapterInterface
return $response;
}
- if (self::ERROR_CODE_OK !== $response_decode['error_code'])
+ if (200 !== $http_code)
{
$response['error'] = true;
- $response['error_message'] = 'Response indicate error code : ' . $response_decode['error_code'];
+ $response['error_message'] = 'Response indicate error code : ' . $response_decode['code'] . ' -> """' . $response_decode['message'] . '""" AND HTTP CODE -> ' . $http_code;
return $response;
}
- $uid = $response_decode['ticket'] ?? false;
+ $uid = $response_decode['sms_ticket'] ?? false;
if (!$uid)
{
$response['error'] = true;
@@ -297,34 +319,36 @@ class OctopushVirtualNumberAdapter implements AdapterInterface
return false;
}
- $data = [
- 'user_login' => $this->login,
- 'api_key' => $this->api_key,
+ if (!empty($this->data['sms_type']) && !in_array($this->data['sms_type'], ['premium', 'low cost']))
+ {
+ return false;
+ }
+
+ $origin = \controllers\internals\Tool::parse_phone($this->data['number']);
+ if (!$origin)
+ {
+ return false;
+ }
+
+
+ $headers = [
+ 'api-login: ' . $this->login,
+ 'api-key: ' . $this->api_key,
+ 'Content-Type: application/json',
];
//Check service name
- $endpoint = $this->api_url . '/balance/json';
+ $endpoint = $this->api_url . '/wallet/check-balance';
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $endpoint);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
+ curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($curl);
+ $http_code = (int) curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
- if (false === $response)
- {
- return false;
- }
-
- $response_decode = json_decode($response, true);
- if (null === $response_decode)
- {
- return false;
- }
-
- if (self::ERROR_CODE_OK !== $response_decode['error_code'])
+ if ($http_code !== 200)
{
return false;
}
@@ -343,14 +367,23 @@ class OctopushVirtualNumberAdapter implements AdapterInterface
header('Content-Encoding: none');
header('Content-Length: 0');
- $uid = $_POST['message_id'] ?? false;
- $status = $_POST['status'] ?? false;
+
+ $input = file_get_contents('php://input');
+ $content = json_decode($input, true);
+ if (null === $content)
+ {
+ return false;
+ }
+
+ $uid = $content['message_id'] ?? false;
+ $status = $content['status'] ?? false;
if (false === $uid || false === $status)
{
return false;
}
+
switch ($status)
{
case 'DELIVERED':
@@ -358,10 +391,8 @@ class OctopushVirtualNumberAdapter implements AdapterInterface
break;
+ case 'NOT_DELIVERED':
case 'NOT_ALLOWED':
- case 'INVALID_DESTINATION_ADDRESS':
- case 'OUT_OF_DATE':
- case 'EXPIRED':
case 'BLACKLISTED_NUMBER':
$status = \models\Sended::STATUS_FAILED;
@@ -381,16 +412,23 @@ class OctopushVirtualNumberAdapter implements AdapterInterface
$response = [
'error' => false,
'error_message' => null,
- 'uid' => null,
+ 'sms' => null,
];
header('Connection: close');
header('Content-Encoding: none');
header('Content-Length: 0');
+
+ $input = file_get_contents('php://input');
+ $content = json_decode($input, true);
+ if (null === $content)
+ {
+ return false;
+ }
- $number = $_POST['number'] ?? false;
- $text = $_POST['text'] ?? false;
- $at = $_POST['reception_date'] ?? false;
+ $number = $content['number'] ?? false;
+ $text = $content['text'] ?? false;
+ $at = $content['reception_date'] ?? false;
if (!$number || !$text || !$at)
{
@@ -400,11 +438,11 @@ class OctopushVirtualNumberAdapter implements AdapterInterface
return $response;
}
- $origin = \controllers\internals\Tool::parse_phone('+' . mb_substr($number, 2));
+ $origin = \controllers\internals\Tool::parse_phone($number);
if (!$origin)
{
$response['error'] = true;
- $response['error_message'] = 'Invalid origin number : ' . mb_substr($number, 2);
+ $response['error_message'] = 'Invalid origin number : ' . $number;
return $response;
}
diff --git a/controllers/publics/Callback.php b/controllers/publics/Callback.php
index db68632..a9c8fa0 100644
--- a/controllers/publics/Callback.php
+++ b/controllers/publics/Callback.php
@@ -191,7 +191,7 @@ use Monolog\Logger;
}
$sms = $response['sms'];
- $mms = (bool) $sms['mms'] ?? false;
+ $mms = (bool) ($sms['mms'] ?? false);
$medias = empty($sms['medias']) ? [] : $sms['medias'];
$response = $this->internal_received->receive($this->user['id'], $id_phone, $sms['text'], $sms['origin'], $sms['at'], \models\Received::STATUS_UNREAD, $mms, $medias);
From 0e2908cb839145b309849c6597f90ffe5bf27b99 Mon Sep 17 00:00:00 2001
From: osaajani <>
Date: Tue, 29 Jun 2021 20:05:29 +0200
Subject: [PATCH 2/6] working octopush virtual number
---
adapters/OctopushVirtualNumberAdapter.php | 29 +++++++++--------------
1 file changed, 11 insertions(+), 18 deletions(-)
diff --git a/adapters/OctopushVirtualNumberAdapter.php b/adapters/OctopushVirtualNumberAdapter.php
index 4ea670d..33473f9 100644
--- a/adapters/OctopushVirtualNumberAdapter.php
+++ b/adapters/OctopushVirtualNumberAdapter.php
@@ -34,11 +34,6 @@ class OctopushVirtualNumberAdapter implements AdapterInterface
*/
private $api_key;
- /**
- * Number phone to use.
- */
- private $number;
-
/**
* Octopush SMS type
*/
@@ -49,6 +44,7 @@ class OctopushVirtualNumberAdapter implements AdapterInterface
*/
private $api_url = 'https://api.octopush.com/v1/public';
+
/**
* Adapter constructor, called when instanciated by RaspiSMS.
*
@@ -62,14 +58,12 @@ class OctopushVirtualNumberAdapter implements AdapterInterface
$this->login = $this->data['login'];
$this->api_key = $this->data['api_key'];
$this->number = $this->data['number'];
-
+
$this->sms_type = self::SMS_TYPE_LOWCOST;
if (($this->data['sms_type'] ?? false) && $this->data['sms_type'] === 'premium')
{
$this->sms_type = self::SMS_TYPE_PREMIUM;
}
-
-
}
/**
@@ -119,6 +113,7 @@ class OctopushVirtualNumberAdapter implements AdapterInterface
Envoi de SMS avec un numéro virtuel en utilisant Octopush. Pour trouver vos clés API Octopush cliquez ici.
Pour plus d\'information sur l\'utilisation de ce téléphone, reportez-vous à la documentation sur les téléphones "Octopush Numéro Virtuel".
';
+
}
/**
@@ -154,7 +149,7 @@ class OctopushVirtualNumberAdapter implements AdapterInterface
'description' => 'Type de SMS à employer coté Octopush, rentrez "low cost" ou "premium" selon le type de SMS que vous souhaitez employer. Laissez vide pour utiliser par défaut des SMS low cost.',
'required' => false,
],
- ];
+ ];
}
/**
@@ -252,6 +247,7 @@ class OctopushVirtualNumberAdapter implements AdapterInterface
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
+
$curl_response = curl_exec($curl);
$http_code = (int) curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
@@ -314,23 +310,17 @@ class OctopushVirtualNumberAdapter implements AdapterInterface
{
$success = true;
- if ($this->data['sender'] && (mb_strlen($this->data['sender']) < 3 || mb_strlen($this->data['sender'] > 11)))
- {
- return false;
- }
-
if (!empty($this->data['sms_type']) && !in_array($this->data['sms_type'], ['premium', 'low cost']))
{
return false;
}
-
+
$origin = \controllers\internals\Tool::parse_phone($this->data['number']);
if (!$origin)
{
return false;
}
-
-
+
$headers = [
'api-login: ' . $this->login,
'api-key: ' . $this->api_key,
@@ -423,7 +413,10 @@ class OctopushVirtualNumberAdapter implements AdapterInterface
$content = json_decode($input, true);
if (null === $content)
{
- return false;
+ $response['error'] = true;
+ $response['error_message'] = 'Cannot read input data from callback request.';
+
+ return $response;
}
$number = $content['number'] ?? false;
From 05d488490a98cbf28a205402cc913288e65a2e70 Mon Sep 17 00:00:00 2001
From: osaajani <>
Date: Tue, 29 Jun 2021 20:05:56 +0200
Subject: [PATCH 3/6] Checkbox to select all entries of a datatable
---
assets/js/custom.js | 11 +++++++++++
templates/call/list.php | 2 +-
templates/command/list.php | 2 +-
templates/conditional_group/list.php | 2 +-
templates/contact/list.php | 2 +-
templates/event/list.php | 2 +-
templates/group/list.php | 2 +-
templates/phone/list.php | 2 +-
templates/received/list.php | 2 +-
templates/scheduled/list.php | 2 +-
templates/sended/list.php | 2 +-
templates/smsstop/list.php | 2 +-
templates/user/list.php | 2 +-
templates/webhook/list.php | 2 +-
14 files changed, 24 insertions(+), 13 deletions(-)
diff --git a/assets/js/custom.js b/assets/js/custom.js
index b25910a..112625c 100644
--- a/assets/js/custom.js
+++ b/assets/js/custom.js
@@ -139,4 +139,15 @@ jQuery(document).ready(function()
form.trigger("reset");
});
});
+
+ jQuery('body').on('change', '.datatable #check-all', function (e) {
+ if (jQuery(e.target).is(':checked'))
+ {
+ jQuery(e.target).parents('.datatable').find('input[type="checkbox"]').prop('checked', true);
+ }
+ else
+ {
+ jQuery(e.target).parents('.datatable').find('input[type="checkbox"]').prop('checked', false);
+ }
+ });
});
diff --git a/templates/call/list.php b/templates/call/list.php
index 76d2eaf..208a8d5 100644
--- a/templates/call/list.php
+++ b/templates/call/list.php
@@ -44,7 +44,7 @@