Neels Hofmeyr | 25dd785 | 2017-09-25 16:37:34 +0200 | [diff] [blame] | 1 | [[hlr-ctrl]] |
| 2 | == Control interface |
| 3 | |
| 4 | The actual protocol is described in <<common-control-if>>, the variables common |
| 5 | to all programs using it are described in <<ctrl_common_vars>>. This section |
| 6 | describes the CTRL interface variables specific to OsmoHLR. |
| 7 | |
| 8 | All subscriber variables are available by different selectors, which are freely |
| 9 | interchangeable: |
| 10 | |
| 11 | .Subscriber selectors available on OsmoHLR's Control interface |
| 12 | [options="header",width="100%",cols="35%,65%"] |
| 13 | |=== |
| 14 | |Selector|Comment |
| 15 | |subscriber.*by-imsi-*'123456'.*|Subscriber selector by IMSI, replace "123456" with the actual IMSI |
| 16 | |subscriber.*by-msisdn-*'123456'.*|Subscriber selector by MSISDN |
| 17 | |subscriber.*by-id-*'123456'.*|Subscriber selector by database ID |
| 18 | |=== |
| 19 | |
| 20 | Each of the above selectors feature all of these control variables: |
| 21 | |
| 22 | .Subscriber variables available on OsmoHLR's Control interface |
| 23 | [options="header",width="100%",cols="35%,8%,8%,8%,41%"] |
| 24 | |=== |
| 25 | |Name|Access|Trap|Value|Comment |
| 26 | |subscriber.by-\*.*info*|R|No||List (short) subscriber information |
| 27 | |subscriber.by-\*.*info-aud*|R|No||List subscriber authentication tokens |
| 28 | |subscriber.by-\*.*info-all*|R|No||List both 'info' and 'info-aud' in one |
| 29 | |subscriber.by-\*.*cs-enabled*|RW|No|'1' or '0'|Enable/disable circuit-switched access |
| 30 | |subscriber.by-\*.*ps-enabled*|RW|No|'1' or '0'|Enable/disable packet-switched access |
| 31 | |=== |
| 32 | |
| 33 | === subscriber.by-*.info, info-aud, info-all |
| 34 | |
| 35 | Query the HLR database and return current subscriber record, in multiple lines |
| 36 | of the format |
| 37 | |
| 38 | ---- |
| 39 | name<tab>value |
| 40 | ---- |
| 41 | |
Neels Hofmeyr | 7e2d3c7 | 2017-10-24 15:47:12 +0200 | [diff] [blame] | 42 | To keep the reply as short as possible, some values are omitted if they are |
| 43 | empty. These are the returned values and their presence |
Neels Hofmeyr | 25dd785 | 2017-09-25 16:37:34 +0200 | [diff] [blame] | 44 | modalities; for their meaning, see <<subscriber-params>>: |
| 45 | |
| 46 | .Returned values by OsmoHLR's 'info', 'info-all' and 'info-aud' commands |
| 47 | [options="header",width="100%",cols="15%,15%,30%,40%"] |
| 48 | |=== |
| 49 | |Returned by 'info-all' and|Name|Format|Presence |
| 50 | |'info'|id|-9223372036854775808 .. 9223372036854775807 (usually not negative)|always |
| 51 | |'info'|imsi|6 to 15 decimal digits|always |
| 52 | |'info'|msisdn|1 to 15 decimal digits|when non-empty |
Neels Hofmeyr | 7e2d3c7 | 2017-10-24 15:47:12 +0200 | [diff] [blame] | 53 | |'info'|nam_cs|'1' if CS is enabled, or '0'|always |
| 54 | |'info'|nam_ps|'1' if PS is enabled, or '0'|always |
Neels Hofmeyr | 25dd785 | 2017-09-25 16:37:34 +0200 | [diff] [blame] | 55 | |'info'|vlr_number|up to 15 decimal digits|when non-empty |
| 56 | |'info'|sgsn_number|up to 15 decimal digits|when non-empty |
| 57 | |'info'|sgsn_address||when non-empty |
Neels Hofmeyr | 7e2d3c7 | 2017-10-24 15:47:12 +0200 | [diff] [blame] | 58 | |'info'|ms_purged_cs|'1' if CS is purged, or '0'|always |
| 59 | |'info'|ms_purged_ps|'1' if PS is purged, or '0'|always |
| 60 | |'info'|periodic_lu_timer|0..4294967295|always |
| 61 | |'info'|periodic_rau_tau_timer|0..4294967295|always |
| 62 | |'info'|lmsi|8 hex digits|always |
Neels Hofmeyr | 25dd785 | 2017-09-25 16:37:34 +0200 | [diff] [blame] | 63 | |'info-aud'|aud2g.algo|one of 'comp128v1', 'comp128v2', 'comp128v3' or 'xor'|when valid 2G auth data is set |
| 64 | |'info-aud'|aud2g.ki|32 hexadecimal digits|when valid 2G auth data is set |
| 65 | |'info-aud'|aud3g.algo|so far always 'milenage'|when valid 3G auth data is set |
| 66 | |'info-aud'|aud3g.k|32 hexadecimal digits|when valid 3G auth data is set |
| 67 | |'info-aud'|aud3g.op|32 hexadecimal digits|when valid 3G auth data is set, *not* when OPC is set |
| 68 | |'info-aud'|aud3g.opc|32 hexadecimal digits|when valid 3G auth data is set, *not* when OP is set |
| 69 | |'info-aud'|aud3g.ind_bitlen|0..28|when valid 3G auth data is set |
| 70 | |'info-aud'|aud3g.sqn|0 .. 18446744073709551615|when valid 3G auth data is set |
| 71 | |=== |
| 72 | |
| 73 | This is an example Control Interface transcript that illustrates the various |
| 74 | 'info' commands: |
| 75 | |
| 76 | ---- |
| 77 | include::../example_subscriber_info.ctrl[] |
| 78 | ---- |
| 79 | |
| 80 | === subscriber.by-*.ps-enabled, cs-enabled |
| 81 | |
| 82 | Disable or enable packet-/circuit-switched access for the given IMSI; |
| 83 | |
| 84 | * 'ps-enabled' switches access to GPRS or UMTS data services, |
| 85 | * 'cs-enabled' switches access to voice services. |
| 86 | |
| 87 | When disabled, the next time this subscriber attempts to do a Location Updating |
| 88 | GSUP operation for the given domain (i.e. from the SGSN for 'ps-enabled', from |
| 89 | the MSC/VLR for 'cs-enabled'), it will be rejected by OsmoHLR. Currently |
| 90 | connected GSUP clients will be notified via GSUP when a subscriber is being |
| 91 | disabled, so that the subscriber can be dropped in case it is currently |
| 92 | attached. |
| 93 | |
| 94 | The current 'ps-enabled'/'cs-enabled' status can be queried by 'GET' commands, |
| 95 | and also by looking at 'nam_ps' and 'nam_cs' in a 'subscriber.by-*.info' |
| 96 | response. |
| 97 | |
| 98 | A value of "1" indicates that the given domain is enabled, which is the |
| 99 | default; a value of "0" disables access. |
| 100 | |
| 101 | This is an example transcript that illustrates 'ps-enabled' and 'cs-enabled' |
| 102 | commands: |
| 103 | |
| 104 | ---- |
| 105 | include::../example_subscriber_cs_ps_enabled.ctrl[] |
| 106 | ---- |