Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Sip PSTN Call Flow Hu

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Session Initiation Protocol (SIP Tutorial: SIP to PSTN Call Flow) SIP Network Subscriber SIP Client VOIP

Network PSTN Network Alice Proxy 1 NGW 1 Switch

EventHelix.com/EventStudio 2.5 10-Jun-05 22:33 (Page 1)

This call flow diagram was generated with EventStudio Sequence Diagram Designer 2.5 (http://www.EventHelix.com/EventStudio).

LEG: Brief
This article is based on the call flow presented in http://www.iptel.org/info/players/ietf/callflows/draft-ietf-sipping-pstn-call-flows-02.txt and is reproduced here as per the copyright statement at the end of this document. In this scenario, Alice (sip:alice@a.example.com) is a SIP phone or other SIP-enabled device. Bob is reachable via the PSTN at global telephone number +19725552222. Alice places a call to Bob through a Proxy Server (Proxy 1) and a Network Gateway (NGW 1). Bob answers the call then Alice disconnects the call. Signaling between NGW 1 and Bob's telephone switch is ANSI ISUP.

SIP INVITE
Calling = +13145551111, Called = +19725552222, Contact = alice@client.a.example.com, Media = audio 49172 RTP/AVP, Attribute = rtpmap:0 PCMU/8000

Alice dials the globalized E.164 number +19725552222 to reach Bob. Note that A might have only dialed the last 7 digits, or some other dialing plan. It is assumed that the SIP User Agent Client converts the digits into a global number and puts them into a SIP URI. Note that tel URIs could be used instead of SIP URIs.

SIP 100 Trying


Open port 49172 for RTP receive Locate the SIP PSTN Gateway to route this call

Proxy 1 indicates to the SIP client that it is trying to establish the call. Client for A prepares to receive data on port 49172 from the network. Proxy 1 uses a Location Service function to determine the gateway for terminating this call. The location service returns NGW 1 as the gateway. The call is forwarded to the PSTN Network Gateway NGW 1. The SIP INVITE message is sent to NGW 1.

SIP INVITE
Calling = +13145551111, Called = +19725552222, Contact = alice@client.a.example.com, Media = audio 49172 RTP/AVP, Attribute = rtpmap:0 PCMU/8000

SIP 100 Trying ISUP IAM


Calling Number = 314-555-1111, Called Number = 972-555-2222, NPI = E.164, NOA = National

NGW 1 indicates to the proxy that it is trying to establish the call. SIP PSTN Gateway sends ISUP Initial Address Message to the PSTN. The calling and the called numbers are included in the message.

ACM

Switch one-way voice towards originating subscriber

Since all the digits were included in the ISUP IAM, the switch replies with ISUP Address Complete message. This signals that the switch has received all the digits and is processing the call. The switch connects a one way voice path towards Alice. This is needed to send the ringing tone. The switch sends the ringing tone to the subscriber. A SIP Session in Progess message is generated when the NGW 1 receives the ACM message from the switch. The "Session Progress" message also contains RTP media information for the RTP port allocated for this call.

Ringing Tone SIP 183 Session Progress


Contact = ngw1@a.example.com, media = audio 3456 RTP/AVP 0, attribute = rtpmap:0 PCMU/8000 Open port 3456 for RTP receive Start sending received PSTN Audio via RTP

Ringing Tone

SIP PSTN Gateway sends PSTN audio (ringing) in the RTP path to A

Session Initiation Protocol (SIP Tutorial: SIP to PSTN Call Flow) SIP Network Subscriber SIP Client VOIP Network PSTN Network Alice Proxy 1 NGW 1 Switch SIP 183 Session Progress
Contact = ngw1@a.example.com, media = audio 3456 RTP/AVP 0, attribute = rtpmap:0 PCMU/8000

EventHelix.com/EventStudio 2.5 10-Jun-05 22:33 (Page 2)

At this point, a bi-directional RTP voice path has been established between Alice and NGW 1. The Switch to NGW 1 is a uni-directional voice path. Alice is hearing the ringing tone from the switch.

ISUP ANM
Switch a bidirectional voice path

Bob answers the call. The switch sends an ISUP Answer message to NGW 1. A bi-directional voice path is switched between the calling and the called subscriber. NGW 1 responds with SIP OK message to Proxy 1 to indicate that the subscriber has answered the call.

SIP 200 OK
Contact = ngw1@a.example.com, media = audio 3456 RTP/AVP 0, attribute = rtpmap:0 PCMU/8000

SIP 200 OK SIP ACK SIP ACK


Switch through bidirectional voice

Proxy 1 sends SIP OK message to Alice's SIP client. The SIP client acknowledges the receipt of SIP OK message. Proxy 1 acknowledges the receipt of SIP OK message. At this point, NGW 1 bridges the bidirectional RTP path and the bidirectional SIP path.

Voice communciation between Alice and Bob as the RTP (Alice<->NGW 1) and PSTN (NGW 1<->Switch) paths are bidirectional. Alice Hangs Up with Bob.

SIP BYE SIP BYE SIP 200 OK


Close RTP port 3456

The SIP client sends a BYE message to Proxy 1 Proxy 1 sends a BYE indicatation to the Network Gateway. NGW 1 replies back with success, acknowledging the receipt of call release request. NGW 1 releases the RTP port that was being used for communciation with Alice's SIP client. NGW 1 signals the call release to the switch via an ISUP Release message. In the meanwhile, Proxy 1 acknowleges the BYE message to the SIP client. Voice communciation is over, so the RTP port can be closed. ISUP RLC The Switch releases the voice call and replies with ISUP Release Complete message.

ISUP REL SIP 200 OK


Close port 49172

Session Initiation Protocol (SIP Tutorial: SIP to PSTN Call Flow (Detailed)) SIP Network Subscriber SIP Client VOIP Network PSTN Network Alice Proxy 1 NGW 1 Switch

EventHelix.com/EventStudio 2.5 10-Jun-05 22:33 (Page 3)

This call flow diagram was generated with EventStudio Sequence Diagram Designer 2.5 (http://www.EventHelix.com/EventStudio).

LEG: Detailed
In this scenario, Alice (sip:alice@a.example.com) is a SIP phone or other SIP-enabled device. Bob is reachable via the PSTN at global telephone number +19725552222. Alice places a call to Bob through a Proxy Server (Proxy 1) and a Network Gateway (NGW 1). Bob answers the call then Alice disconnects the call. Signaling between NGW 1 and Bob's telephone switch is ANSI ISUP.

SIP INVITE
Calling = +13145551111, Called = +19725552222, Contact = alice@client.a.example.com, Media = audio 49172 RTP/AVP, Attribute = rtpmap:0 PCMU/8000

Alice dials the globalized E.164 number +19725552222 to reach Bob. Note that A might have only dialed the last 7 digits, or some other dialing plan. It is assumed that the SIP User Agent Client converts the digits into a global number and puts them into a SIP URI. Note that tel URIs could be used instead of SIP URIs. Alice could use either their SIP address (sip:alice@a.example.com) or SIP telephone number (sip:+13145551111@ss1.a.example.com;user=phone) in the From header. In this example, the telephone number is included, and it is shown as being passed as calling party identification through the Network Gateway (NGW 1) to Bob. Note that for this number to be passed into the SS7 network, it would have to be somehow verified for accuracy.

INVITE sip:+19725552222@ss1.a.example.com;user=phone SIP/2.0 Via: SIP/2.0/TCP client.a.example.com:5060;branch=z9hG4bK74bf9 Max-Forwards: 70 From: Alice <sip:+13145551111@ss1.a.example.com;user=phone>;tag=9fxced76sl To: Bob <sip:+19725552222@ss1.a.example.com;user=phone> Call-ID: 2xTb9vxSit55XU7p8@a.example.com CSeq: 1 INVITE Contact: <sip:alice@client.a.example.com;transport=tcp> Proxy-Authorization: Digest username="alice", realm="a.example.com", nonce="dc3a5ab25302aa931904ba7d88fa1cf5", opaque="", uri="sip:+19725552222@ss1.a.example.com;user=phone", response="ccdca50cb091d587421457305d097458c" Content-Type: application/sdp Content-Length: 154 v=0 o=alice 2890844526 2890844526 IN IP4 client.a.example.com s=c=IN IP4 client.a.example.com t=0 0 m=audio 49172 RTP/AVP 0 a=rtpmap:0 PCMU/8000

SIP 100 Trying

Proxy 1 indicates to the SIP client that it is trying to establish the call.

SIP/2.0 100 Trying Via: SIP/2.0/TCP client.a.example.com:5060;branch=z9hG4bK74bf9;received=192.0.2.101 From: Alice <sip:+13145551111@ss1.a.example.com;user=phone>;tag=9fxced76sl To: Bob <sip:+19725552222@ss1.a.example.com;user=phone> Call-ID: 2xTb9vxSit55XU7p8@a.example.com CSeq: 1 INVITE Content-Length: 0

Open port 49172 for RTP receive Locate the SIP PSTN Gateway to route this call

Client for A prepares to receive data on port 49172 from the network. Proxy 1 uses a Location Service function to determine the gateway for terminating this call. The location service returns NGW 1 as the gateway. The call is forwarded to the PSTN Network Gateway NGW 1. The SIP INVITE message is sent to NGW 1.

SIP INVITE
Calling = +13145551111, Called = +19725552222, Contact = alice@client.a.example.com, Media = audio 49172 RTP/AVP, Attribute = rtpmap:0 PCMU/8000

INVITE sip:+19725552222@ngw1.a.example.com;user=phone SIP/2.0 Via: SIP/2.0/TCP ss1.a.example.com:5060;branch=z9hG4bK2d4790.1 Via: SIP/2.0/TCP client.a.example.com:5060;branch=z9hG4bK74bf9;received=192.0.2.101 Max-Forwards: 69 Record-Route: <sip:ss1.a.example.com;lr> From: Alice <sip:+13145551111@ss1.a.example.com;user=phone>;tag=9fxced76sl To: Bob <sip:+19725552222@ss1.a.example.com;user=phone> Call-ID: 2xTb9vxSit55XU7p8@a.example.com CSeq: 1 INVITE Contact: <sip:alice@client.a.example.com;transport=tcp> Content-Type: application/sdp Content-Length: 154 v=0 o=alice 2890844526 2890844526 IN IP4 client.a.example.com

Session Initiation Protocol (SIP Tutorial: SIP to PSTN Call Flow (Detailed)) SIP Network Subscriber SIP Client VOIP Network PSTN Network Alice Proxy 1 NGW 1 Switch
s=c=IN IP4 client.a.example.com t=0 0 m=audio 49172 RTP/AVP 0 a=rtpmap:0 PCMU/8000

EventHelix.com/EventStudio 2.5 10-Jun-05 22:33 (Page 4)

SIP 100 Trying

NGW 1 indicates to the proxy that it is trying to establish the call.

SIP/2.0 100 Trying Via: SIP/2.0/TCP ss1.a.example.com:5060;branch=z9hG4bK2d4790.1;received=192.0.2.111 From: Alice <sip:+13145551111@ss1.a.example.com;user=phone>;tag=9fxced76sl To: Bob <sip:+19725552222@ss1.a.example.com;user=phone> Call-ID: 2xTb9vxSit55XU7p8@a.example.com CSeq: 1 INVITE Content-Length: 0

ISUP IAM
Calling Number = 314-555-1111, Called Number = 972-555-2222, NPI = E.164, NOA = National

SIP PSTN Gateway sends ISUP Initial Address Message to the PSTN. The calling and the called numbers are included in the message.

ACM

Switch one-way voice towards originating subscriber

Since all the digits were included in the ISUP IAM, the switch replies with ISUP Address Complete message. This signals that the switch has received all the digits and is processing the call. The switch connects a one way voice path towards Alice. This is needed to send the ringing tone. The switch sends the ringing tone to the subscriber. A SIP Session in Progess message is generated when the NGW 1 receives the ACM message from the switch. The "Session Progress" message also contains RTP media information for the RTP port allocated for this call. Notice that the Contact returned by NGW 1 in this and following messages is sip:ngw1@a.example.com. This is because NGW 1 only accepts SIP messages that come through Proxy 1 - any direct signaling will be ignored. Since this Contact URI may be used outside of this dialog and must be routable (Section 8.1.1.8 in RFC 3261 [2]) the Contact URI for NGW 1 must resolve to Proxy 1. This Contact URI is an AOR which resolves via DNS to Proxy 1 (sip:ss1.a.example.com) which then resolves it to sip:ngw1.a.example.com which is the address of NGW 1.

Ringing Tone SIP 183 Session Progress


Contact = ngw1@a.example.com, media = audio 3456 RTP/AVP 0, attribute = rtpmap:0 PCMU/8000

SIP/2.0 183 Session Progress Via: SIP/2.0/TCP ss1.a.example.com:5060;branch=z9hG4bK2d4790.1;received=192.0.2.111 Via: SIP/2.0/TCP client.a.example.com:5060;branch=z9hG4bK74bf9;received=192.0.2.101 Record-Route: <sip:ss1.a.example.com;lr> From: Alice <sip:+13145551111@ss1.a.example.com;user=phone>;tag=9fxced76sl To: Bob <sip:+19725552222@ss1.a.example.com;user=phone> ;tag=314159 Call-ID: 2xTb9vxSit55XU7p8@a.example.com CSeq: 1 INVITE Contact: <sip:ngw1@a.example.com;transport=tcp> Content-Type: application/sdp Content-Length: 146 v=0 o=GW 2890844527 2890844527 IN IP4 ngw1.a.example.com s=c=IN IP4 ngw1.a.example.com t=0 0 m=audio 3456 RTP/AVP 0 a=rtpmap:0 PCMU/8000

Open port 3456 for RTP receive Start sending received PSTN Audio via RTP

Ringing Tone SIP 183 Session Progress


Contact = ngw1@a.example.com, media = audio 3456 RTP/AVP 0, attribute = rtpmap:0 PCMU/8000

SIP PSTN Gateway sends PSTN audio (ringing) in the RTP path to A

Session Initiation Protocol (SIP Tutorial: SIP to PSTN Call Flow (Detailed)) SIP Network Subscriber SIP Client VOIP Network PSTN Network Alice Proxy 1 NGW 1 Switch
SIP/2.0 183 Session Progress Via: SIP/2.0/TCP client.a.example.com:5060;branch=z9hG4bK74bf9;received=192.0.2.101 Record-Route: <sip:ss1.a.example.com;lr> From: Alice <sip:+13145551111@ss1.a.example.com;user=phone>;tag=9fxced76sl To: Bob <sip:+19725552222@ss1.a.example.com;user=phone>;tag=314159 Call-ID: 2xTb9vxSit55XU7p8@a.example.com CSeq: 1 INVITE Contact: <sip:ngw1@a.example.com;transport=tcp> Content-Type: application/sdp Content-Length: 146 v=0 o=GW 2890844527 2890844527 IN IP4 ngw1.a.example.com s=c=IN IP4 ngw1.a.example.com t=0 0 m=audio 3456 RTP/AVP 0 a=rtpmap:0 PCMU/8000

EventHelix.com/EventStudio 2.5 10-Jun-05 22:33 (Page 5)

At this point, a bi-directional RTP voice path has been established between Alice and NGW 1. The Switch to NGW 1 is a uni-directional voice path. Alice is hearing the ringing tone from the switch.

ISUP ANM
Switch a bidirectional voice path

Bob answers the call. The switch sends an ISUP Answer message to NGW 1. A bi-directional voice path is switched between the calling and the called subscriber. NGW 1 responds with SIP OK message to Proxy 1 to indicate that the subscriber has answered the call.

SIP 200 OK
Contact = ngw1@a.example.com, media = audio 3456 RTP/AVP 0, attribute = rtpmap:0 PCMU/8000

SIP/2.0 200 OK Via: SIP/2.0/TCP ss1.a.example.com:5060;branch=z9hG4bK2d4790.1;received=192.0.2.111 Via: SIP/2.0/TCP client.a.example.com:5060;branch=z9hG4bK74bf9;received=192.0.2.101 Record-Route: <sip:ss1.a.example.com;lr> From: Alice <sip:+13145551111@ss1.a.example.com;user=phone>;tag=9fxced76sl To: Bob <sip:+19725552222@ss1.a.example.com;user=phone>;tag=314159 Call-ID: 2xTb9vxSit55XU7p8@a.example.com CSeq: 1 INVITE Contact: <sip:ngw1@a.example.com;transport=tcp> Content-Type: application/sdp Content-Length: 146 v=0 o=GW 2890844527 2890844527 IN IP4 ngw1.a.example.com s=c=IN IP4 gw1.a.example.com t=0 0 m=audio 3456 RTP/AVP 0 a=rtpmap:0 PCMU/8000

SIP 200 OK

Proxy 1 sends SIP OK message to Alice's SIP client.

SIP/2.0 200 OK Via: SIP/2.0/TCP client.a.example.com:5060;branch=z9hG4bK74bf9;received=192.0.2.101 Record-Route: <sip:ss1.a.example.com;lr> From: Alice <sip:+13145551111@ss1.a.example.com;user=phone>;tag=9fxced76sl To: Bob <sip:+19725552222@ss1.a.example.com;user=phone>;tag=314159 Call-ID: 2xTb9vxSit55XU7p8@a.example.com CSeq: 1 INVITE Contact: <sip:ngw1@a.example.com;transport=tcp> Content-Type: application/sdp Content-Length: 146 v=0 o=GW 2890844527 2890844527 IN IP4 ngw1.a.example.com s=c=IN IP4 ngw1.a.example.com t=0 0 m=audio 3456 RTP/AVP 0 a=rtpmap:0 PCMU/8000

SIP ACK

The SIP client acknowledges the receipt of SIP OK message.

ACK sip:ngw1@a.example.com SIP/2.0 Via: SIP/2.0/TCP client.a.example.com:5060;branch=z9hG4bK74bf9 Max-Forwards: 70 Route: <sip:ss1.a.example.com;lr> From: Alice <sip:+13145551111@ss1.a.example.com;user=phone>;tag=9fxced76sl To: Bob <sip:+19725552222@ss1.a.example.com;user=phone>;tag=314159 Call-ID: 2xTb9vxSit55XU7p8@a.example.com CSeq: 1 ACK Content-Length: 0

Session Initiation Protocol (SIP Tutorial: SIP to PSTN Call Flow (Detailed)) SIP Network Subscriber SIP Client VOIP Network PSTN Network Alice Proxy 1 NGW 1 Switch SIP ACK

EventHelix.com/EventStudio 2.5 10-Jun-05 22:33 (Page 6)

Proxy 1 acknowledges the receipt of SIP OK message.

ACK sip:ngw1@a.example.com SIP/2.0 Via: SIP/2.0/TCP ss1.a.example.com:5060;branch=z9hG4bK2d4790.1 Via: SIP/2.0/TCP client.a.example.com:5060;branch=z9hG4bK74bf9;received=192.0.2.101 Max-Forwards: 69 From: Alice <sip:+13145551111@ss1.a.example.com;user=phone>;tag=9fxced76sl To: Bob <sip:+19725552222@ss1.a.example.com;user=phone>;tag=314159 Call-ID: 2xTb9vxSit55XU7p8@a.example.com CSeq: 1 ACK Content-Length: 0

Switch through bidirectional voice

At this point, NGW 1 bridges the bidirectional RTP path and the bidirectional SIP path.

Voice communciation between Alice and Bob as the RTP (Alice<->NGW 1) and PSTN (NGW 1<->Switch) paths are bidirectional. Alice Hangs Up with Bob.

SIP BYE

The SIP client sends a BYE message to Proxy 1

BYE sip:ngw1@a.example.com SIP/2.0 Via: SIP/2.0/TCP client.a.example.com:5060;branch=z9hG4bK74bf9 Max-Forwards: 70 Route: <sip:ss1.a.example.com;lr> From: Alice <sip:+13145551111@ss1.a.example.com;user=phone>;tag=9fxced76sl To: Bob <sip:+19725552222@ss1.a.example.com;user=phone>;tag=314159 Call-ID: 2xTb9vxSit55XU7p8@a.example.com CSeq: 2 BYE Content-Length: 0

SIP BYE

Proxy 1 sends a BYE indicatation to the Network Gateway.

BYE sip:ngw1@a.example.com SIP/2.0 Via: SIP/2.0/TCP ss1.a.example.com:5060;branch=z9hG4bK2d4790.1 Via: SIP/2.0/TCP client.a.example.com:5060;branch=z9hG4bK74bf9;received=192.0.2.101 Max-Forwards: 69 From: Alice <sip:+13145551111@ss1.a.example.com;user=phone>;tag=9fxced76sl To: Bob <sip:+19725552222@ss1.a.example.com;user=phone>;tag=314159 Call-ID: 2xTb9vxSit55XU7p8@a.example.com CSeq: 2 BYE Content-Length: 0

SIP 200 OK

NGW 1 replies back with success, acknowledging the receipt of call release request.

SIP/2.0 200 OK Via: SIP/2.0/TCP ss1.a.example.com:5060;branch=z9hG4bK2d4790.1;received=192.0.2.111 Via: SIP/2.0/TCP client.a.example.com:5060;branch=z9hG4bK74bf9;received=192.0.2.101 From: Alice <sip:+13145551111@ss1.a.example.com;user=phone>;tag=9fxced76sl To: Bob <sip:+19725552222@ss1.a.example.com;user=phone>;tag=314159 Call-ID: 2xTb9vxSit55XU7p8@a.example.com CSeq: 2 BYE Content-Length: 0

Close RTP port 3456

ISUP REL SIP 200 OK

NGW 1 releases the RTP port that was being used for communciation with Alice's SIP client. NGW 1 signals the call release to the switch via an ISUP Release message. In the meanwhile, Proxy 1 acknowleges the BYE message to the SIP client.

SIP/2.0 200 OK Via: SIP/2.0/TCP client.a.example.com:5060;branch=z9hG4bK74bf9;received=192.0.2.101 From: Alice <sip:+13145551111@ss1.a.example.com;user=phone>;tag=9fxced76sl To: Bob <sip:+19725552222@ss1.a.example.com;user=phone>;tag=314159 Call-ID: 2xTb9vxSit55XU7p8@a.example.com CSeq: 2 BYE Content-Length: 0

Close port 49172

Voice communciation is over, so the RTP port can be closed. ISUP RLC The Switch releases the voice call and replies with ISUP Release Complete message.

Full Copyright Statement Copyright The Internet Society (2003). All Rights Reserved. This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing

Session Initiation Protocol (SIP Tutorial: SIP to PSTN Call Flow (Detailed)) SIP Network Subscriber SIP Client VOIP Network PSTN Network Alice Proxy 1 NGW 1 Switch
the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.

EventHelix.com/EventStudio 2.5 10-Jun-05 22:33 (Page 7)

You might also like