2016-03-01 17:40:38 +00:00
|
|
|
|
2016-07-20 09:58:12 +00:00
|
|
|
/* number type, includes presentation info */
|
|
|
|
enum number_type {
|
|
|
|
TYPE_NOTAVAIL,
|
|
|
|
TYPE_ANONYMOUS,
|
|
|
|
TYPE_UNKNOWN,
|
|
|
|
TYPE_SUBSCRIBER,
|
|
|
|
TYPE_NATIONAL,
|
|
|
|
TYPE_INTERNATIONAL,
|
|
|
|
};
|
|
|
|
|
2020-08-09 12:27:56 +00:00
|
|
|
int call_init(const char *name, int _send_patterns, int _release_on_disconnect, int use_socket, int argc, const char *argv[]);
|
|
|
|
void call_exit(void);
|
|
|
|
int call_handle(void);
|
|
|
|
void call_media_handle(void);
|
2017-10-28 05:11:40 +00:00
|
|
|
|
|
|
|
/* function pointer to delive MNCC messages to upper layer */
|
|
|
|
extern int (*mncc_up)(uint8_t *buf, int length);
|
|
|
|
/* MNCC messages from upper layer */
|
|
|
|
void mncc_down(uint8_t *buf, int length);
|
|
|
|
/* flush all calls in case of MNCC socket failure */
|
|
|
|
void mncc_flush(void);
|
2016-03-01 17:40:38 +00:00
|
|
|
|
|
|
|
/* received messages */
|
2020-08-09 12:27:56 +00:00
|
|
|
int call_up_setup(const char *callerid, const char *dialing, uint8_t network, const char *network_id);
|
2017-10-28 05:11:40 +00:00
|
|
|
void call_up_alerting(int callref);
|
2020-01-12 15:45:16 +00:00
|
|
|
void call_up_early(int callref);
|
2017-10-28 05:11:40 +00:00
|
|
|
void call_up_answer(int callref, const char *connect_id);
|
|
|
|
void call_up_release(int callref, int cause);
|
2017-08-06 09:30:39 +00:00
|
|
|
void call_tone_recall(int callref, int on);
|
2016-03-01 17:40:38 +00:00
|
|
|
|
|
|
|
/* send messages */
|
2017-10-28 05:11:40 +00:00
|
|
|
int call_down_setup(int callref, const char *caller_id, enum number_type caller_type, const char *dialing);
|
|
|
|
void call_down_answer(int callref);
|
|
|
|
void call_down_disconnect(int callref, int cause);
|
|
|
|
void call_down_release(int callref, int cause);
|
2016-03-01 17:40:38 +00:00
|
|
|
|
|
|
|
/* send and receive audio */
|
2017-10-28 05:11:40 +00:00
|
|
|
void call_up_audio(int callref, sample_t *samples, int count);
|
|
|
|
void call_down_audio(int callref, sample_t *samples, int count);
|
2016-03-01 17:40:38 +00:00
|
|
|
|
|
|
|
/* clock to transmit to */
|
2020-01-12 06:54:25 +00:00
|
|
|
void call_clock(void); /* from main loop */
|
|
|
|
void call_down_clock(void); /* towards mobile implementation */
|
2016-03-01 17:40:38 +00:00
|
|
|
|