 Welcome to the Network Engineering video blog. I am your host Michael Crane. In today's video, we are going to use Wireshark to look at a SIP call transfer using the refer method. The call flow will be A call C, then B calls A, followed by A transferring B to C. We will be using our SIP test bed we built in video number 65 for this testing. So let's get started. Okay, so it's going to be a call transfer test. Basically what we've got is we're going to have A is going to call C, right, and then B is going to call A, and then A is going to put the phone C on hold. He's going to answer the call from B, and at that point A is going to transfer B to C. All right, and I hope that makes sense. Let's give it a shot. Okay, so first A is going to call C. Okay, now B, let me down a little bit. Now B is going to call A. All right, you can see line two blinking there for A. So I'm going to, A is going to put phone C on hold. So I'm going to put him on hold. I'm going to answer line two. Yeah, it's hard to do this voice path test. It's easier just to pick the phones up and say hello, hello. But yeah, that wouldn't work too good with the video. Okay, that looks okay. Okay, so these guys are in two-way comm, and we've got phone C on hold. All right, so now what I'm going to do is I want to transfer basically line two to line one, or basically C to, or B to C. And after we do that, A is going to drop off. So I do this, I'm going to hit the transfer button. And at this point, usually a dial a phone number, but since we're doing direct dial, I can't do that. So luckily, the GrantStreams allows you to just select the line. So I'm just going to select line one, which is phone C. And as you can see, phone A is disconnected. There's no longer a call going. And you can see that B and C are talking. And you can verify. Yep, we've got voice path going both directions. So there you have it. Okay, that's a call transfer. All right, so I guess first we'll just take a look at the call flow here real quick. So you go to telephony, VoIP calls. And since this is a transfer, we're going to have two different calls. One is a calling C and the second one is B calling A. All right. And I'm just going to highlight them both so we can look at them together. I think it'll make more sense than looking at them one at a time, right? So I'm going to highlight them both, click on flow sequence. All right, let's refresh our memories with what the test bed looks like. All right, so dot 44 is phone A right here. Dot 46 is phone C. And dot 45 is phone B. So it's good that we looked at this. So you know, the middle one here instead of being B is going to be C. All right. So first we have the invite. So A is calling C. And I'm not going to really go over the messaging on a regular SIP call. I've done a video on that. And also I've done a video on putting a phone on hold. I'm not going to go deep into that. We're mainly interested in the transfer part of this today. But we'll go ahead and look at this here real quick. So we've got, so this is A calling C. There's the invite and it gets 100 trying from C, gets a 180 ringing from C. And at this point, we should have a dialogue up or our dialogue ID, I should say. And then we get the 200 okay. And they agreed upon G711 mu law and phone A acts back. Acts the 200 okay. And we have two way media. That's what these guys are. All right. So we've got basically the A called C phone call up, right, or session up. And that's just your standard SIP call that we've looked at in previous videos. All right. Well, this is different. So, so now we're going to have this is the invite coming from B. And he is calling A. And of course, it'll be coming in on line two. So we get the invite from B. We get a 100 trying from phone A 180 ringing from phone A. And so now the phone is ringing and alerts the user. So the user says, Oh, okay, I've got another call coming in on line two. So he says, the phone C, let me put you on hold. And that's what this invite is. That's that's phone A putting phone C on hold. Here's the 200 okay back from phone C. And the act back from phone A. Okay, so now line one is on hold, line two is ringing. So he clicks on line two, these are clicks on line two, and, and that generates a 200 okay from phone A to phone B. Then phone B sends a an act to the 200 okay. And now we've got two way media. Okay, so the call is up that that session is up between phone A and phone C. I'm sorry, phone phone B and phone C is still on hold. All right. So now what we want to do is we want to transfer phone C to phone B. Right. So here's this is that this is the invite to do that. And let's go take a look at that invite. So when I hit the transfer button, phone A sends an invite to phone B, right. And if we look down into the in the SDP, you can see he's he's putting him on hold basically, right. So he's basically putting phone B on hold. And what's interesting about is it says this in dialogue. And I mean, I noticed in when we're doing the other hold, when we did last video on call hold, and I never saw this in dialogue. I'm not exactly sure why it all of a sudden decided to mark it as in dialogue. It didn't do the other one. We could look at it real quick if you want. And this is where this is where this call flow comes in handy. If we just try to scroll up here and figure out which invite is what, there's three of them right before we even get to it. And we could do it. I mean, it's not that hard with this simple of a call flow, but it's easier just to come down here and say, okay, well, here's where B is calling a and this is where we put C on hold. So you just highlight this invite right here. And what's nice is it automatically highlights it on the trace. So we can just move that off the screen, come down to this invite. And this is where we put them on hold. You can see a ascending C, the invite ascend only, right? That's a 200 okay back should be received only up from C. But you notice he didn't put in dialogue there. I don't know why. Maybe someone that knows more about wire shark than me can comment. But anyway, let's go back to our call flow because we're looking at call transfer. And let's see, where were we? We Okay, put on hold. Okay, this is so now the call the session between A and C. I'm sorry, A and B. C is on hold. Okay, we hit the transfer button. He puts B on hold. Okay, here's a 200 coming back and act for putting B on hold. And as soon as I select that line, where I say, so I'm talking to me, I select line one for phone C, do this, I'm going to hit the transfer button. And at this point, usually a dial a phone number. But since we're doing direct dial, I can't do that. So luckily, the grand state streams allows you to just select the line. So I'm just going to select line one, which is phone C. He shoots this refer out. Now this is this is the real transfer right here. Okay, is this refer and let's go look at that guy. Okay, we've got okay, it's coming via a okay from phone a okay that makes sense to phone C. Okay, here it is. Here's the ears what we're looking for. So we're going to refer to dot 45, which is phone B port 56 he replaces this call ID. Okay, from tag, here's his from tag, here's his to tag. So it's a it's looking at the whole dialogue, right? And it's referred by, well, there's a head scratcher. Wow, I don't know where that IP address came from. That's, that's pretty damn funny there. It must be some something bogus in in one of the phone configs. That's that's populating that because dot 40, what is that? Let's pull up our drawing. There's nothing up here with dot 40. I'll have to go look at that. Okay, so I went ahead and pulled up the the config for phone a you can see his IP address is dot 44, which is correct. And then line one or count one, you can see that the dot 40 is actually something I plugged in there for the SIP server. And the SIP server does not exist. Well, not yet anyway. And I do plan on creating a SIP server with an IP address of dot 40 if you remember from a long time ago on a video blog, we did. But as you can see, that counts not even active. So I guess the the SIP phone decided, well, I need to plug something in that field. So I'm just going to plug this dot 40 in. So anyway, that's where that that dot 40 came from. And yeah, so in this referred by I'm surprised I didn't use dot 44. I'd have to go on the spec, but I I'm surprised I just didn't use dot 44. Anyway, yeah, we're going to be replacing this dialogue for that's going to phone A to and it's going to be replaced by a dialogue between B and C instead of A and C. Okay. And one of the things I was looking at was, if you notice in our trace right here, you're going to see something that you see that accepted right here. And this is coming from phone B. I'm sorry, phone C is, you know, given a 202 accepted. And then after this 202 accepted, we see this notify coming back. And what that is, is that's, and we can look at it real quick, but it's a, a SIP fragment. And he's kind of given us, he's giving phone A, or phone C is telling phone A, what's going on with the call between the call that we transferred between B and C. All right. So phone C is updating phone A about what's going on between B and C. Does that make sense? And what he's telling us is a SIP frag and he's received a 100 trying from phone B. Now, if you notice from our trace here, we don't see that right here. And that's because I didn't have the port marrying turned on for phone B or phone C either one would would work because we're missing the dialogue between phone B and phone C, because I only had the, the port marrying turned on for phone A. So we could see everything communicating with A, but not if A wasn't in the conversation, he wasn't getting the trace. So I went ahead and made another call, exact same call. This time I turned on port marrying for phone C, I believe. You see now he's, yeah, it was for phone C because you can see right here. So we'll just highlight these guys and look at the flow sequence. And now I'll see we have another color. So here's a refer we're looking at. Here's a 202 accepted. And here's a notify. And you can see it looks like it's a little, a little out of sync. Not exactly sure why. But if you look at this is the invite from phone C to phone B. All right, let's go take a look at them real quick. So here's that invite message header. Okay, so from phone C to phone 45 is B, you can see there's not a tag ID right here. So they haven't established a dialogue yet. Okay, contact phone C. And here's the replaces header. This is telling phone B that this is a transfer. Okay. And it's replacing this dialogue, right? It's not the dialogue that was in that was in that refer to in that refer header that refer sent message. This is the dialogue from the phone call from B to a. Okay, so let's go look at that real quick. So here's his call ID a 18 is the last three digits and the tag is 592 and 527. So let's go up here. See, even this, this kind of simple trace can get pretty complicated. So dot 45 is is B. Here's where he called a. And let's go down to the 200. Okay, here's the 200. Okay, for it, let's go look at his dialogue ID, we got, yeah, so here you go a 18 d 09. Oh, sorry, that's, that's transaction ID 527 and 592 replacing down here. And this replaces header. See 527 592 a 18. So this is the dialogue we're replacing with this new invite that we received from C, right? Is that clear as mud so far? Anyway, he sends a 100 trying back. And then he says, but I don't need this, this old call anymore to phone a. So he sends a by the phone a it's probably easier. Look, let's look at this trace right here. Okay, so here's a refer accepted, notify and 200. Okay. And this notify where it said trying. I believe this is when it's in a sip frag like this is usually from it'd be like this trying right here. But it doesn't look like it's really synced up. And I'm starting to think maybe it just got a 100 trying from phone C or this traces out of whack. And I'm not going to really look get into it or dig into it a little more other ones look like. So here's a ringing. And here's probably a notify for the ringing and stuff. So I'm not sure if C just didn't generate that 100 trying just to send you know, an update to phone a. But anywhere is a 200. Okay. Okay. So here's the the invite from C to B with the replaces. So it's replacing the call from from a to C, and it gets a 100 trying back from phone B. And at this point, phone B says, well, I don't need that this call up here anymore. So I'm just going to disconnect it. And then he sends, okay, I'm doing a ringing sends a ringing to phone C. Phone A is sending a 200 okay back to this buy right here. And we can go look at that real quick. If you're wondering how to determine that. This is where the sequence numbers come in. So there's a buy. And this is what like I was saying where the sequence comes in. So it's a sequence number of 15135 by and here's that ringing I was telling you about right here. And here's a two okay. And 200 okay, and you can see so it's forced the sequence by 15135. So that's how you kind of know that by and this 200 okay are matched up. And so phone C has received a 180 ringing from from B. And now he's going to notify phone C is going to notify phone A just to kind of keep them in the loop that he got a ring. So we'll go look at this real quick. And there it is right there in a sip fragment. He's saying, yep, I got a ringing phone A says, okay, very good. And then phone B sends a 200 okay for the, you know, to bring the the call up or the session. And phone C says, tell us phone a okay, I've gotten a 200 okay. So now the call is up phone C acts the 200 okay. For this guy right here is he got 200 okay, he acts it, he sent the in between that time he sent the notify phone a sends a 200 okay for that notify that he received right here. Okay, now these guys have their media going. So the session is up and now that phone a knows that this call was transferred. Okay, he just sends a goodbye and disconnects the phone and phone C says yep, see you okay. All right. Don't forget you can support the network engineering video blog by donation using a credit card and PayPal or by purchasing products at the muxall store details and links are in the description under this video. Well, that's it for this video. If you liked the video, give it a big thumbs up. That helps and hit the subscribe button. That really helps. If you have any questions or comments, post them in the comments under this video. Thanks for watching and I'll see you next time.