| 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 | ; |
|---|
| | 609 | exten => s,n,GotoIf($["${KEEPCID}" != "TRUE"]?normcid) ;Set to TRUE if coming from ringgroups, CF, etc. |
|---|
| | 610 | exten => s,n,GotoIf($["foo${REALCALLERIDNUM}" = "foo"]?normcid) ;if not set to anything, go through normal processing |
|---|
| | 611 | exten => 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 | ; |
|---|
| | 617 | exten => s,n,GotoIf($["foo${DB(AMPUSER/${REALCALLERIDNUM}/device}" = "foo"]?bypass:normcid) |
|---|
| | 618 | |
|---|
| | 619 | exten => s,n(normcid),Set(USEROUTCID=${DB(AMPUSER/${REALCALLERIDNUM}/outboundcid)}) |
|---|
| | 620 | exten => s,n(bypass),Set(EMERGENCYCID=${DB(DEVICE/${REALCALLERIDNUM}/emergency_cid)}) |
|---|