Changeset 2240

Show
Ignore:
Timestamp:
08/09/06 21:19:08 (7 years ago)
Author:
p_lindheimer
Message:

keep original CID when forwarding NXXXXXX# style formatted numbers in ringgroups/followme

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/amp_conf/agi-bin/dialparties.agi

    r2227 r2240  
    4848$cidname = $AGI->request['agi_calleridname']; 
    4949debug("Caller ID name is '$cidname' number is '$cidnum'", 1); 
     50 
     51// From this point forward, Set KEEPCID in the channel so subsequent calls, CF, etc. retain the incoming 
     52// CID that get sent down channel local. 
     53// 
     54$AGI->set_variable('_KEEPCID','TRUE');             
    5055 
    5156$timer    = get_var( $AGI, "ARG1" ); 
  • freepbx/trunk/amp_conf/astetc/extensions.conf

    r2202 r2240  
    604604exten => s,n,Set(REALCALLERIDNUM=${CALLERID(number)}) 
    605605exten => s,n(start),NoOp(REALCALLERIDNUM is ${REALCALLERIDNUM}) 
    606 exten => s,n,Set(USEROUTCID=${DB(AMPUSER/${REALCALLERIDNUM}/outboundcid)}) 
    607 exten => s,n,Set(EMERGENCYCID=${DB(DEVICE/${REALCALLERIDNUM}/emergency_cid)}) 
     606 
     607; If this came through a ringgroup or CF, then we want to retain original CID 
     608
     609exten => s,n,GotoIf($["${KEEPCID}" != "TRUE"]?normcid) ;Set to TRUE if coming from ringgroups, CF, etc. 
     610exten => s,n,GotoIf($["foo${REALCALLERIDNUM}" = "foo"]?normcid) ;if not set to anything, go through normal processing 
     611exten => s,n,Set(USEROUTCID=${REALCALLERIDNUM}) 
     612 
     613; 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 
     614; call (would be quite a conincidence if not) and go through the normal processing to get that CID. If a device 
     615; is set for this CID, then it must be internal 
     616
     617exten => s,n,GotoIf($["foo${DB(AMPUSER/${REALCALLERIDNUM}/device}" = "foo"]?bypass:normcid) 
     618 
     619exten => s,n(normcid),Set(USEROUTCID=${DB(AMPUSER/${REALCALLERIDNUM}/outboundcid)}) 
     620exten => s,n(bypass),Set(EMERGENCYCID=${DB(DEVICE/${REALCALLERIDNUM}/emergency_cid)}) 
    608621exten => s,n,Set(TRUNKOUTCID=${OUTCID_${ARG1}}) 
    609622exten => s,n,GotoIf($["${EMERGENCYROUTE:1:2}" = ""]?trunkcid) ; check EMERGENCY ROUTE