Home arrow SIP arrow SIP Callflow Examples

Language Translator

Hacking Zone

Hacking Tools
Attacking

Configure Windows

Windows Configuration

Novels

Mix Novels

Human Personality

Body Language
SIP Callflow Examples PDF Print E-mail
Written by Hemanshu Patel   
Thursday, 08 November 2007
Article Index
SIP Callflow Examples
Page 2
Page 3
Page 4
Page 5
Page 6
Page 7
Page 8
Page 9
Page 10
Page 11
Page 12
Page 13
Page 14
Page 15
Page 16
Page 17
3.5. Session Through a SIP ALG

Alice ALG Proxy 2 Bob
| | | |
| INVITE F1 | | |
|--------------->| INVITE F2 | |
| 100 F3 |--------------->| INVITE F4 |
|<---------------| 100 F5 |--------------->|
| |<---------------| 180 F6 |
| | 180 F7 |<---------------|
| 180 F8 |<---------------| |
|<---------------| | 200 F9 |
| | 200 F10 |<---------------|
| 200 F11 |<---------------| |
|<---------------| |
| ACK F12 | |
|--------------->| ACK F13 |
| |-------------------------------->|
| RTP Media | Both Way RTP Media |
|<==============>|<===============================>|
| BYE F14 | |
|--------------->| BYE F15 |
| |-------------------------------->|
| | 200 F16 |
| 200 F17 |<--------------------------------|
|<---------------| |
| | |

Alice completes a call to Bob through a ALG (Application Layer
Gateway) and a SIP Proxy. The routing through the ALG is
accomplished using a pre-loaded Route header in the INVITE F1. Note
that the media stream setup is not end-to-end - the ALG terminates
both media streams and bridges them. This is done by the ALG
modifying the SDP in the INVITE (F1) and 200 OK (F10) messages, and
possibly any 18x or ACK messages containing SDP.

In addition to firewall traversal, this Back-to-Back User Agent
(B2BUA) could be used as part of an anonymizer service (in which all
identifying information on Alice would be removed), or to perform
codec media conversion, such as mu-law to A-law conversion of PCM on
an international call.

Also note that Proxy 2 does not Record-Route in this call flow.


Message Details

F1 INVITE Alice -> SIP ALG

INVITE sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it SIP/2.0
Via: SIP/2.0/UDP client.atlanta.example.com:5060;branch=z9hG4bK74bf9
Max-Forwards: 70
From: Alice <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >;tag=9fxced76sl
To: Bob <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >
Call-ID: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 1 INVITE
Contact: <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >
Route: <sip:alg1.atlanta.example.com;lr>
Proxy-Authorization: Digest username="alice",
realm="biloxi.example.com",
nonce="85b4f1cen4341ae6cbe5a3a9c8e88df9", opaque="",
uri="sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it ",
response="b3f392f9218a328b9294076d708e6815"
Content-Type: application/sdp
Content-Length: 151

v=0
o=alice 2890844526 2890844526 IN IP4 client.atlanta.example.com
s=-
c=IN IP4 192.0.2.101
t=0 0
m=audio 49172 RTP/AVP 0
a=rtpmap:0 PCMU/8000

/* Client for Alice prepares to receive data on port 49172 from the
network. */


F2 INVITE SIP ALG -> Proxy 2

INVITE sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it SIP/2.0
Via: SIP/2.0/UDP alg1.atlanta.example.com:5060;branch=z9hG4bK739578.1
Via: SIP/2.0/UDP client.atlanta.example.com:5060;branch=z9hG4bK74bf9
;received=192.0.2.101
Max-Forwards: 69
Record-Route: <sip:alg1.atlanta.example.com;lr>
From: Alice <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >;tag=9fxced76sl
To: Bob <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >
Call-ID: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 1 INVITE
Contact: <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >
Proxy-Authorization: Digest username="alice",
realm="biloxi.example.com",
nonce="85b4f1cen4341ae6cbe5a3a9c8e88df9", opaque="",
uri="sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it ",
response="b3f392f9218a328b9294076d708e6815"
Content-Type: application/sdp
Content-Length: 150

v=0
o=alice 2890844526 2890844526 IN IP4 client.atlanta.example.com
s=-
c=IN IP4 192.0.2.128
t=0 0
m=audio 2000 RTP/AVP 0
a=rtpmap:0 PCMU/8000


F3 100 Trying SIP ALG -> Alice

SIP/2.0 100 Trying
Via: SIP/2.0/UDP client.atlanta.example.com:5060;branch=z9hG4bK74bf9
;received=192.0.2.101
From: Alice <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >;tag=9fxced76sl
To: Bob <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >
Call-ID: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 1 INVITE
Content-Length: 0

