feat(inbound): add CID name prefix support per trunk and per inbound route
This commit is contained in:
1 parent
9518e10616
commit
8804501c42
5 files changed
+188
-12
No files matched your search
+8
-3
@@ -1132,6 +1132,7 @@ try {
|
||||
$custom_reg_params = trim((string)($payload['custom_reg_params'] ?? ''));
|
||||
$custom_aor_params = trim((string)($payload['custom_aor_params'] ?? ''));
|
||||
$moh_sound_id = max(0, (int)($payload['moh_sound_id'] ?? 0));
|
||||
$cid_name_prefix = trim((string)($payload['cid_name_prefix'] ?? ''));
|
||||
$enabled = isset($payload['enabled']) ? (int)!empty($payload['enabled']) : 1;
|
||||
|
||||
$didRoutesRaw = is_array($payload['did_routes'] ?? null) ? $payload['did_routes'] : [];
|
||||
@@ -1201,6 +1202,7 @@ try {
|
||||
':custom_reg_params' => $custom_reg_params,
|
||||
':custom_aor_params' => $custom_aor_params,
|
||||
':moh_sound_id' => $moh_sound_id,
|
||||
':cid_name_prefix' => $cid_name_prefix,
|
||||
':enabled' => $enabled,
|
||||
];
|
||||
|
||||
@@ -1227,7 +1229,7 @@ try {
|
||||
inbound_dest = :inbound_dest, did_routes_json = :did_routes_json,
|
||||
outbound_prefix = :outbound_prefix, custom_endpoint_params = :custom_endpoint_params,
|
||||
custom_reg_params = :custom_reg_params, custom_aor_params = :custom_aor_params,
|
||||
moh_sound_id = :moh_sound_id,
|
||||
moh_sound_id = :moh_sound_id, cid_name_prefix = :cid_name_prefix,
|
||||
enabled = :enabled
|
||||
WHERE id = :id
|
||||
');
|
||||
@@ -1242,7 +1244,8 @@ try {
|
||||
trust_id_inbound, codecs, dtmf_mode, media_encryption, nat_symmetric, direct_media,
|
||||
qualify_frequency, max_channels, timers, language, rtp_keepalive, t38_udptl,
|
||||
fax_detect, inband_progress, match_ips, context, inbound_dest, did_routes_json,
|
||||
outbound_prefix, custom_endpoint_params, custom_reg_params, custom_aor_params, moh_sound_id, enabled
|
||||
outbound_prefix, custom_endpoint_params, custom_reg_params, custom_aor_params, moh_sound_id,
|
||||
cid_name_prefix, enabled
|
||||
) VALUES (
|
||||
:name, :host, :port, :outbound_proxy, :transport, :auth_mode, :username, :auth_username, :secret,
|
||||
:registration_mode, :register, :server_uri, :client_uri, :contact_user, :expiration, :retry_interval,
|
||||
@@ -1251,7 +1254,8 @@ try {
|
||||
:trust_id_inbound, :codecs, :dtmf_mode, :media_encryption, :nat_symmetric, :direct_media,
|
||||
:qualify_frequency, :max_channels, :timers, :language, :rtp_keepalive, :t38_udptl,
|
||||
:fax_detect, :inband_progress, :match_ips, :context, :inbound_dest, :did_routes_json,
|
||||
:outbound_prefix, :custom_endpoint_params, :custom_reg_params, :custom_aor_params, :moh_sound_id, :enabled
|
||||
:outbound_prefix, :custom_endpoint_params, :custom_reg_params, :custom_aor_params, :moh_sound_id,
|
||||
:cid_name_prefix, :enabled
|
||||
)
|
||||
ON CONFLICT(name) DO UPDATE SET
|
||||
host = excluded.host, port = excluded.port, outbound_proxy = excluded.outbound_proxy,
|
||||
@@ -1274,6 +1278,7 @@ try {
|
||||
outbound_prefix = excluded.outbound_prefix, custom_endpoint_params = excluded.custom_endpoint_params,
|
||||
custom_reg_params = excluded.custom_reg_params, custom_aor_params = excluded.custom_aor_params,
|
||||
moh_sound_id = excluded.moh_sound_id,
|
||||
cid_name_prefix = excluded.cid_name_prefix,
|
||||
enabled = excluded.enabled
|
||||
');
|
||||
$stmt->execute($params);
|
||||
|
||||
Reference in new issue
Block a user