#endif
.chan = {
.context = "default",
+ .immediatering = 1,
.cid_num = "",
.cid_name = "",
.cid_tag = "",
}
#endif
tmp->immediate = conf->chan.immediate;
+ tmp->immediatering = conf->chan.immediatering;
tmp->transfertobusy = conf->chan.transfertobusy;
tmp->dialmode = conf->chan.dialmode;
if (chan_sig & __DAHDI_SIG_FXS) {
analog_p->canpark = conf->chan.canpark;
analog_p->dahditrcallerid = conf->chan.dahditrcallerid;
analog_p->immediate = conf->chan.immediate;
+ analog_p->immediatering = conf->chan.immediatering;
analog_p->permhidecallerid = conf->chan.hidecallerid; /* hidecallerid is the config setting, not permhidecallerid (~permcallwaiting above) */
/* It's not necessary to set analog_p->hidecallerid here, sig_analog will set hidecallerid=permhidecaller before each call */
analog_p->pulse = conf->chan.pulse;
}
} else if (!strcasecmp(v->name, "immediate")) {
confp->chan.immediate = ast_true(v->value);
+ } else if (!strcasecmp(v->name, "immediatering")) {
+ confp->chan.immediatering = ast_true(v->value);
} else if (!strcasecmp(v->name, "transfertobusy")) {
confp->chan.transfertobusy = ast_true(v->value);
} else if (!strcasecmp(v->name, "dialmode")) {
* \note Set from the "immediate" value read in from chan_dahdi.conf
*/
unsigned int immediate:1;
+ /*!
+ * \brief TRUE if audible ringback should be provided
+ * when immediate = yes.
+ * \note Set from the "immediatering" value read in from chan_dahdi.conf
+ */
+ unsigned int immediatering:1;
/*! \brief TRUE if in an alarm condition. */
unsigned int inalarm:1;
/*! \brief TRUE if TDD in MATE mode */
if (i->immediate) {
analog_set_echocanceller(i, 1);
/* The channel is immediately up. Start right away */
- res = analog_play_tone(i, ANALOG_SUB_REAL, ANALOG_TONE_RINGTONE);
+ if (i->immediatering) {
+ /* Play fake ringing, if we've been told to... */
+ res = analog_play_tone(i, ANALOG_SUB_REAL, ANALOG_TONE_RINGTONE);
+ }
chan = analog_new_ast_channel(i, AST_STATE_RING, 1, ANALOG_SUB_REAL, NULL);
if (!chan) {
ast_log(LOG_WARNING, "Unable to start PBX on channel %d\n", i->channel);
unsigned int dahditrcallerid:1; /*!< should we use the callerid from incoming call on dahdi transfer or not */
unsigned int hanguponpolarityswitch:1;
unsigned int immediate:1;
+ unsigned int immediatering:1; /*!< TRUE if ringing should be provided for immediate execution */
unsigned int permcallwaiting:1; /*!< TRUE if call waiting is enabled. (Configured option) */
unsigned int permhidecallerid:1; /*!< Whether to hide our outgoing caller ID or not */
unsigned int pulse:1;
;
;immediate=yes
;
+; On FXS channels (FXO signaled), specifies whether fake audible ringback should
+; be provided as soon as the channel goes off hook and immediate=yes.
+; If audio should come only from the dialplan, this option should be disabled.
+; Default is 'yes'
+;
+;immediatering=no
+;
; Specify whether flash-hook transfers to 'busy' channels should complete or
; return to the caller performing the transfer (default is yes).
;