 So we'll skip through some other slides, so we'll focus, there are in fact three parts of this lecture slides remaining voice Streaming and then IPTV will skip the streaming part and go straight through to IPTV So the first thing is how do we send or how do we deliver voice? voice data across the internet and Not just the internet, but a general any IP network. So even across a private network operated by a Telecom company, how do we take the analog voice and send it in packets? most of All of the telephone networks that have been around for a hundred years Use circuit switching do not use packet switching So your normal home telephone line the landline telephone network You pick up your phone and dial a number There's a process of contacting the person at the other end point and then your voice Your voice data is not sent in packets But is sent in a circuit switch connection from your phone to the destinations phone Of course in the internet we have a packet switching network. So how can we adapt and make voice calls? taking the analog data for your voice and Put it inside packets and send those packets across the internet such that we get the same service as if we were using our home telephone line So we'll go through two two approaches or two two main parts of delivering voice over the internet Now you'll hear different terminology. So you may hear voice over IP or VoIP the OIP meaning Sending voice using the internet protocol Other things voice over the internet protocol IP telephony. So just different terminology But we will not differentiate between any of them Internet telephony internet phones voice over the internet and there may be different scenarios where voice over IP is used it may be in a public internet like you may use with a With Skype or a similar application. So you just use your normal internet connection and make voice calls or It may be in a private network like a telecom company's network for example in 4g mobile phone networks Instead of using a circuit switch connection from your mobile phone to the telephone network Then you can use a packet switch connection and send that voice from your mobile phone through All the way through the internet via a packet switch network. So you're effectively using voice over IP So and another example is the internal for example Most organizations have a internal telephone network for internal calls That can be a circuit switch network or and it can be a packet switch network. So SIT can build their Internal telephone network to use voice over IP. So in fact use their LAN network To also carry the voice calls between phones and the officers as opposed to having two different networks So some examples of where voice over IP is used we're going to go through two two sets of protocols that are needed to support voice over IP and And before we describe them RTP is the first one that would describe Remember the basics of a voice call what you do when you pick up a phone or You dial in a number on your mobile phone or even using your computer you dial in a number then What happens? Well before you talk There's this process of connecting from your phone to that the caller call ease phone The destination so we have a caller the source and the callee is the destination Okay, so you make a call to someone So there's this procedure of when you type in their number Then there's some signaling that goes across the network to make their phone ring Okay, so their phone rings and if they pick up the phone or they answer They press the answer button then there's some signaling that comes back to your phone Indicating that they've picked up and you're connected So this is the signaling used to set up the connection between the source and destination the caller and the callee Once it's set up then we start sending the voice across the network So there's two parts set up the connection and then transfer the data RTP is for the data transfer. In fact, we're going to go to the second part first the the data transfer and We'll see it's very simple and then after that we'll look at two example In fact, there's one example of how we can set up a connection Assuming we've got a connection set up Then how do we send our voice the analog data across the internet? Well quite simply we take the voice We use a codec to convert it into bits And then we put those bits in packets and send the packets and A common protocol for sending the packets is RTP the real-time transport protocol and we'll see it's very simple Compared to for example TCP RTP is not just for voice it can it's in general can be used for audio or video So it's not just for voice. It can be used for sending video yesterday in a demo When I streamed a video between my two laptops. It was using RTP the the video was Encoded and put inside RTP packets RTP uses UDP as the transport protocol. So that's a bit confusing because RTP the name says it's a real-time transport protocol Let's try and draw a stack and see How RTP fits in so we have the network layer IP underneath that the data link layer and physical layer whatever it is we're not so Concerned with that and then above that we have the transport layer and the application layer So the application layer protocol think of that's your voice application Whether it's Skype or something else and we'll note later that Skype doesn't in fact use RTP other voice applications do now as a transport protocol we use UDP and RTP in fact makes use of UDP so although UDP is the transport protocol Sometimes we also consider RTP to be a transport protocol One way we may draw it is like this so an RTP packet is Put inside a UDP packet and a UDP packet is put inside an IP packet And then sent across the internet What's inside the RTP packet? the audio Generated by your codec so your analog input when someone's talking That generating some analog input when they talk the codec Which is part of the application that you're using converts that into bits and puts those bits inside an RTP packet Which then as transported inside UDP and IP across the internet so that's the The the role of RTP in the layered stack So sometimes even though UDP is a transport protocol. We also consider RTP as a transport protocol Real-time transport protocol is designed to support real-time data So when we care about delivering the contents with minimal delay Why not just use TCP? TCP is used for data transfer of many applications. Why not TCP? with TCP remember we have congestion control flow control and Error control retransmissions TCP is good for reliability but it can be bad in terms of delay that is we send data and We cannot send more data until we receive an act and all the congestion and flow control mechanisms work And if we send data with TCP and that there's an error That data segment is lost Then we cannot send more until we receive an act And in that may that delay from when we send the first until we can send the next data segment Maybe too much for real-time applications So TCP Can introduce too much delay for our data transfer to support real-time applications. So UDP is simple with UDP as You saw when you use IPERF with UDP you just send packets according to what the source specifies with All of you are experts with IPERF When you want to set the client to use UDP you use the minus U option Then you must specify Ascending rate in fact if you don't it defaults to one megabit per second So with UDP the application determines how fast the data is sent With TCP it's determined by the congestion and flow control algorithms RTP will see has no Congestion control it has no flow control no error control Effectively we just send the packets So There's no guarantees of reliability with RTP No guarantees that will deliver the data within some time frame But it's kept simple so that there are no or very few overheads that TCP would have So what does it do RTP? It allows any type of media to Be transferred across the internet using any codec so it doesn't specify what codec to use you don't have to use mp3 or we'll see g711 there are many different codecs we can choose from Doesn't have to be voice can be video it takes the content So the the digital data generated by the codec puts it into an RTP packet adds a sequence number So that we can keep track of okay. This is the first part of the content the second and so on adds a timestamp Which can be used by the receiver to determine when to play back that content and sends it So that's the main Functions of RTP. Let's look at the packet format and see what's sent So in my example on the board here the data that we want to send is the binary form of the analog input of the voice for example we take that data and Put it inside an RTP packet. So here's the data and the RTP packet has some header fields Some we can recognize from this Diagram There's a sequence number So when I'm talking at the source. I'm generating a lot of data. I Would take a portion of that put it in an RTP packet and send it and then the next portion of the data Generated in the next RTP packet and send it and of course we give sequence numbers one two three and so on to the RTP packets a timestamp so relative to when each packet starts so We'll see some examples later, but if The first piece of data corresponds to time zero and The second packet contains data corresponding to some time after then that time can be included in the timestamp and Then the receiver knows Where this data fits in relative to the other data that's already received by default the header has 12 bytes There may be some options. We will not cover any options in this topic payload type indicates what content is inside this packet in particular what codec is used we'll see some examples later We have a version field and then what do the others mean? If we include options We set the x-bit to one If we have some padding we can specify in the p-bit whether we need to Expand the size of the packet to fit a particular length Some applications may use markers to indicate where this content fit fits in in the overall stream Think of for example like chapter markers in a video something that marks a particular point And the m-bit can be used to indicate if they are used markers the payload type is a Integer that indicates the codec use for example payload type zero means PCM eight kilohertz sixty four kilobits per second type three gsm voice codec the Source and the contributing source will see when we look at mixing So we'll come back to translation and mixing in a moment Let's look at it a simple example of One way that we can encode voice and send it across the internet The example there's linked to on our website. It's from a Cisco document They Cisco have some information about some typical codecs that may be used for voice over IP and some calculations of How much how fast we need to send the RTP packets? There's a nice table that captures some different codecs Remember the codec is to specify as the algorithm for how we take the analog input the voice and Produce the digital data that we want to send and there are different algorithms. Here are some algorithms that are Commonly used for voice voice over the internet. Let's look at the first one and explain the columns and maybe It's almost the baseline codec in in that it's Corresponds to closely what's used for a telephone network g711. It's just the name of the standard that defines this codec Another codec for example is mp3 What does mp3 stand for? mp3 And it's related to mpeg mpeg what is mpeg mpeg is a group of the motion pitchers expert group It's just an organization mpeg mpeg mp3 The three is referring to one of their sub standards. So mpeg creates many standards One of them is mpeg or mp3 mpeg for you've heard of mpeg 2 as well. So mpeg is an organization that creates standards Another organization that creates standards for voice and video is ITU the International Telecommunications Union and they label their standards or codecs With this letter dot followed by a number g711 is an ITU standard for example And there they've got many other ones as well Let's look at g711 and we see in summary the bit rate the rate at which we send our data is 64 kilobits per second what a Typical way to use the g711 codec is that So remember when you're talking you're generating analog data and continuously the codec is creating bits as an output And then we need to transfer them as packets across the network so With the g711 codec The codec size for every sample is 80 bytes in this case and In fact, we can change these values. These are just typical values. Okay, so we take 80 bytes at the time and An interval of 10 milliseconds so every 10 milliseconds We're taking we're generating 80 bytes of digital data So when you're talking think of every 10 milliseconds this codec records what you've said for that 10 milliseconds converts it into binary and Gets an 80 byte value as an output. We'll come back to MOS later What? What our application then has to do is to put it into packets to be sent across the network and in this case the typical packet size the voice payload is Is a hundred and sixty bytes so what we do is we take We've got voice coming in we take 80 bytes The first 80 bytes of voice then another 80 bytes and So on so let's say from the analog input producing some Digital output break it into 80 byte chunks But we don't send 80 bytes at a time across the network in this case What we're doing is we're sending a hundred and sixty bytes per packet. So we take a hundred and sixty bytes two samples here and That's our hundred and sixty bytes of data and then we use RTP to send that data across the internet So we take the hundred and sixty bytes of voice which is two samples We attach an RTP header the RTP header RTP has no retransmission schemes no flow or congestion control We just add the header fields and send it to UDP and Then UDP does the same adds its header fields and sends it to IP Running out of space here. This is our data and then IP does the same. I'll draw that bigger so the Packet we get the IP datagram we get that to be sent across the internet we can draw Bit bigger has an IP header a UDP header RTP and let's say the voice data and Then we send it using the data link layer Now depending upon our computer. We may have different data link layer protocols here So again that may attach a header, but let's Just focus just on the internet protocol Because that's common across all computers with G7 1 1 in this example we take a hundred and sixty bytes of voice data and Every packet every RTP packet contains a hundred and sixty bytes The typical size of the RTP header we saw in the the slide Without options is 12 bytes a UDP header we don't have it here, but if we look it up. We'll see that a UDP header contains eight bytes and IP contains 20 bytes We're going to do some calculations and and see what the columns give us Let me just check how they calculate it or what whether they included ethernet or not So we get the same numbers. I think they do include ethernet We were not Optionally, we could add the ethernet header here and say indicate the size of the ethernet Header and in fact, there's a trailer as well What we want to look at is How much data do we have to send? Across the network in these RTP packets to deliver the voice Recall what the codec does every 10 milliseconds We take a sample of the voice and convert it into 80 bytes So how many bytes per second have we got? Or bits per second and the answer is in front of you, but you can try and calculate it Calculate it 64 kilobits per second why? every 10 milliseconds So we've got voice and every 10 milliseconds we record that value of voice and convert it into 80 bytes So in one second We do that 100 times So in one second we have 180 byte chunks. So 100 by 80 bytes 8,000 bytes per second Which is 64 kilobits per second? So with this codec we're Producing data at 64 kilobits per second with the G711 codec with other codecs. It's different There may be compression. There's no compression in G711. It's just simple PCM We take samples every 10 milliseconds producing 80 bytes per sample But we don't send each sample in individual packet. In this case, we're sending two samples per packet So How much do we send across the network? Well, how many packets per second? Do we need to send? How many packets per second do we need to send? How many packets per second? PPS If we want to deliver this voice across the network Such that when they receive it, they receive it at the same rate as which it's generated. How many packets per second do we need to send? 50 because each packet Contains 160 bytes of data or another way contains two two samples in each packet We're sampling every 10 milliseconds So effectively each packet contains 20 milliseconds of voice One sample is 10 milliseconds of voice two samples is 20 milliseconds of voice. So this packet this voice data represents 20 milliseconds It's you talking and for 20 milliseconds that's then encoded into the using PCM into binary Therefore how fast do we need to send? Well in one second We need to send 50 packets per second to get the same rate Packets per second PPS so Now that we know how many packets per second we need to send we can work out what Data rate we need of our network to deliver that because we see that each packet contains 160 bytes of data plus some header and We've got 12 plus 8 is 20 plus 20. So so far we have a packet An RTP packet of 200 bytes and if we're sending 50 packets per second Every packet is 200 bytes Then what's our sending rate? What's our sending rate in this case? 80 Kilobits per second 50 packets per second times by two two hundred is 10,000 bytes per second 10,000 bytes per second which is 80,000 bits per second 80 kilobits per second. That's our sending rate The answer in this column is 82 point eight kilobits per second when they calculated it for this table They also included the ethernet header. I think that's the difference here Okay, so I haven't included it in the in this calculation Because let's assume we don't know what the ethernet header sizes To be more accurate We would include the ethernet header and then the overheads of the ethernet and we get numbers like in these columns so our voice codec is Generating 64 kilobits per second But because of the overheads of the protocols we have to send at 80 kilobits per second So some of the numbers that we're calculating are shown in this table. So if we have a payload size of a hundred and sixty bytes Then effectively the payload contains 20 milliseconds of voice Two samples each sample is 10 milliseconds and we must send 50 packets per second and if we now calculate the headers and In my case, I've just included up to IP we need to send at 80 kilobits per second If we include others then we it's up to 82 the difference between the this column and this with CRTP You can compress the headers To save space you can make them smaller and if you use this option of compressing the headers Then you don't need such a high band sending rate This is the sending rate required to deliver this voice across the internet now Let's assume we have our a simple network Source destination and a link between them And let's say that In fact coming into the source is many people making voice calls using this codec and there's many eventual destinations and The bottleneck link in the network is between s and d and let's say the capacity of that link is one megabit per second Let's make my calculations easier eight megabits per second. So we've got two two To end points Link between them is eight megabits per second. That's the capacity The question that we may want to answer is how many voice calls can we support across this link? What's the answer? How many voice calls can we make at the same time using the G? G711 codec across this link 100 voice calls our capacity is eight megabits per second or 8,000 kilobits per second Eight megabits per second is the capacity. That's a maximum speed. We can send that or 8,000 kilobits per second For every voice call using this codec We must send at 80 kilobits per second if we send at a lower rate Or some of those packets are dropped then we will not receive and be able to play back the voice at the receiver correctly So we've got 8,000 kilobits per second as capacity every voice call needs 80 kilobits per second then we can have 100 voice calls At the same time Yes, yes So to make life easier we're focusing on in one direction here. So You're right that we should consider both directions Let's say the capacity is is full duplex So I can send eight megabits per second in this direction and the same in the opposite direction at the same time So we'd need to specify that to be clear. So Focusing on this direction, of course voice calls Bidirectional, so if we focus just on this direction What do we need? If we have a capacity for this direction of eight megabits per second then a hundred voice calls in this case This is something that we may need if for example, we want to connect our campus With the rung-sit campus and allow all of our voice calls between campuses between offices To go via the link between those two campuses. So we have a link between our two Campuses we know the capacity of that link we know the number of people in This campus and the destination campus and If we know the codec we're going to use then we can estimate or we can calculate How many voice calls we can support across this link at any one time? How many people can be talking on the phone at any one time? What this table shows is some different codecs and different combinations and you'll see the numbers Give us different results in terms of number of voice calls Any questions? What's packets per second? PPS Okay How many packets? We need to send. Okay, so because we don't necessarily take one's one sample and send it in one packet Because it may be inefficient. So this in this case we took two samples in each packet and You see some other codecs and some other combinations for example G726 this 32 kilobits per second. We take samples every five milliseconds 20 bytes per sample and Here each RTP packet contains how many samples contains four samples each This is the packet Size this is a sample size. So we take a sample every five milliseconds And then every 20 milliseconds we send a packet and that 20 milliseconds or that packet contains 20 milliseconds of voice So we can have different combinations here for the different codecs And therefore 80 bytes per packet plus the overheads Still every 20 milliseconds. So still 50 packets per second and we can calculate the total sending rate required Whether we have compression or not If we take into account some other overheads in Ethernet and you see some of them are not every 20 milliseconds So in this case the G728 16 kilobits per second We send 60 bytes containing 30 milliseconds of voice so If every packet contains 30 milliseconds of voice, we'd need to send 33.3 packets per second to Deliver that voice across the network. So given the details of a particular codec and how it encodes into packets We can work out either what's required to send or if we also know the capacity for example The number of voice calls that can be supported across the network In our network with eight megabits per second and our G711 codec we supported what 100 voice calls If we used G729 can we support more or less voice calls? G7129 More than 100 or less Hands up for more If we use G7129 Instead of G711 And our same network here Hands up if we can support more voice calls Hands up if we can support less voice calls. All right try again If we're using G729 with G711 we can support 100 voice calls Now we change the codec Our application uses a different codec and now we're using G729 Can we support more voice calls? Hands up. A few more hands All right less voice calls With the G729 codec We will not do the exact calculation, but you see that the sending rate required is less than the G711 codec because We're only Producing eight kilobits per second of voice So we don't have to send so much across the network Which means for each voice call we send about 27 kilobits per second across the network Which means if we have eight megabits per second Divided by 27 kilobits per second. We're going to get more than 100 voice calls. It goes up Okay, so the lower The lower the sending rate The better it is for our network in that the more voice calls we can support with a given capacity The sending rate is not an indicator or a high sending rate is not an indicator of good for network performance We would like a low sending rate to deliver the voice across the network a low bit rate So the lower the bit rate or the sending rate in this table the bandwidth The lower the value the better That is the more voice calls we can support any questions on that So don't get confused between sending rate and things like throughput Normally we talk about data transfer throughput. We want a high value. That's good, but here We want a smaller sending rate as possible to deliver the voice across the network So G729 gives us a smaller sending rate than G711 Why? Because of the encoding and especially we take less We take the same number of samples, but eight times smaller With G711 each sample was 80 bytes and G729 each sample is just 10 bytes. So we send less So we support more voice calls What's the problem then with using G729? It's better for my network. I can have more people talking at the same time What's the problem the quality? the quality is much lower because We're taking the voice and we're encoding it into only eight kilobits per second We're not Getting as much information. So when we play it back at the receiver the quality will be lower. Remember last week I played some Audio they were using some of these codecs The best one was G711, which is PCM the lower rate codecs produced lower quality output So there's the trade-off more voice call supported, but lower quality voice calls and The mean opinion score is some measure of the quality so there's the way to measure that in you should do some Audio tests to measure the quality. So there's some typical mean opinion scores the opinion of the receiver on how good the quality is G711 is the highest 4.1. The other ones have a lower mean opinion score It's a measure of quality. So that's the basics of RTP. There's no retransmissions We just put the data in our packet and send We'll have sequence numbers so the receiver knows if we receive things out of order But if something is not received it doesn't ask for it again There's no retransmission that was RTP We can use it not just for voice but for other audio audio and video The last one on RTP and I will just quickly mention there are different features of RTP called translation and mixing Translation is converting the content types for example Midway between the source and destination you have a special device that Changes the codec that's translation for example. I'm sending From my source computer to the destination which is some mobile phone The concept is if I use one codec here a good quality codec Which requires a high sending rate then some intermediate device when it recognizes that this This content needs to be sent across a wireless network Say to a mobile phone where the data rate or the capacity is much lower It can translate from the G711 codec down to a lower quality codec like our G729 for example and then send to there So this device does translation converting from one codec to another and the main idea would be to To change to a codec which is more suitable for the receiver If I was sending to another PC then maybe it would stay as G711 a high quality codec But sending to someone with a lower Capacity or low lower capability device I may translate mixing is another feature which allows you to have multiple sources connected and And sending and then this intermediate device takes the content from those multiple sources So there's an RTP packet sent across sent from each source and This device mixes the content together and sends it out as a single RTP packet This is for example with audio teleconferencing or even video conferencing Where maybe there are three sources or people at three locations on a teleconference or four locations in this case and The content coming from these three sources Can be combined together So there's audio from the three sources You can mix them together to get one audio Content which represents all three and then send them in one RTP packet as opposed to sending all three copies Across the network. So that's the the basic concept of mixing And it can lead to performance improvements because we can send less across the network And that's all we want to say about those two features the translation is converting from one codec to another Mixing is combining the content from multiple sources to get one at one content as output There are remember RTP is just about sending data across the network the voice data There's an RTP control protocol which is used for sending some reports about what's happening For example, the sender can send a report to the receiver The receiver can send some report to the to the sender about the quality that they're receiving So I'm receiving a certain quality the destination measures the quality sends a report back to the sender And as a result the sender may adjust How they send their data they may change the codec for example So just some reporting between the different entities not so important that one the other important part for voice over IP is signaling How do we set up the connection before we transfer the data? How do we make the phone call and? That's the generally called signaling in an old style telephone network Landline the public switch telephone network the main protocol used for signaling is called signaling system number 7 SS 7 And it handles this this feature of when you pick up the phone dial in a number It sends a signal across the network the switches set up the path and When someone at the other endpoint picks up their phone a signal comes back and They set up the path along the way So that's the idea in the the landline telephone network What about in an IP network? Again, we need a signaling protocol The two main ones are called sip the session initiation protocol and h3 2 3 In fact the main one used in the internet today is sip session initiation protocol This is a protocol that when I open my voice software on my laptop and Choose some under call and I press call the protocol sends some packets across the network and the call these Software should start ringing the destination software should start ringing or give some notification on their screen and When they answer it should send some message back to my computer to say that they've answered and then we start using RTP to send our voice So this is setting up the call Let's briefly look at sip the session initiation protocol It can do many things not just set up the call, but similar to SS7 things like call forwarding Error reporting and so on but will not cover them so the caller Notifies the call II when they want to start a call and also allows them to agree upon which codec to use So for example both support g7 1 1 so they may choose to use that as a codec But we can see we can have more complex combinations we use IP addresses to identify the entities with Landline telephone network will use phone numbers. Okay, there's what is a 10 digit or so telephone number different lengths in different countries with Internet Voice over IP we use IP addresses to identify the caller and call II sip allows us things like changing the codex during the call having Conference calls so not just one-to-one but having many Participants in a call inviting new participants call holding and so on all the things you expect of a Telephone system sip is considered an application level protocol. It uses UDP in Some special cases TCP, but in most cases use you UDP Think of it like a an application level protocol like HTTP. There's a server a sip server Listens on some port number and When we want to make a connection we send some message to that sip server, which is like Calling that person and the messages are similar to web HTTP messages they are text in some encoded in some format Addresses are similar to email addresses for example sip and then the username at some domain name and the domain name can map to an IP address So the idea is that if you want to call someone you need to know their sip address Sip doesn't say how to use or what to use for data transfer Sip is just for the signaling For the data transfer we can use different mechanisms one of them of course is RTP, but others can be used a simple example of how it works Bob Alice wants to call Bob in this case These are the IP addresses of their computers They don't have domain names in this simple example Alice Knows the IP address of Bob's computer in this case So that's the assumption for this case. How do they know it? Well, we need different ways to know it. We can use DNS Sip has some special servers to keep track of IP addresses of individual users But in this case Alice knows the IP address of Bob's computer And they know Bob's username Bob So what Alice does or her? Voice software Uses SIP to make a call to Bob and the basic exchange is we send an invite message invite them to the call and It has some format and the basics are so Similar to you've all seen them a HTTP get request Has some format a sip message is the same some text With some meaning in this case invite Bob at that IP address and some optional fields in this case we include the IPv4 address of Alice and Give some indication of what? Content we're going to transfer in the call and what protocol to use In this example, it's saying we're going to have audio We're going to transfer the audio using RTP and AVP is the Audio video profile the codec type codec type zero in this case What this is saying is that? Alice is telling Bob Once we set up this connection. Let's use RTP and in particular when Bob sends data to Alice Bob should use RTP with codec number zero and Bob should send to port number 38060 That's for the data transfer Once we set up the connection. We need to communicate using a particular protocol in this case Alice has chosen RTP codec zero and Port number 38 oh six oh We send this message to Bob's computer. It's sent to port number 5060. That's the sip port number and And as a result Bob's phone rings or his computer software gives some notification saying you're being called and When Bob picks up or answers Sip sends back an okay message and it's similar to the web browsing We send back a 200 okay where 200 is the status number and okay is some short status code saying that I accept that connection and Sends back the IP address that Bob is using and sends back the the content type that Alice should use to send to Bob Alice should use RTP Audio video profile number three a different codec and Send to port 48753 When Alice receives that again on port 5060 Sends a final act and That's the normal procedure for setting up the call Once we've set up the call then they send their data so they start talking and When Bob is talking Bob is taking we're taking his analog voice and we're encoding it into some digital form. How do we encode it? Well, Alice said she wants to use codec zero and You can look up. There's a table that specifies what codec zero is it turns out It's the the basic PCM codec like g711 A common name is micro law audio, but the like the g711 codec that we used in our example and Bob's application sends it to port 38060 at Alice's computer as Specified in Alice's invite message When Alice is talking it's she doesn't have to use the same codec in this case It's set up that when Alice is talking. She's using the gsm codec codec number three which Bob indicated So you can use different codecs in each direction and different port numbers So the blue parts are the basics of a sip invite and then we do the data transfer and After the data transfer there's sip messages to close the connection to hang up for example So they're the main well They're very simple introduction to sip that we use it to set up a connection for a voice call and for other multimedia applications There are many different Messages, this is just a simple example of an invite and okay in an act, but there are different messages for different purposes For different features for our telephone system any questions on sip everyone can answer our exam question in what three weeks time Just the basics of Understand what it's used for From if I gave you a diagram like this in the exam you should be able to answer questions like What port number should from the first three messages? What port number should Alice receive her data on Okay, it's in this message Alice Sends a message to Bob saying when you send me data use RTP audio video profile zero and port number three eight oh six oh and Similar Bob indicates what he wants to use When he receives data and here in this example we're using RTP So if you know the codec You could do things like calculate Given the network capacity calculate how many voice calls in parallel could we have across our network if we're using this system? So you look look at the sample size the packet size and the capacity and These messages these first three messages were sent using UDP So I cannot we're not draw the stack but briefly We think sip UDP IP a sip message is put inside UDP and sent using IP across the internet and What is a sip message? It's just some text like shown there enough on sip and enough on voice There's some issues that arise of okay now simple example Alice knew the IP address of Bob Well, how do you know the IP address of someone else's computer? Well, you can use DNS So, you know Bob's domain name But how many people have their own domain name who here as Their own domain name No one okay So Sip has some special services that you can help keep track of where users are So there are special registrar services Servers and proxy servers that can help keep track of when someone's moving Where to find them We'll not go through the example, but there's ways to to use sip to Forward the invites to the right location Even if that person has moved to someone else somewhere else temporarily you can still reach them so in summary Sip is a general protocol for initiating and managing sessions. That's where its name comes from the session initiation protocol Is not just for voice they can also be used for video and also data some instant messaging protocols use sip so when you send a Short message to someone you can use sip to do that To set up that connection Many phones today many IP phones support sip RTP and and related protocols. So these are think of these as the standard internet protocols They may not be the most common, but they are standardised by the internet engineering task force So your phone May be a soft phone a piece of software running on a computer That implements these protocols Maybe a standalone phone like you can buy a phone which is it basically gonna basically an IP phone Which implements an IP stack and those protocols or you can get an adapter for your home phone You're your normal home phone that you can plug into and using an adapter to to send IP packets Skype may be the most well-known of the most popular voice over the internet protocol Doesn't use sip or RTP it uses its own proprietary protocol. So That's an exception We're not going to go through streamed story a stored audio video. That's like YouTube streaming the ways in which the a Web server for example streams audio to a web browser There's not much to say about it anyway Let's in the last five minutes just introduce this topic of IP TV and we'll look at some details next week So voice over the internet. Well, let's move to video video of the internet TV specifically Well, how do we view TV or videos across networks across the internet? And I think you everyone here has Watches videos and in some cases TV from a TV station across the internet there are different ways to do it and Just to be clear on what we're talking about with IP TV Well, some of the normal ways Open your web browser and visit a website and it streams that content to you Okay, when you watch YouTube, that's an example And most TV stations have their own have their content available via websites as well So you can watch the video via a web browser on a PC on a tablet on a phone In most cases it was getting better, but in most cases the quality of that video is Not high Okay, if you think about the screen size If you watch YouTube on your laptop Then what are we talking about this size of the screen? So the resolution is not that high although you can get high resolution YouTube With most when we're streaming across the internet the quality is not Not the same quality as you get on your TV on your TV the quality People expect is there's no interruption in the service that when you watch TV normal TV It doesn't pause for three seconds and start again There's no pixelation As long as you have a good signal in some cases there may be with a TV The quality is expected to be Continuous constant quality on a large screen With web based TV and video viewing often the quality doesn't match what you get with watching TV You can get high quality now YouTube does provide high quality video and you can watch it on large screen TVs But it's not as common So that a common way to watch TV and video is via your web browser But a limitation is usually the quality is not so good another way Is to download a file and then watch it after you've downloaded it So the first case is streaming so you're playing back as you receive it Another way is to download a file wait for 10 minutes and then watch it play it back on your computer So file based distribution That's not real time. Okay, although With high internet speeds it doesn't take long to download in some cases It still takes a lot of time to download before you can play it back So you don't get instant playback in that case what IPTV Generally refers to is providing high quality video in real time to large screens Across a network in particular across an IP network So it's about delivering video across an across the internet but IPTV generally refers to a higher quality video than what we're used to with web browsing and High quality on a large screen not just on a computer screen for example and Delivering that usually requires some some special techniques in the network to make it work. Well, we'll go through them next week Well, this is not very useful. I think most people understand that okay there We have screens what we may have if we want IPTV. We need internet access Okay, IPTV. We're receiving the video across the internet. So we have some modem some broadband or some ADSL connection or Cable connection and then inside our home. We have ethernet for example a Wi-Fi to distribute that content often via set top box Some device that controls the content just distribution inside the home Sending some parts to the stereo the audio parts to your hi-fi Some parts to different video screens and maybe having some control Of that. That's the idea Why do we need high quality TV? Well some obvious reasons that you all know about We can watch TV across Across the internet and we no longer need the normal telephone a television network Okay, so the tele television station the TV station can distribute their content via the internet as Opposed to sending their content via their own network via satellite or via terrestrial radio and Digital TV is one of the applications we can or the content we can receive things like video and demand are more suited to Such networks The user can choose what to watch at a particular point in time Business applications, it's more useful for a distance learning so watching videos Especially if you have a set up in in advance Inside businesses and so on but some examples of applications of IPTV let's just finish on an example of Typical requirements, let's say we have a home several people living there and We want to deliver all of our content via the via our internet connection All of our content means voice We want to make voice over IP our standard technique for voice calls We want to have normal internet access for web browsing and so on and we also want to have digital TV All of that content comes across our one internet connection The question is how fast does our internet connection have to be voice not a problem Voice calls good quality voice call 64 kilobits per second is the typical speed required What do you need for high-speed data access? Well, maybe several megabits per second per user So if you have several people in your home Browsing websites so modal megabits per second is required What if we want to stream dead standard definition TV? There are different definitions of standard definition But typically per channel we need several megabits per second to stream SDTV Two to four megabits per second if we want high definition We need up to ten megabits per second per channel. It can vary So if we have a house with multiple TVs multiple people wanting to watch different channels at the same time then the internet access needs to support tens of megabits per second 20 30 megabits per second normally Who has internet access that supports 30 megabits per second? Anyone anyone have cable? Not many people in some countries. It's more just more so ADSL Will typically not support these data rates We're reaching the limits of ADSL to support this So we'll see later and we'll see next week that If we want to have TV delivered across the internet at high quality We need fast networks Especially that last mile that connection from the network provider to your home That last portion of the network needs to support data rates of 10 20 30 megabits per second and higher What we'll look at next week is some of the technologies to support IPTV Let's continue that next week