| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- #ifndef __AUDIODTMF_H__
- #define __AUDIODTMF_H__
- #pragma once
- #ifdef __cplusplus
- extern "C" {
- #endif
- #include "audiodriver.h"
- #include "audiortp.h"
- typedef struct audiodtmf_t audiodtmf_t;
- struct audiodtmf_t
- {
- audiodriver_t base;
- int bsender;
- audiortp_t *rtp;
- char *tx_digits;
- int tx_digits_len;
- int tx_digits_offset;
- int progress;
- int rx_maxdigits;
- int rx_interval;
- int rx_timeout;
- int rx_ellapsed;
- int rx_interdigit;
- char rx_digits[MAX_DTMF];
- int rx_digits_len;
- int fin;
- int binitialized;
- };
- apr_status_t audiodtmf_create(apr_pool_t *pool, audioengine_t *engine, audiodtmf_t **p_dtmf);
- void audiodtmf_destroy(audiodtmf_t *dtmf);
- apr_status_t audiodtmf_set_rtpstream(audiodtmf_t *dtmf, audiortp_t* rtp);
- apr_status_t audiodtmf_set_sender(audiodtmf_t *dtmf, int on);
- apr_status_t audiodtmf_set_txparam(audiodtmf_t *dtmf, const char *digits, int n);
- apr_status_t audiodtmf_set_rxparam(audiodtmf_t *dtmf, int maxdigit, int interval, int interdigit, int timeout);
- apr_status_t audiodtmf_init(audiodtmf_t *dtmf);
- apr_status_t audiodtmf_term(audiodtmf_t *dtmf);
- #ifdef __cplusplus
- } // extern "C" {
- #endif
- #endif //__AUDIODTMF_H__
|