[asterisk-commits] jpeeler: branch jpeeler/asterisk-sigwork-trunk r203190 - /team/jpeeler/asteri...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jun 25 12:07:12 CDT 2009
Author: jpeeler
Date: Thu Jun 25 12:07:08 2009
New Revision: 203190
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=203190
Log:
set cadence in chan_dahdi before calling analog_call
Modified:
team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c
Modified: team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c?view=diff&rev=203190&r1=203189&r2=203190
==============================================================================
--- team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c (original)
+++ team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c Thu Jun 25 12:07:08 2009
@@ -4107,6 +4107,29 @@
return res;
}
#endif
+
+ /* Set the ring cadence */
+ mysig = p->sig;
+ if (p->outsigmod > -1)
+ mysig = p->outsigmod;
+ switch (mysig) {
+ case SIG_FXOLS:
+ case SIG_FXOGS:
+ case SIG_FXOKS:
+ if (p->owner == ast) {
+ /* Choose proper cadence */
+ if ((p->distinctivering > 0) && (p->distinctivering <= num_cadence)) {
+ if (ioctl(p->subs[SUB_REAL].dfd, DAHDI_SETCADENCE, &cadences[p->distinctivering - 1]))
+ ast_log(LOG_WARNING, "Unable to set distinctive ring cadence %d on '%s': %s\n", p->distinctivering, ast->name, strerror(errno));
+ p->cidrings = cidrings[p->distinctivering - 1];
+ } else {
+ if (ioctl(p->subs[SUB_REAL].dfd, DAHDI_SETCADENCE, NULL))
+ ast_log(LOG_WARNING, "Unable to reset default ring on '%s': %s\n", ast->name, strerror(errno));
+ p->cidrings = p->sendcalleridafter;
+ }
+ }
+ break;
+ }
/* If this is analog signalling we can exit here */
if (analog_lib_handles(p->sig, p->radio, p->oprmode)) {
More information about the asterisk-commits
mailing list