MP_Addon_Calls_Callback::browser_call_voice()
Browser Call and records && Incoming Call.
Source Source
File: calculator-calls-add-on/inc/MP_Addon_Calls_Callback.php
public function browser_call_voice() {
if ( isset( $_REQUEST['postid'] ) ) {
$this->outgoing_call_browser( $_REQUEST );
} else {
$admin_phone = ! empty( get_option( MortgagePlatform::$prefix . 'sms' )['number_sms_to_admin'] ) ? get_option( MortgagePlatform::$prefix . 'sms' )['number_sms_to_admin'] : null;
$incoming_call = $this->is_isset( get_option( MortgagePlatform::$prefix . 'contact' )['incoming_call'], false );
if ( ! $admin_phone && $incoming_call ) {
$text = __( 'We are sorry at the moment we cannot answer the call. Goodbye', 'CalculatorsCallsAddon' );
$this->say_message( $text );
}
$number = htmlspecialchars( $admin_phone );
$phone = $this->is_isset( $_POST['From'] );
$call_sid = $this->is_isset( $_POST['CallSid'] );
if ( $phone && $incoming_call ) {
$this->incoming_call_admin( $phone, $number, $call_sid );
} elseif ( $phone && ! $incoming_call ) {
$this->incoming_call_browser( $phone );
};
}
}
Changelog Changelog
| Version | Description |
|---|---|
| 1.0.0 | Introduced. |