diff options
author | Richard Mudgett <rmudgett@digium.com> | 2014-12-18 20:09:21 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2014-12-18 20:09:21 +0000 |
commit | eacbb4ceb54be0492bf6bfcd3e91b171a61a50bf (patch) | |
tree | 735f8a1b36b19488cadb283d09d48fdd365f4a47 | |
parent | 546a54574fead96ca2e762e8811d3e640b763c8a (diff) |
chan_dahdi: Populate CALLERID(ani2) for incoming calls in featdmf signaling mode.
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
........
Merged revisions 429783 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 429784 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | CHANGES | 5 | ||||
-rw-r--r-- | channels/sig_analog.c | 7 |
2 files changed, 12 insertions, 0 deletions
@@ -15,6 +15,11 @@ Channel Drivers ------------------ +chan_dahdi +------------------ + * The CALLERID(ani2) value for incoming calls is now populated in featdmf + signaling mode. The information was previously discarded. + chan_sip ------------------ * New 'rtpbindaddr' global setting. This allows a user to define which diff --git a/channels/sig_analog.c b/channels/sig_analog.c index 140f5093b..3740d4b2b 100644 --- a/channels/sig_analog.c +++ b/channels/sig_analog.c @@ -1963,6 +1963,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; @@ -1980,6 +1982,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); } |