callerid.c: Parse previously ignored Caller ID parameters.

Commit f2f397c1a8 previously
made it possible to send Caller ID parameters to FXS stations
which, prior to that, could not be sent.

This change is complementary in that we now handle receiving
all these parameters on FXO lines and provide these up to
the dialplan, via chan_dahdi. In particular:

* If a redirecting reason is provided, the channel's redirecting
  reason is set. No redirecting number is set, since there is
  no parameter for this in the Caller ID protocol, but the reason
  can be checked to determine if and why a call was forwarded.
* If the Call Qualifier parameter is received, the Call Qualifier
  variable is set.
* Some comments have been added to explain why some of the code
  is the way it is, to assist other people looking at it.

With this change, Asterisk's Caller ID implementation is now
reasonably complete for both FXS and FXO operation.

Resolves: #681
This commit is contained in:
Naveen Albert
2024-04-01 17:16:29 -04:00
parent 2dc89afb2c
commit 44381b2fe9
4 changed files with 144 additions and 17 deletions

View File

@@ -192,6 +192,8 @@
You are responsible for setting it if/when needed.</para>
<para>Supporting Caller ID units will display the LDC
(Long Distance Call) indicator when they receive this parameter.</para>
<para>For incoming calls on FXO ports, if the Call Qualifier parameter is received,
this variable will also be set to 1.</para>
<para>This option must be used with a channel driver
that allows Asterisk to generate the Caller ID spill,
which currently only includes <literal>chan_dahdi</literal>.</para>