mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-12 10:07:26 +00:00
fix overlooked dtmf changed
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6992 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
0624a541d8
commit
079975d3c3
@ -55,7 +55,7 @@ struct soundtouch_helper {
|
|||||||
int literal;
|
int literal;
|
||||||
};
|
};
|
||||||
|
|
||||||
static switch_status_t on_dtmf(switch_core_session_t *session, const char *dtmf)
|
static switch_status_t on_dtmf(switch_core_session_t *session, const switch_dtmf_t *dtmf)
|
||||||
{
|
{
|
||||||
|
|
||||||
switch_media_bug_t *bug;
|
switch_media_bug_t *bug;
|
||||||
@ -65,20 +65,13 @@ static switch_status_t on_dtmf(switch_core_session_t *session, const char *dtmf)
|
|||||||
struct soundtouch_helper *sth = (struct soundtouch_helper *) switch_core_media_bug_get_user_data(bug);
|
struct soundtouch_helper *sth = (struct soundtouch_helper *) switch_core_media_bug_get_user_data(bug);
|
||||||
|
|
||||||
if (sth) {
|
if (sth) {
|
||||||
const char *p;
|
|
||||||
|
|
||||||
if (sth->literal) {
|
if (sth->literal) {
|
||||||
sth->literal = 0;
|
sth->literal = 0;
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (p = dtmf; p && *p; p++) {
|
|
||||||
if (sth->literal) {
|
|
||||||
sth->literal = 0;
|
|
||||||
return SWITCH_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch(*p) {
|
switch(dtmf->digit) {
|
||||||
case '*':
|
case '*':
|
||||||
sth->literal++;
|
sth->literal++;
|
||||||
break;
|
break;
|
||||||
@ -146,7 +139,7 @@ static switch_status_t on_dtmf(switch_core_session_t *session, const char *dtmf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return SWITCH_STATUS_FALSE;
|
return SWITCH_STATUS_FALSE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user