First SIP Call - Call Flow Analysis

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
over the next few minutes we'll walk through the download and setup of a sip user agent and we'll make our first peer-to-peer sip call more importantly we'll look at the sip messages exchanged during the call both sit requests and sit responses by the time you've mastered this module you'll know the sequence of messages in a peer-to-peer call and you'll know how to differentiate between requests and responses in a sip call log ok let's download a software user agent to your computer there's lots to choose from Linh phone x-lite counter path they all adhere to the same sip spec so it should all work just fine mind you it's convenient to run two instances on your machine at the same time and setup calls between them just be aware that with some you can only have one instance running at a time so if you want to do everything from your laptop be sure to choose one that will run multiple instances I like the MJ UA from MJ sip in fact I'll be using it throughout these modules if you already have a preferred user agent then load it up and fast forward 30 seconds or so while the rest of us set up the MJ user agent otherwise go to MJ sit org to begin the download now it's just a zip file so when you've got it go ahead and unzip it somewhere handy on your machine by the way there's also a link to our user agent QuickStart guide just in case it's useful for you with the user agent file unzipped open a command prompt and change directory to the folder containing the uaw bat once there execute uaw bat with the - F parameter and point to the config slash a dot CFG that's Alice's config file see here how it's preset with her details or display name her user name the listening port for sip messages and so on and that's it I'll enter and great sip Alice at your IP address port 57 T is up and running let's launch a second instance for Bob open another command prompt 'cd to the same folder and again execute ua w bat - f this time pointing to config /b CFG that's Bob's config file here's his display name here's user name listening port and so on now obviously we can change the names the ports and all the config data as we like but for now we'll settle with Alice and Bob and enter and Bob's user agent launches just fine good we're ready to make our first call I'll go to Alice's user agent and type Bob's address sip : Bob at Bob's IP address : Bob's port 5080 the same address I see here in Bob's user agent and click dial and immediately Bob's phone's showing an incoming call from Alice accept and as you can hear we're connected the audio is being encoded and media packets are exchanged now to terminate the call I'll hang up and the call is terminated great now that we've made a call the next task is to study the SIP messages that set up the call now take a look inside the log folder there's a messages log for Alice's user agent on port 5070 and a messages log for Bob's user agent on port 5080 every sip message sent from or received by issues agent is copied into the log for reference the first message in Alice's log is an invite addressed to sip Bob at Bob's IP address and port the same address we dialed a moment ago now most user agents prepend each message with a timestamp and a sent or received marker that tells us if the message is outgoing or incoming over in Bob's log we see the same invite received just milliseconds later what next well Bob's user agent sends back a 100 trying received moments later at Alice's user agent how about you spend a minute or so now familiarizing yourself with the call log and the messages inside it take a piece of paper and draw two vertical lines that represent the two user agents then plot the flow of sip messages between them representing each message with a labelled arrow the first is an invite from Alice to Bob and the second is a 100 trying from Bob to Alice you should find seven sip messages altogether now three of the messages are going to be sip requests and four are going to be sip responses the question is how do we tell the difference as you study the logs look for a rule to distinguish them and then label each message accordingly go ahead and plot the set of messages and find the rule and then press play when you're ready we'll then run through things together the call was initiated by Alice's user agent through the dispatch of an invite Bob's user agent then responded with a 100 trying and almost immediately again with a 180 ringing then when Bob accepted the call his user agent sent back a 200 okay prompting Alice's user agent to send back an ACK straight away the to user agents then begin exchanging media packets and the session is established later when one party hangs up a bi is sent prompting an immediate 200 okay now this simple seven message exchange is something you're going to need to know off by heart so it's a good idea to familiarize yourself with it and learn it now we'll then spend the next few hours unpicking these messages and learning what they do and why we need them and understanding their content and how about the rule to distinguish requests from responses well requests always begin with a method type followed by a request URI address and responses always feature a status code and a reason phrase in the start line
Info
Channel: sipsense.com
Views: 40,583
Rating: 4.9526067 out of 5
Keywords: SIP, User Agent, SIP Request, SIP Response, INVITE, 100 Trying, ACK, 180 Ringing, 200 OK, BYE, peer-to-peer, UA, training, SIP training
Id: gr2mt3BY-Sg
Channel Id: undefined
Length: 6min 26sec (386 seconds)
Published: Wed May 04 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.