Idefisk
Tools
Tutorials
Reviews
VoIP Providers
Archives
AsteriskGuru Archives
Mailing List Archives
FAQ
Search
Memberlist
Usergroups
Register
Profile
Log in to check your private messages
Log in
[Asterisk-cvs] asterisk/channels chan_phone.c,1.7,1.8
AsteriskGuru Archives Forum Index
->
Asterisk-CVS
View previous topic
::
View next topic
Author
Message
markster at lists.digium.
Guest
Posted: Wed Sep 17, 2003 4:38 am
Post subject: [Asterisk-cvs] asterisk/channels chan_phone.c,1.7,1.8
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv30337/channels
Modified Files:
chan_phone.c
Log Message:
DTMF enhancements
Index: chan_phone.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_phone.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- chan_phone.c 16 Aug 2003 05:10:35 -0000 1.7
+++ chan_phone.c 17 Sep 2003 04:39:22 -0000 1.8
@@ -110,6 +110,7 @@
struct phone_pvt *p;
int outdigit;
p = ast->pvt->pvt;
+ ast_log(LOG_NOTICE, "Dialed %c\n", digit);
switch(digit) {
case '0':
case '1':
@@ -121,7 +122,7 @@
case '7':
case '8':
case '9':
- outdigit = digit - '0' + 1;
+ outdigit = digit - '0';
break;
case '*':
outdigit = 11;
@@ -129,11 +130,19 @@
case '#':
outdigit = 12;
break;
+ case 'f': //flash
+ case 'F':
+ ioctl(p->fd, IXJCTL_PSTN_SET_STATE, PSTN_ON_HOOK);
+ usleep(320000);
+ ioctl(p->fd, IXJCTL_PSTN_SET_STATE, PSTN_OFF_HOOK);
+ p->lastformat = -1;
+ return 0;
default:
ast_log(LOG_WARNING, "Unknown digit '%c'\n", digit);
return -1;
}
- ioctl(p->fd, PHONE_PLAY_TONE, digit);
+ ast_log(LOG_NOTICE, "Dialed %i\n", outdigit);
+ ioctl(p->fd, PHONE_PLAY_TONE, outdigit);
p->lastformat = -1;
return 0;
}
@@ -277,6 +286,9 @@
ast_log(LOG_WARNING, "Failed to start recording\n");
return -1;
}
+ //set the DTMF times (the default is too short)
+ ioctl(p->fd, PHONE_SET_TONE_ON_TIME, 300);
+ ioctl(p->fd, PHONE_SET_TONE_OFF_TIME, 200);
return 0;
}
Back to top
Display posts from previous:
All Posts
1 Day
7 Days
2 Weeks
1 Month
3 Months
6 Months
1 Year
Oldest First
Newest First
AsteriskGuru Archives Forum Index
->
Asterisk-CVS
All times are GMT
Page
1
of
1
Jump to:
Select a forum
Asterisk Mailing Lists
----------------
Asterisk-Users
Asterisk-Dev
Asterisk-CVS
Asterisk-Biz
Asterisk-Doc
Asterisk-BSD
Asterisk-Announce
Asterisk Call Centers
Asterisk-Video
Asterisk-Speech-Rec
Bristuff-Users
You
cannot
post new topics in this forum
You
cannot
reply to topics in this forum
You
cannot
edit your posts in this forum
You
cannot
delete your posts in this forum
You
cannot
vote in polls in this forum
Powered by
phpBB
© 2001, 2005 phpBB Group