mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-23 01:46:27 +02:00
Add callback for phone calls, not tested yet
This commit is contained in:
parent
52a0302dc2
commit
41c3b3b86e
13 changed files with 378 additions and 57 deletions
|
@ -92,6 +92,16 @@ interface AdapterInterface
|
|||
* Does the implemented service support mms sending
|
||||
*/
|
||||
public static function meta_support_mms_sending(): bool;
|
||||
|
||||
/**
|
||||
* Does the implemented service support inbound call callback
|
||||
*/
|
||||
public static function meta_support_inbound_call_callback(): bool;
|
||||
|
||||
/**
|
||||
* Does the implemented service support end call callback
|
||||
*/
|
||||
public static function meta_support_end_call_callback(): bool;
|
||||
|
||||
/**
|
||||
* Method called to send a SMS to a number.
|
||||
|
@ -162,4 +172,35 @@ interface AdapterInterface
|
|||
* ]
|
||||
*/
|
||||
public static function reception_callback(): array;
|
||||
|
||||
/**
|
||||
* Method called on reception of an inbound_call notification
|
||||
*
|
||||
* @return array : [
|
||||
* bool 'error' => false on success, true on error
|
||||
* ?string 'error_message' => null on success, error message else
|
||||
* array 'call' => array [
|
||||
* string 'uid' : Uid of the call on the adapter plateform
|
||||
* string 'start' : Start of the call date format Y-m-d H:i:s,
|
||||
* ?string 'end' : End of the call date format Y-m-d H:i:s. If no known end, NULL
|
||||
* string 'origin' : Emitter phone call number. International format.
|
||||
* ]
|
||||
* ]
|
||||
*/
|
||||
public function inbound_call_callback(): array;
|
||||
|
||||
|
||||
/**
|
||||
* Method called on reception of a end call notification
|
||||
*
|
||||
* @return array : [
|
||||
* bool 'error' => false on success, true on error
|
||||
* ?string 'error_message' => null on success, error message else
|
||||
* array 'call' => array [
|
||||
* string 'uid' : Uid of the call on the adapter plateform. Used to find the raspisms local call to update.
|
||||
* string 'end' : End of the call date format Y-m-d H:i:s.
|
||||
* ]
|
||||
* ]
|
||||
*/
|
||||
public function end_call_callback(): array;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue