Changeset 3030

Show
Ignore:
Timestamp:
11/08/06 02:48:45 (7 years ago)
Author:
qldrob
Message:

Revert to r2240 with OUTKEEPCID changes. Sorry, philippe! 8)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/amp_conf/astetc/extensions.conf

    r2994 r3030  
    693693; macro-user-callerid should be called _before_ using this macro 
    694694[macro-outbound-callerid] 
     695; Keep the original CallerID number, for failover to the next trunk. 
    695696exten => s,1,GotoIf($["${REALCALLERIDNUM:1:2}" != ""]?start) 
    696697exten => s,n,Set(REALCALLERIDNUM=${CALLERID(number)}) 
    697698exten => s,n(start),NoOp(REALCALLERIDNUM is ${REALCALLERIDNUM}) 
    698699 
    699 ; If this came through a ringgroup or CF, then we want to retain original CID 
    700 ; unless KEEPCID is set and there's a TRUNK OVERRIDE.  This is usually set because 
    701 ; the users VSP or PSTN provider can only accept a limited range of CID's on  
    702 ; outbound calls. 
    703  
    704 ; Check to see if there's a TRUNK CID 
    705 exten => s,n,Set(TRUNKOUTCID=${OUTCID_${ARG1}}) 
    706 ; If there is _and_ if OUTKEEPCID is set to 'On', go to trunkcid, which uses that. 
    707 exten => s,n,GotoIf($[$["x${OUTKEEPCID_${ARG1}}"!="xon"]&$["x${TRUNKOUTCID:1:2}"!="x"]]?trunkcid) 
    708 ; If there's not, does KEEPCID exist? If it's not TRUE, then try to load the AMPUSER/xtn/outboundcid key 
    709 exten => s,n,GotoIf($["${KEEPCID}" != "TRUE"]?normcid) ;Dialparties sets this to TRUE if coming from ringgroups, CF, etc. 
    710 ; REALCALLERID number was set above, to the caller ID. If there's no CID, go through normal processing. 
     700; If this came through a ringgroup or CF, then we want to retain original CID unless 
     701; OUTKEEPCID_${trunknum} is set. 
     702
     703exten => s,n,GotoIf($["${KEEPCID}" != "TRUE"]?normcid) ;Set to TRUE if coming from ringgroups, CF, etc. 
     704exten => s,n,GotoIf($["x${OUTKEEPCID_${ARG1}}"!="xon"]?normcid) 
    711705exten => s,n,GotoIf($["foo${REALCALLERIDNUM}" = "foo"]?normcid) ;if not set to anything, go through normal processing 
    712706exten => s,n,Set(USEROUTCID=${REALCALLERIDNUM}) 
    713707 
    714 ; We now have to make sure the CID is valid. If we find an AMPUSER with the same CID, we assume it is an internal 
    715 ; call (would be quite a conincidence if not) and go through the normal processing to get that CID. If a device 
    716 ; is set for this CID, then it must be internal 
    717 ; 
    718 exten => s,n,GotoIf($["foo${DB(AMPUSER/${REALCALLERIDNUM}/device)}" = "foo"]?bypass:normcid) 
     708; We now have to make sure the CID is valid. If we find an AMPUSER with the same CID, we assume it is an internal  
     709; call (would be quite a conincidence if not) and go through the normal processing to get that CID. If a device  
     710; is set for this CID, then it must be internal  
     711;  
     712exten => s,n,GotoIf($["foo${DB(AMPUSER/${REALCALLERIDNUM}/device}" = "foo"]?bypass:normcid)  
    719713 
    720714exten => s,n(normcid),Set(USEROUTCID=${DB(AMPUSER/${REALCALLERIDNUM}/outboundcid)}) 
    721715exten => s,n(bypass),Set(EMERGENCYCID=${DB(DEVICE/${REALCALLERIDNUM}/emergency_cid)}) 
     716exten => s,n,Set(TRUNKOUTCID=${OUTCID_${ARG1}}) 
    722717exten => s,n,GotoIf($["${EMERGENCYROUTE:1:2}" = ""]?trunkcid) ; check EMERGENCY ROUTE 
    723718exten => s,n,GotoIf($["${EMERGENCYCID:1:2}" = ""]?trunkcid) ; empty EMERGENCY CID, so default back to trunk