/* SIP ALG prepares to proxy data from port 192.0.2.128/2000 to
192.0.2.101/49172. Proxy 2 uses a Location Service function to
determine where Bob is located. Based upon location analysis the call
is forwarded to Bob */


F4 INVITE Proxy 2 -> Bob

INVITE sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it SIP/2.0
Via: SIP/2.0/UDP ss2.biloxi.example.com:5060;branch=z9hG4bK2d4790.1
Via: SIP/2.0/UDP alg1.atlanta.example.com:5060;branch=z9hG4bK739578.1
;received=192.0.2.128
Via: SIP/2.0/UDP client.atlanta.example.com:5060;branch=z9hG4bK74bf9
;received=192.0.2.101
Max-Forwards: 68
Record-Route: <sip:alg1.atlanta.example.com;lr>
From: Alice <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >;tag=9fxced76sl
To: Bob <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >
Call-ID: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 1 INVITE
Contact: <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >
Content-Type: application/sdp
Content-Length: 150

v=0
o=alice 2890844526 2890844526 IN IP4 client.atlanta.example.com
s=-
c=IN IP4 192.0.2.128
t=0 0
m=audio 2000 RTP/AVP 0
a=rtpmap:0 PCMU/8000


F5 100 Trying Proxy 2 -> SIP ALG

SIP/2.0 100 Trying
Via: SIP/2.0/UDP alg1.atlanta.example.com:5060;branch=z9hG4bK739578.1
;received=192.0.2.128
Via: SIP/2.0/UDP client.atlanta.example.com:5060;branch=z9hG4bK74bf9
;received=192.0.2.101
From: Alice <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >;tag=9fxced76sl
To: Bob <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >
Call-ID: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 1 INVITE
Content-Length: 0


F6 180 Ringing Bob -> Proxy 2

SIP/2.0 180 Ringing
Via: SIP/2.0/UDP ss2.biloxi.example.com:5060;branch=z9hG4bK2d4790.1
;received=192.0.2.222
Via: SIP/2.0/UDP alg1.atlanta.example.com:5060;branch=z9hG4bK739578.1
;received=192.0.2.128
Via: SIP/2.0/UDP client.atlanta.example.com:5060;branch=z9hG4bK74bf9
;received=192.0.2.101
Record-Route: <sip:alg1.atlanta.example.com;lr>
From: Alice <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >;tag=9fxced76sl
To: Bob <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >;tag=314159
Call-ID: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 1 INVITE
Contact: <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >
Content-Length: 0


F7 180 Ringing Proxy 2 -> SIP ALG

SIP/2.0 180 Ringing
Via: SIP/2.0/UDP alg1.atlanta.example.com:5060;branch=z9hG4bK739578.1
;received=192.0.2.128
Via: SIP/2.0/UDP client.atlanta.example.com:5060;branch=z9hG4bK74bf9
;received=192.0.2.101
Record-Route: <sip:alg1.atlanta.example.com;lr>
From: Alice <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >;tag=9fxced76sl
To: Bob <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >;tag=314159
Call-ID: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 1 INVITE
Contact: <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >
Content-Length: 0


F8 180 Ringing SIP ALG -> Alice

SIP/2.0 180 Ringing
Via: SIP/2.0/UDP client.atlanta.example.com:5060;branch=z9hG4bK74bf9
;received=192.0.2.101
Record-Route: <sip:alg1.atlanta.example.com;lr>
From: Alice <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >;tag=9fxced76sl
To: Bob <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >;tag=314159
Call-ID: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 1 INVITE
Contact: <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >
Content-Length: 0


F9 200 OK Bob -> Proxy 2

SIP/2.0 200 OK
Via: SIP/2.0/UDP ss2.biloxi.example.com:5060;branch=z9hG4bK2d4790.1
;received=192.0.2.222
Via: SIP/2.0/UDP alg1.atlanta.example.com:5060;branch=z9hG4bK739578.1
;received=192.0.2.128
Via: SIP/2.0/UDP client.atlanta.example.com:5060;branch=z9hG4bK74bf9
;received=192.0.2.101
Record-Route: <sip:alg1.atlanta.example.com;lr>
From: Alice <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >;tag=9fxced76sl
To: Bob <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >;tag=314159
Call-ID: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 1 INVITE
Contact: <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >
Content-Type: application/sdp
Content-Length: 147

v=0
o=bob 2890844527 2890844527 IN IP4 client.biloxi.example.com
s=-
c=IN IP4 192.0.2.201
t=0 0
m=audio 3456 RTP/AVP 0
a=rtpmap:0 PCMU/8000


F10 200 OK Proxy 2 -> SIP ALG

