|
48 | 48 | $agentonly_callbacks = $astDB->escape($_REQUEST['agentonly_callbacks']);
|
49 | 49 | $agent_lead_search_override = $astDB->escape($_REQUEST['agent_lead_search_override']);
|
50 | 50 | $avatar = $astDB->escape($_REQUEST['avatar']);
|
| 51 | + $enable_webrtc = $astDB->escape($_REQUEST['enable_webrtc']); |
51 | 52 | $location = $astDB->escape($_REQUEST['location_id']);
|
52 | 53 |
|
53 | 54 | // Default Values
|
|
184 | 185 | "avatar" => $avatar,
|
185 | 186 | "user_group" => $user_group,
|
186 | 187 | "role" => $user_level,
|
187 |
| - "status" => $goactive |
| 188 | + "status" => $goactive, |
| 189 | + "enable_webrtc" => $enable_webrtc |
188 | 190 | );
|
189 | 191 |
|
190 | 192 | $insertUserGoArray = array(
|
|
312 | 314 |
|
313 | 315 | $update_array = array_merge($update_array, array(
|
314 | 316 | "pass_hash" => $pass_hash,
|
315 |
| - "pass" => "", |
316 |
| - "phone_pass" => "" |
| 317 | + "pass" => ((int)$enable_webrtc == 0) ? $pass : "", |
| 318 | + "phone_pass" => ((int)$enable_webrtc == 0) ? $phone_pass : "" |
317 | 319 | )
|
318 | 320 | );
|
319 | 321 |
|
320 |
| - $goDB->where("setting", "GO_agent_domain"); |
321 |
| - $fetch_value = $astDB->getOne("settings", "value"); |
| 322 | + $goDB->where("setting", "GO_agent_wss_sip"); |
| 323 | + $fetch_value = $goDB->getOne("settings", "value"); |
322 | 324 |
|
323 | 325 | $value = $fetch_value["value"];
|
324 | 326 | $realm = (!is_null ($value) || $value !== '') ? $value : 'goautodial.com';
|
325 |
| - $ha1 = md5 ("{$phone_login}:{$realm}:{$phone_pass}"); |
326 |
| - $ha1b = md5 ("{$phone_login}@{$realm}:{$realm}:{$phone_pass}"); |
| 327 | + $ha1 = md5 ("{$phone_login}:{$realm}:{$pass}"); |
| 328 | + $ha1b = md5 ("{$phone_login}@{$realm}:{$realm}:{$pass}"); |
327 | 329 |
|
328 | 330 | $subscriber_array = array(
|
329 | 331 | "password" => "",
|
|
376 | 378 | $astDB->update("phones", $phones_array);
|
377 | 379 |
|
378 | 380 | $log_id = log_action($goDB, 'MODIFY', $log_user, $log_ip, "Modified Phone: $phone_login", $log_group, $astDB->getLastQuery());
|
| 381 | + |
| 382 | + if ($protocol != "EXTERNAL") { |
| 383 | + $rebuild = rebuildconfQuery($astDB); |
| 384 | + } |
379 | 385 | }
|
380 | 386 |
|
381 | 387 | $astDB->where("user", $user);
|
|
403 | 409 | $goDB->where("carrier_id", $user_group);
|
404 | 410 | $goDB->update('justgovoip_sippy_info', $justgovoip_array);
|
405 | 411 |
|
406 |
| - $log_id = log_action($goDB, 'MODIFY', $log_user, $log_ip, "Modified Phone: $phone_pass", $log_group, $goDB->getLastQuery()); |
| 412 | + $log_id = log_action($goDB, 'MODIFY', $log_user, $log_ip, "Modified Phone: $phone_login", $log_group, $goDB->getLastQuery()); |
407 | 413 |
|
408 | 414 | if ($queryUpdateUser) {
|
409 | 415 | $apiresults = array(
|
|
0 commit comments