mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 20:04:50 +00:00
sig_analog: Allow immediate fake ring to be suppressed.
When immediate=yes on an FXS channel, sig_analog will start fake audible ringback that continues until the channel is answered. Even if it answers immediately, the ringback is still audible for a brief moment. This can be disruptive and unwanted behavior. This adds an option to disable this behavior, though the default behavior remains unchanged. ASTERISK-30003 #close Resolves: #118 UserNote: The immediatering option can now be set to no to suppress the fake audible ringback provided when immediate=yes on FXS channels.
This commit is contained in:
@@ -3815,7 +3815,10 @@ void *analog_handle_init_event(struct analog_pvt *i, int event)
|
||||
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);
|
||||
|
Reference in New Issue
Block a user