diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-08-31 01:59:02 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-08-31 01:59:02 +0000 |
commit | 3f22aa53af0a7bb3efb280a1adda11f00a7f68fc (patch) | |
tree | 95a924d57b906428b26d398758facf98b92bdcb2 /channels/chan_mgcp.c | |
parent | 0fcb352fba60344329a582f891ddd4433f48c6fa (diff) |
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: http://svn.digium.com/svn/asterisk/trunk@41507 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_mgcp.c')
-rw-r--r-- | channels/chan_mgcp.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c index c77b8a61e..05ab81edf 100644 --- a/channels/chan_mgcp.c +++ b/channels/chan_mgcp.c @@ -427,7 +427,8 @@ static struct ast_frame *mgcp_read(struct ast_channel *ast); static int mgcp_write(struct ast_channel *ast, struct ast_frame *frame); static int mgcp_indicate(struct ast_channel *ast, int ind, const void *data, size_t datalen); static int mgcp_fixup(struct ast_channel *oldchan, struct ast_channel *newchan); -static int mgcp_senddigit(struct ast_channel *ast, char digit); +static int mgcp_senddigit_begin(struct ast_channel *ast, char digit); +static int mgcp_senddigit_end(struct ast_channel *ast, char digit); static int mgcp_devicestate(void *data); static const struct ast_channel_tech mgcp_tech = { @@ -444,7 +445,8 @@ static const struct ast_channel_tech mgcp_tech = { .write = mgcp_write, .indicate = mgcp_indicate, .fixup = mgcp_fixup, - .send_digit = mgcp_senddigit, + .send_digit_begin = mgcp_senddigit_begin, + .send_digit_end = mgcp_senddigit_end, .bridge = ast_rtp_bridge, }; @@ -1221,7 +1223,13 @@ static int mgcp_fixup(struct ast_channel *oldchan, struct ast_channel *newchan) return 0; } -static int mgcp_senddigit(struct ast_channel *ast, char digit) +static int mgcp_senddigit_begin(struct ast_channel *ast, char digit) +{ + /* Let asterisk play inband indications */ + return -1; +} + +static int mgcp_senddigit_end(struct ast_channel *ast, char digit) { struct mgcp_subchannel *sub = ast->tech_pvt; char tmp[4]; @@ -1233,7 +1241,7 @@ static int mgcp_senddigit(struct ast_channel *ast, char digit) ast_mutex_lock(&sub->lock); transmit_notify_request(sub, tmp); ast_mutex_unlock(&sub->lock); - return -1; + return -1; /* Return non-zero so that Asterisk will stop the inband indications */ } /*! |