PEM::session

Syntax


PEM::session create <framed ip % rd> subscriber-type <e164 | imsi | nai | private | mac-address | dhcp | mac-dhcp | dhcp-custom> [subscriber-id <string>] [imsi <string>] [user-name <string>] [tower-id <string>] [imeisv <string>] [provision <yes | no>] [calling-station-id <string>] [called-station-id <string>]
PEM::session info <ip addr % rd> imsi
PEM::session info <ip addr % rd> imsi <value>
PEM::session info <ip addr % rd> imeisv
PEM::session info <ip addr % rd> imeisv <value>
PEM::session info <ip addr % rd> tower-id
PEM::session info <ip addr % rd> tower-id <value>
PEM::session info <ip addr % rd> user-name
PEM::session info <ip addr % rd> user-name <value>
PEM::session info <ip addr % rd> subscriber-type
PEM::session info <ip addr % rd> subscriber-id
PEM::session info <ip addr % rd> state
PEM::session info <ip addr % rd> state  <value>
PEM::session info <ip addr % rd> calling-station-id
PEM::session info <ip addr % rd> calling-station-id <value>
PEM::session info <ip addr % rd> called-station-id
PEM::session info <ip addr % rd> called-station-id <value>
PEM::session info <ip addr % rd> subscriber <subscriber id> <subscriber type>
PEM::session info attr delete <ip addr % rd> <attr>
PEM::session info attr <ip addr % rd> <attr>
PEM::session info attr <ip addr % rd> <attr> <value>
PEM::session delete <ip addr % rd>
PEM::session config policy referential set <framed ipaddr % rd> <list of referential policies>
PEM::session config policy referential update <framed ipaddr % rd> add <list of referential policies> delete <list of referential policies>
PEM::session config policy get <framed ipaddr % rd>
PEM::session ip <subscriber id> <subscriber type>
PEM::session stats reported <stats-name>

PEM::session create subscriber-type [subscriber-id ] [imsi ] [user-name ] [tower-id ] [imeisv ] [provision ] [calling-station-id ] [called-station-id ]

Create a PEM Session for of : which can be
  • e164 The subscriber id type is e164. E164: A numbering plan that defines the format of an MSISDN international phone number (up to 15 digits). The number typically consists of three fields: country code, national destination code, and subscriber number.
  • imsi The subscriber id type is imsi. IMSI: International Mobile Subscriber Identity. A globally unique code number that identifies a GSM, UMTS, or LTE mobile phone user.
  • nai The subscriber id type is nai. NAI: Network Access Identifier. A fully qualified network name in the form user@realm; identifies a subscriber and the home network to which the subscriber belongs.
  • private The subscriber id type is private. Private: The subscriber ID type is private for the given deployment.
  • dhcp The subscriber id type is dhcp. Dhcp: The subscriber ID type is dhcp for the given deployment.
  • dhcp-custom The subscriber id type is dhcp-custom. Dhcp-custom: For subscribers discovered via DHCP: an identifier created using a custom TCL snippet.
  • mac-address The subscriber id type is mac-address. Mac-address: For subscribers discovered via DHCP: subscriber MAC address in a standard IEEE 802 format for MAC-48 (six groups of two hexadecimal digits, separated by colons ‘:’).
  • mac-dhcp The subscriber id type is mac-dhcp. Mac-dhcp: When using PEM discovery this type is used to indicate a concatenation of mac-address and dhcp identifier as configured in the corresponding DHCP profile.
  • subscriber-id sets subscriber to specified value
  • imsi sets imsi to specified value To be able to set the imsi value, you need to use the “format %d” command. This is an example on how to do it:

when PEM_POLICY {
     set ip [IP::client_addr]
     log local0. "------- Matched PEM Policy [PEM::policy name] ---------"
     log local0. "Changing Subscriber IMSI with command PEM::session info $ip imsi [format %d 83901308083901900]"
     PEM::session info $ip imsi [format %d 83901308083901900]
     log local0. "Subscriber imsi [PEM::session info [IP::client_addr] imsi]"
     log local0. "----------------------------------------------------"
}
  • user-name sets user-name to specified value
  • tower-id sets tower name to specified value
  • imeisv sets imeisv to specified value To be able to set the imsi value, you need to use the “format %d” command. This is an example on how to do it:

when PEM_POLICY {
     set ip [IP::client_addr]
     log local0. "------- Matched PEM Policy [PEM::policy name] ---------"
     log local0. "Changing Subscriber IMEISV with command PEM::session info $ip imeisv  [format %d 359407080489390]"
     PEM::session info $ip imeisv  [format %d 359407080489390]
     after 100
     log local0. "Subscriber imeisv [PEM::session info [IP::client_addr] imeisv]"
     log local0. "----------------------------------------------------"
}
  • provision default is yes, when no it disabled policy retrieval via Gx for this subscriber.
  • calling-station-id sets calling-station-id to specified value
  • called-station-id sets called-station-id (APN) to specified value
  • subscriber Set the value of the subscriber ID and Type for a session. Here is an example how to do it

when PEM_POLICY {
     set ip [IP::client_addr]
     log local0. "------- Matched PEM Policy [PEM::policy name] ---------"
     log local0. "Changing Subscriber ID and type with command PEM::session info $ip subscriber 10.10.10.10 nai"
     PEM::session info $ip subscriber "10.10.10.10" "nai"
     log local0. "Subscriber Type [PEM::session info [IP::client_addr] subscriber-type]"
     log local0. "Subscriber ID [PEM::session info [IP::client_addr] subscriber-id]"
     log local0. "----------------------------------------------------"
}

PEM::session info imsi | imeisv | tower-id | user-name | subs-type | subs-id | state | calling-station-id | called-station-id

  • retrieve current SPM session state

PEM::session info tower-id | user-name | state

  • retrieve the current SPM session state

    • State Values:

      • prov_pending

      • provisioned

      • prov_failed

      • marked_delete

        Note: The states below are all provided for backwards-compatibility, but are all mapped to one of the four states above. Unless you have a historically compelling case to utilize the state information below, you can safely disregard.

      • init

      • prov_ssp_sid_pending - subscriber provisioning is waiting for a policy provisioning by SID response from SSP module

      • prov_ppe_sid_pending - subscriber provisioning is waiting for a policy provisioning by SID response from PCRF (Gx endpoint)

      • prov_sid_failed - provisioning by SID failed

      • prov_sid_tbd - provisioning request by IP address is in progress. Provisioning by SID is postponed

      • prov_ip_pending

      • prov_ip_failed

      • prov_conditionally

      • prov_ip

      • prov_unknown

      • mark_delete

      • final_usage_pending

      • final_usage_sent

      • final_delete_initiated

      • final_delete

      • final


PEM::session info attr delete

  • Delete session custom attribute

PEM::session info attr

  • get session custom attribute

PEM::session info attr

  • add a custom attribute to the subscriber session

PEM::session delete

  • delete session

PEM::session config policy referential set

  • set a referential policy to this pem session

PEM::session config policy referential update add delete

  • update/add a referential policy to this pem session

PEM::session config policy get

  • returns a list of policies applied to the subscriber specifying the IP address

PEM::session ip

  • return subscriber IP address when given subscriber id and type

PEM::session stats reported

  • Note: PEM::session stats reported only works in format-script of pem session reporting, not iRule scope

The BIG-IP API Reference documentation contains community-contributed content. F5 does not monitor or control community code contributions. We make no guarantees or warranties regarding the available code, and it may contain errors, defects, bugs, inaccuracies, or security vulnerabilities. Your access to and use of any code available in the BIG-IP API reference guides is solely at your own risk.