Determine the channel type needed. This is based on GSM 04.08 9.1.8, Table 9.3 and 9.3a. The following is assumed about the global BTS capabilities: - We do not support call reestablishment. - We do not support GPRS. @param RA The request reference from the channel request message. @return channel type code, undefined if not a supported service */
| 64 | @return channel type code, undefined if not a supported service |
| 65 | */ |
| 66 | static |
| 67 | ChannelType decodeChannelNeeded(unsigned RA) |
| 68 | { |
| 69 | // This code is based on GSM 04.08 Table 9.9. section 9.1.8 |
| 70 | |
| 71 | unsigned RA4 = RA>>4; |
| 72 | unsigned RA5 = RA>>5; |
| 73 | |
| 74 | |
| 75 | // We use VEA for all emergency calls, regardless of configuration. |
| 76 | if (RA5 == 0x05) return TCHFType; // emergency call |
| 77 | |
| 78 | // Answer to paging, Table 9.9a. |
| 79 | // We don't support TCH/H, so it's wither SDCCH or TCH/F. |
| 80 | // The spec allows for "SDCCH-only" MS. We won't support that here. |
| 81 | // FIXME -- So we probably should not use "any channel" in the paging indications. |
| 82 | if (RA5 == 0x04) return TCHFType; // any channel or any TCH. |
| 83 | if (RA4 == 0x01) return SDCCHType; // SDCCH |
| 84 | if (RA4 == 0x02) return TCHFType; // TCH/F |
| 85 | if (RA4 == 0x03) return TCHFType; // TCH/F |
| 86 | if ((RA&0xf8) == 0x78 && RA != 0x7f) return PSingleBlock1PhaseType; |
| 87 | if ((RA&0xf8) == 0x70) return PSingleBlock2PhaseType; |
| 88 | |
| 89 | int NECI = gConfig.getNum("GSM.CellSelection.NECI"); |
| 90 | if (NECI==0) { |
| 91 | if (RA5 == 0x07) return SDCCHType; // MOC or SDCCH procedures |
| 92 | if (RA5 == 0x00) return SDCCHType; // location updating |
| 93 | } else { |
| 94 | if (gConfig.getBool("Control.VEA")) { |
| 95 | // Very Early Assignment |
| 96 | if (RA5 == 0x07) return TCHFType; // MOC for TCH/F |
| 97 | if (RA4 == 0x04) return TCHFType; // MOC, TCH/H sufficient |
| 98 | } else { |
| 99 | // Early Assignment |
| 100 | if (RA5 == 0x07) return SDCCHType; // MOC for TCH/F |
| 101 | if (RA4 == 0x04) return SDCCHType; // MOC, TCH/H sufficient |
| 102 | } |
| 103 | if (RA4 == 0x00) return SDCCHType; // location updating |
| 104 | if (RA4 == 0x01) return SDCCHType; // other procedures on SDCCH |
| 105 | } |
| 106 | |
| 107 | // Anything else falls through to here. |
| 108 | // We are still ignoring data calls, LMU. |
| 109 | return UndefinedCHType; |
| 110 | } |
| 111 | |
| 112 | |
| 113 | /** Return true if RA indicates LUR. */ |
no outgoing calls
no test coverage detected