@startuml "TD_VoLTE_NGC_INT_INF_01.png"
/'Editor: https://plantuml-editor.kkeisuke.com/ '/
/'Syntax: http://plantuml.com/fr/sequence-diagram '/
!include etsi-style.iuml
!pragma teoz true
'
participant "PSAP"



box "IMS A" #LightBlue
participant "BGCF"
        participant "IBCF"
        participant "E-CSCF"
	participant "P-CSCF"
	
  
end box
box "EPC A" #LightBlue
  participant PCRF
  participant PGw
end box

participant "UE A"

'
rnote right  "UE A"         : Gm
& rnote right "P-CSCF"      : Mw
& rnote right "E-CSCF"      : Mw
& rnote right "IBCF"        : Mx
& rnote right "PCRF"        : Rx
& rnote right "PGw"         : Gx
& rnote right "BGCF"         : Mi
& rnote right "PSAP"         : Mm
'                

rnote over "UE A", PSAP #FFAAAA:   \s\s                                                                                   eCall type of emergency service session established \s\s                                                                                   

alt Option 1: PSAP in IMS A network
"PSAP"  -> "E-CSCF"     : INFO

else Option 2: PSAP NOT in IMS A network\n
"PSAP" --> "IBCF"     : INFO
&"IBCF"  -> "E-CSCF"     : INFO

else Option 3: PSAP in PSTN network\n
"PSAP"  --> "BGCF"     : INFO
'&"PSTN"  --> "E-CSCF"     : INFO
&"BGCF"  -> "E-CSCF"     : INFO

end

"E-CSCF"  -> "P-CSCF"     : INFO
&"P-CSCF"  -> "UE A"     : INFO\n("application/EmergencyCallData.Control+xml" MIME body)\n("request" element: "action" = "send-data", "datatype" = "eCall.MSD")


"UE A" -> "P-CSCF"      : INFO\n("application/EmergencyCallData.eCall.MSD" MIME body)\n(MSD not exceeding 140 bytes encoded in binary ASN.1)
&"P-CSCF" -> "E-CSCF"      : INFO

alt Option 1: PSAP in IMS A network
"E-CSCF"  -> "PSAP"     : INFO

else Option 2: PSAP NOT in IMS A network\n
"E-CSCF"  -> "IBCF"     : INFO
&"IBCF"  --> "PSAP"     : INFO

else Option 3: PSAP in PSTN network\n
"E-CSCF"  -> "BGCF"     : INFO
&"BGCF"  --> "PSAP"     : INFO
'&"PSTN"  --> "PSAP"     : INFO

end



@enduml