SIP/2.0 200 OK
Via: SIP/2.0/UDP alg1.atlanta.example.com:5060;branch=z9hG4bK739578.1
;received=192.0.2.128
Via: SIP/2.0/UDP client.atlanta.example.com:5060;branch=z9hG4bK74bf9
;received=192.0.2.101
Record-Route: <sip:alg1.atlanta.example.com;lr>
From: Alice <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >;tag=9fxced76sl
To: Bob <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >;tag=314159
Call-ID: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 1 INVITE
Contact: <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >
Content-Type: application/sdp
Content-Length: 147

v=0
o=bob 2890844527 2890844527 IN IP4 client.biloxi.example.com
s=-
c=IN IP4 192.0.2.201
t=0 0
m=audio 3456 RTP/AVP 0
a=rtpmap:0 PCMU/8000


F11 200 OK SIP ALG -> Alice

SIP/2.0 200 OK
Via: SIP/2.0/UDP client.atlanta.example.com:5060;branch=z9hG4bK74bf9
;received=192.0.2.101
Record-Route: <sip:alg1.atlanta.example.com;lr>
From: Alice <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >;tag=9fxced76sl
To: Bob <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >;tag=314159
Call-ID: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 1 INVITE
Contact: <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >
Content-Type: application/sdp
Content-Length: 147

v=0
o=bob 2890844527 2890844527 IN IP4 client.biloxi.example.com
s=-
c=IN IP4 192.0.2.128
t=0 0
m=audio 1734 RTP/AVP 0
a=rtpmap:0 PCMU/8000

/* The ALG prepares to proxy packets from 192.0.2.128/
1734 to 192.0.2.201/3456 */


F12 ACK Alice -> SIP ALG

ACK sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it SIP/2.0
Via: SIP/2.0/UDP client.atlanta.example.com:5060;branch=z9hG4bK74bhh
Max-Forwards: 70
Route: <sip:alg1.atlanta.example.com;lr>
From: Alice <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >;tag=9fxced76sl
To: Bob <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >;tag=314159
Call-ID: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 1 ACK
Content-Length: 0


F13 ACK SIP ALG -> Bob

ACK sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it SIP/2.0
Via: SIP/2.0/UDP alg1.atlanta.example.com:5060;branch=z9hG4bK739578.1
Via: SIP/2.0/UDP client.atlanta.example.com:5060;branch=z9hG4bK74bhh
;received=192.0.2.101
Max-Forwards: 69
From: Alice <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >;tag=9fxced76sl
To: Bob <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >;tag=314159
Call-ID: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 1 ACK
Content-Length: 0

/* RTP streams are established between Alice and the ALG and
between the ALG and B*/

/* Alice Hangs Up with Bob. */


F14 BYE Alice -> SIP ALG

BYE sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it SIP/2.0
Via: SIP/2.0/UDP client.atlanta.example.com:5060;branch=z9hG4bK74be5
Max-Forwards: 70
Route: <sip:alg1.atlanta.example.com;lr>
From: Alice <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >;tag=9fxced76sl
To: Bob <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >;tag=314159
Call-ID: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 2 BYE
Content-Length: 0


F15 BYE SIP ALG -> Bob

BYE sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it SIP/2.0
Via: SIP/2.0/UDP alg1.atlanta.example.com:5060;branch=z9hG4bK739578.1
Via: SIP/2.0/UDP client.atlanta.example.com:5060;branch=z9hG4bK74be5
;received=192.0.2.101
Max-Forwards: 69
From: Alice <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >;tag=9fxced76sl
To: Bob <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >;tag=314159
Call-ID: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 2 BYE
Content-Length: 0


F16 200 OK Bob -> SIP ALG

SIP/2.0 200 OK
Via: SIP/2.0/UDP alg1.atlanta.example.com:5060;branch=z9hG4bK739578.1
;received=192.0.2.128
Via: SIP/2.0/UDP client.atlanta.example.com:5060;branch=z9hG4bK74be5
;received=192.0.2.101
From: Alice <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >;tag=9fxced76sl
To: Bob <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >;tag=314159
Call-ID: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 2 BYE
Content-Length: 0


F17 200 OK SIP ALG -> Alice

SIP/2.0 200 OK
Via: SIP/2.0/UDP client.atlanta.example.com:5060;branch=z9hG4bK74be5
;received=192.0.2.101
From: Alice <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >;tag=9fxced76sl
To: Bob <sip: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >;tag=314159
Call-ID: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
CSeq: 2 BYE
Content-Length: 0


 
< Prev   Next >
Your Ad Here

Donate us!!

Enter Amount:

RSS socialnet

Add to MyYahoo!
Subscribe in NewsGator Online
Add to Newsburst
Add to Google
Add to My AOL
Add to Pluck
Subscribe in FeedLounge
Add to Windows Live
Add to NetVibes
Subscribe in Rojo
Subscribe in Bloglines
Add to MyMSN
Add to Plusmo for your cellphone
Add to PageFlakes
Add to Technorati
Add to BlinkBits