From c6977b9983db4f58446bfbc65a5b028cda8244ee Mon Sep 17 00:00:00 2001 From: Joshua Colp Date: Thu, 31 Aug 2006 01:59:02 +0000 Subject: Merge in VLDTMF support with Zaptel/Core done by the ever great Darumkilla Russell Bryant and the RTP portion done by myself, Muffinlicious Joshua Colp. This has gone through so many discussions/revisions it's not funny but we finally have it! git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41507 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_iax2.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'channels/chan_iax2.c') diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 1d404c3fb..60841e0ae 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -776,7 +776,8 @@ static int expire_registry(void *data); static int iax2_answer(struct ast_channel *c); static int iax2_call(struct ast_channel *c, char *dest, int timeout); static int iax2_devicestate(void *data); -static int iax2_digit(struct ast_channel *c, char digit); +static int iax2_digit_begin(struct ast_channel *c, char digit); +static int iax2_digit_end(struct ast_channel *c, char digit); static int iax2_do_register(struct iax2_registry *reg); static int iax2_fixup(struct ast_channel *oldchannel, struct ast_channel *newchan); static int iax2_hangup(struct ast_channel *c); @@ -809,7 +810,8 @@ static const struct ast_channel_tech iax2_tech = { .properties = AST_CHAN_TP_WANTSJITTER, .requester = iax2_request, .devicestate = iax2_devicestate, - .send_digit = iax2_digit, + .send_digit_begin = iax2_digit_begin, + .send_digit_end = iax2_digit_end, .send_text = iax2_sendtext, .send_image = iax2_sendimage, .send_html = iax2_sendhtml, @@ -2379,9 +2381,14 @@ static int iax2_transmit(struct iax_frame *fr) -static int iax2_digit(struct ast_channel *c, char digit) +static int iax2_digit_begin(struct ast_channel *c, char digit) { - return send_command_locked(PTR_TO_CALLNO(c->tech_pvt), AST_FRAME_DTMF, digit, 0, NULL, 0, -1); + return send_command_locked(PTR_TO_CALLNO(c->tech_pvt), AST_FRAME_DTMF_BEGIN, digit, 0, NULL, 0, -1); +} + +static int iax2_digit_end(struct ast_channel *c, char digit) +{ + return send_command_locked(PTR_TO_CALLNO(c->tech_pvt), AST_FRAME_DTMF_END, digit, 0, NULL, 0, -1); } static int iax2_sendtext(struct ast_channel *c, const char *text) -- cgit v1.2.3