Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: EthernetInterface NTPClient mbed-rtos mbed
call_box.h
00001 #ifndef __CALL_BOX_H__ 00002 #define __CALL_BOX_H__ 00003 00004 #include "mbed.h" 00005 #include "object.h" 00006 #include "sip.h" 00007 #include "debug.h" 00008 #define __TIMEOUT__ 30 /*seconds*/ 00009 #define __MAX_ATTEMPTS__ 6 00010 #define __STEP__ 30 /*seconds*/ 00011 #define __MAX_TIMEOUT__ __STEP__ * __MAX_ATTEMPTS__ 00012 00013 00014 #define cb_idle 1 00015 #define cb_ringing 2 00016 #define cb_trying 3 00017 #define cb_on_call 4 00018 #define cb_busy 5 00019 00020 class Call_Box : public Object{ 00021 private : 00022 int ext; // ramal 00023 int port; // porta 00024 Timer t; 00025 uint8_t remaining_attempts; 00026 float timeout; 00027 uint8_t msg_id; 00028 uint8_t timeslice; 00029 00030 public : 00031 Sip * sip; 00032 Call_Box( int ext, int port ); 00033 ~Call_Box( void ); 00034 00035 uint8_t status; 00036 00037 int get_ext( void ); 00038 int get_port( void ); 00039 00040 float get_elapsed_time( void ); 00041 bool is_timeout( void ); 00042 uint8_t reconfigure_timeout( void ); 00043 void reset_elapsed_time( void ); 00044 void registry( void ); 00045 VZ_call * invite( void ); 00046 void set_msg_id( uint8_t msg_id ); 00047 uint8_t get_msg_id( void ); 00048 void set_timeslice( uint8_t timeslice ); 00049 uint8_t get_timeslice( void ); 00050 //void set_sip( Sip * sip ); 00051 int listen_SIP_server( void ); 00052 void unregistry( void ); 00053 void send_bye( void ); 00054 void reset_sip( void ); 00055 }; 00056 00057 #endif
Generated on Fri Jul 22 2022 09:19:18 by
1.7.2