Fix mobile app: AccessToken for voice, Agent Manager for status, caller ID support
All checks were successful
Create Release / build (push) Successful in 3s
All checks were successful
Create Release / build (push) Successful in 3s
- Voice token: use AccessToken + VoiceGrant instead of browser-only ClientToken - Agent status: delegate to TWP_Agent_Manager matching browser phone behavior - Queue loading: add missing require_once for TWP_User_Queue_Manager - Add /phone-numbers endpoint for caller ID selection - Webhook: support CallerId param from mobile extraOptions - Flutter: caller ID dropdown in dialer, error logging in all catch blocks Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -371,7 +371,13 @@ class TWP_Webhooks {
|
||||
|
||||
if (isset($params['To']) && !empty($params['To'])) {
|
||||
$to_number = $params['To'];
|
||||
$from_number = isset($params['From']) ? $params['From'] : '';
|
||||
// Mobile SDK sends CallerId via extraOptions; browser sends From as phone number
|
||||
$from_number = '';
|
||||
if (!empty($params['CallerId']) && strpos($params['CallerId'], 'client:') !== 0) {
|
||||
$from_number = $params['CallerId'];
|
||||
} elseif (!empty($params['From']) && strpos($params['From'], 'client:') !== 0) {
|
||||
$from_number = $params['From'];
|
||||
}
|
||||
|
||||
// If it's an outgoing call to a phone number
|
||||
if (strpos($to_number, 'client:') !== 0) {
|
||||
|
||||
Reference in New Issue
Block a user