]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
chan_dahdi: Populate CALLERID(ani2) for incoming calls in featdmf signaling mode.
authorRichard Mudgett <rmudgett@digium.com>
Thu, 18 Dec 2014 19:35:19 +0000 (19:35 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Thu, 18 Dec 2014 19:35:19 +0000 (19:35 +0000)
For the featdmf signaling mode the incoming MF Caller-ID information is
formatted as follows: *${CALLERID(ani2)}${CALLERID(ani)}#*${EXTEN}#

Rather than discarding the ani2 digits, populate the CALLERID(ani2) value
with what is received instead.

AST-1368 #close
Reported by: Denis Martinez
Patches:
      extract_ani2_for_featdmf_v11.patch (license #5621) patch uploaded by Richard Mudgett

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@429783 65c4cc65-6c06-0410-ace0-fbb531ad65f3

UPGRADE.txt
channels/sig_analog.c

index 1ec4811baf246b5f43d298d16192d4f2a0743a9c..6ca858690c591847cd5deb66831d067c9f9421f5 100644 (file)
 ===
 ===========================================================
 
+from 11.15 to 11.16
+chan_dahdi:
+ - The CALLERID(ani2) value for incoming calls is now populated in featdmf
+   signaling mode.  The information was previously discarded.
+
 from 11.13.0 to 11.13.1:
 
 * Due to the POODLE vulnerability (see 
index cb18f954770b0d6c366d570dde2132024bedd64a..ce7c3b9e8ece81d8b61a38035066e0b8c223e45e 100644 (file)
@@ -1994,6 +1994,8 @@ static void *__analog_ss_thread(void *data)
                if ((p->sig == ANALOG_SIG_FEATDMF) || (p->sig == ANALOG_SIG_FEATDMF_TA)) {
                        if (exten[0] == '*') {
                                char *stringp=NULL;
+                               struct ast_party_caller *caller;
+
                                ast_copy_string(exten2, exten, sizeof(exten2));
                                /* Parse out extension and callerid */
                                stringp=exten2 +1;
@@ -2011,6 +2013,11 @@ static void *__analog_ss_thread(void *data)
                                } else {
                                        ast_copy_string(exten, s1 + 2, sizeof(exten));
                                }
+
+                               /* The first two digits are ani2 information. */
+                               caller = ast_channel_caller(chan);
+                               s1[2] = '\0';
+                               caller->ani2 = atoi(s1);
                        } else {
                                ast_log(LOG_WARNING, "Got a non-Feature Group D input on channel %d.  Assuming E&M Wink instead\n", p->channel);
                        }