]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
sig_analog: Skip Caller ID spill if usecallerid=no.
authorNaveen Albert <asterisk@phreaknet.org>
Mon, 25 Aug 2025 17:05:15 +0000 (13:05 -0400)
committerNaveen Albert <asterisk@phreaknet.org>
Wed, 27 Aug 2025 15:10:45 +0000 (15:10 +0000)
If Caller ID is disabled for an FXS port, then we should not send any
Caller ID spill on the line, as we have no Caller ID information that
we can/should be sending.

Resolves: #1394

channels/sig_analog.c
configs/samples/chan_dahdi.conf.sample

index 7acd3f52e31f570d46f12f9853b37b9afb48fe44..7eb222dba45a5aa870ab19ca186fb72d436d069c 100644 (file)
@@ -390,6 +390,12 @@ static int analog_unalloc_sub(struct analog_pvt *p, enum analog_sub x)
 
 static int analog_send_callerid(struct analog_pvt *p, int cwcid, struct ast_party_caller *caller)
 {
+       /* If Caller ID is disabled for the line, that means we do not send ANY spill whatsoever. */
+       if (!p->use_callerid) {
+               ast_debug(1, "Caller ID is disabled for channel %d, skipping spill\n", p->channel);
+               return 0;
+       }
+
        ast_debug(1, "Sending callerid.  CID_NAME: '%s' CID_NUM: '%s'\n",
                caller->id.name.str,
                caller->id.number.str);
index 8797c677b3a2797ae3ead3056f425c7b359f652e..92ed4877a0afd6c8dcc23f726df3500d07893234 100644 (file)
@@ -570,6 +570,9 @@ context=public
 ;
 ; Whether or not to use caller ID:
 ;
+; On FXO ports, this enables detecting Caller ID on the incoming phone call.
+; On FXS ports, this enables sending a Caller ID spill to CPE.
+;
 usecallerid=yes
 ;
 ; NOTE: If the CALL_QUALIFIER variable on the channel is set to 1,