[asterisk-commits] pcadach: branch pcadach/chan_h323-live r39860 -
/team/pcadach/chan_h323-live/...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Aug 15 11:14:51 MST 2006
Author: pcadach
Date: Tue Aug 15 13:14:50 2006
New Revision: 39860
URL: http://svn.digium.com/view/asterisk?rev=39860&view=rev
Log:
Correctly handle flashhook when received as USERINPUT signal
Modified:
team/pcadach/chan_h323-live/channels/chan_h323.c
Modified: team/pcadach/chan_h323-live/channels/chan_h323.c
URL: http://svn.digium.com/view/asterisk/team/pcadach/chan_h323-live/channels/chan_h323.c?rev=39860&r1=39859&r2=39860&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/channels/chan_h323.c (original)
+++ team/pcadach/chan_h323-live/channels/chan_h323.c Tue Aug 15 13:14:50 2006
@@ -1182,17 +1182,23 @@
return -1;
}
if (pvt->owner && !ast_mutex_trylock(&pvt->owner->lock)) {
- struct ast_frame f = {
- .frametype = AST_FRAME_DTMF,
- .subclass = digit,
- .samples = 800,
- .src = "SEND_DIGIT",
- };
-
- res = ast_queue_frame(pvt->owner, &f);
+ if (digit == '!')
+ res = ast_queue_control(pvt->owner, AST_CONTROL_FLASH);
+ else {
+ struct ast_frame f = {
+ .frametype = AST_FRAME_DTMF,
+ .subclass = digit,
+ .samples = 800,
+ .src = "SEND_DIGIT",
+ };
+ res = ast_queue_frame(pvt->owner, &f);
+ }
ast_mutex_unlock(&pvt->owner->lock);
} else {
- pvt->newdigit = digit;
+ if (digit == '!')
+ pvt->newcontrol = AST_CONTROL_FLASH;
+ else
+ pvt->newdigit = digit;
res = 0;
}
ast_mutex_unlock(&pvt->lock);
More information about the asterisk-commits
mailing list