Trying to finish the last of the charge_number patch up #10916
authorMatthew Fredrickson <creslin@digium.com>
Fri, 12 Oct 2007 19:41:39 +0000 (19:41 +0000)
committerMatthew Fredrickson <creslin@digium.com>
Fri, 12 Oct 2007 19:41:39 +0000 (19:41 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85526 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_zap.c
doc/tex/channelvariables.tex

index fd54b8e..d805745 100644 (file)
@@ -2243,6 +2243,7 @@ static int zt_call(struct ast_channel *ast, char *rdest, int timeout)
                int called_nai_strip;
                char ss7_calling_nai;
                int calling_nai_strip;
+               const char *charge_str = NULL;
 
                c = strchr(dest, '/');
                if (c)
@@ -2306,6 +2307,12 @@ static int zt_call(struct ast_channel *ast, char *rdest, int timeout)
                isup_set_oli(p->ss7call, ast->cid.cid_ani2);
                isup_init_call(p->ss7->ss7, p->ss7call, p->cic, p->dpc);
 
+               /* Set the charge number if it is set */
+               charge_str = pbx_builtin_getvar_helper(ast, "SS7_CHARGE_NUMBER");
+               if (charge_str)
+                       isup_set_charge(p->ss7call, charge_str, SS7_ANI_CALLING_PARTY_SUB_NUMBER, 0x10);
+
+
                isup_iam(p->ss7->ss7, p->ss7call);
                ast_setstate(ast, AST_STATE_DIALING);
                ss7_rel(p->ss7);
index 1dfcfc2..3bdfd99 100644 (file)
@@ -693,6 +693,7 @@ ${CDR(accountcode)}    * Account code (if specified)
 ${BLINDTRANSFER}         The name of the channel on the other side of a blind transfer
 ${BRIDGEPEER}            Bridged peer
 ${CALLERID(ani)}       * Caller ANI (PRI channels)
+${CALLERID(ani2)}      * ANI2 (Info digits) also called Originating line information or OLI
 ${CALLERID(all)}       * Caller ID
 ${CALLERID(dnid)}      * Dialed Number Identifier
 ${CALLERID(name)}      * Caller ID Name only