Skip to content

Update Location

API reference for diameter.message.commands.update_location.

This module contains Update Location Request and Answer messages for the S6a/S6d interface, implementing AVPs documented in 3GPP TS 29.272.

UpdateLocation

UpdateLocation(header: MessageHeader = None, avps: list[Avp] = None)

Bases: DefinedMessage

An Update-Location base message.

This message class lists message attributes based on the current 3GPP TS 29.272 version 19.4.0 Release 19 as python properties, accessible as instance attributes. AVPs not listed in the spec protocol can be retrieved using the UpdateLocation.find_avps search method.

Examples:

AVPs accessible either as instance attributes or by searching:

>>> msg = Message.from_bytes(b"...")
>>> msg.session_id
dra1.python-diameter.org;2323;546
>>> msg.find_avps((AVP_SESSION_ID, 0))
['dra1.python-diameter.org;2323;546']

When diameter message is decoded using Message.from_bytes, it returns either an instance of UpdateLocationRequest or UpdateLocationAnswer automatically:

>>> msg = Message.from_bytes(b"...")
>>> assert msg.header.is_request is True
>>> assert isinstance(msg, UpdateLocationRequest)

When creating a new message, the UpdateLocationRequest or UpdateLocationAnswer class should be instantiated directly, and values for AVPs set as class attributes:

>>> msg = UpdateLocationRequest()
>>> msg.session_id = "dra1.python-diameter.org;2323;546"

Other, custom AVPs can be appended to the message using the UpdateLocation.append_avp method, or by overwriting the avp attribute entirely. Regardless of the custom AVPs set, the mandatory values listed in TS 29.272 must be set, however they can be set as None, if they are not to be used.

Warning

Every AVP documented for the subclasses of this command can be accessed as an instance attribute, even if the original network-received message did not contain that specific AVP. Such AVPs will be returned with the value None when accessed.

Every other AVP not mentioned here, and not present in a network-received message will raise an AttributeError when being accessed; their presence should be validated with hasattr before accessing.

UpdateLocationAnswer

UpdateLocationAnswer(
    header: MessageHeader = None, avps: list[Avp] = None
)

Bases: UpdateLocation

A Update-Location-Answer message.

auth_session_state instance-attribute

auth_session_state: int

drmp instance-attribute

drmp: int

error_diagnostic instance-attribute

error_diagnostic: int

experimental_result instance-attribute

experimental_result: ExperimentalResult

failed_avp instance-attribute

failed_avp: list[FailedAvp]

load instance-attribute

load: list[Load]

oc_olr instance-attribute

oc_olr: OcOlr

oc_supported_features instance-attribute

oc_supported_features: OcSupportedFeatures

origin_host instance-attribute

origin_host: bytes

origin_realm instance-attribute

origin_realm: bytes

proxy_info instance-attribute

proxy_info: list[ProxyInfo]

reset_id instance-attribute

reset_id: list[bytes]

result_code instance-attribute

result_code: int

route_record instance-attribute

route_record: list[bytes]

session_id instance-attribute

session_id: str

subscription_data instance-attribute

subscription_data: SubscriptionData

supported_features instance-attribute

supported_features: list[SupportedFeatures]

ula_flags instance-attribute

ula_flags: int

vendor_specific_application_id instance-attribute

vendor_specific_application_id: VendorSpecificApplicationId

UpdateLocationRequest

UpdateLocationRequest(
    header: MessageHeader = None, avps: list[Avp] = None
)

Bases: UpdateLocation

A Update-Location-Request message.

active_apn instance-attribute

active_apn: list[ActiveApn]

adjacent_plmns instance-attribute

adjacent_plmns: AdjacentPlmns

auth_session_state instance-attribute

auth_session_state: int

coupled_node_diameter_id instance-attribute

coupled_node_diameter_id: bytes

destination_host instance-attribute

destination_host: bytes

destination_realm instance-attribute

destination_realm: bytes

drmp instance-attribute

drmp: int

equivalent_plmn_list instance-attribute

equivalent_plmn_list: EquivalentPlmnList

gmlc_address instance-attribute

gmlc_address: str

homogenous_support_of_ims_voice_over_ps_session instance-attribute

homogenous_support_of_ims_voice_over_ps_session: int

mme_number_for_mt_sms instance-attribute

mme_number_for_mt_sms: bytes

oc_supported_features instance-attribute

oc_supported_features: OcSupportedFeatures

origin_host instance-attribute

origin_host: bytes

origin_realm instance-attribute

origin_realm: bytes

proxy_info instance-attribute

proxy_info: list[ProxyInfo]

rat_type instance-attribute

rat_type: int

route_record instance-attribute

route_record: list[bytes]

session_id instance-attribute

session_id: str

sf_provisional_indication instance-attribute

sf_provisional_indication: int

sf_ulr_timestamp instance-attribute

sf_ulr_timestamp: datetime

sgs_mme_identity instance-attribute

sgs_mme_identity: str

sgsn_number instance-attribute

sgsn_number: bytes

sms_register_request instance-attribute

sms_register_request: int

supported_features instance-attribute

supported_features: list[SupportedFeatures]

supported_services instance-attribute

supported_services: SupportedServices

terminal_information class-attribute instance-attribute

terminal_information: TerminalInformation = None

ue_srvcc_capability instance-attribute

ue_srvcc_capability: int

ulr_flags instance-attribute

ulr_flags: int

user_name instance-attribute

user_name: str

vendor_specific_application_id instance-attribute

vendor_specific_application_id: VendorSpecificApplicationId

visited_plmn_id instance-attribute

visited_plmn_id: bytes