UNDERSTANDING SIP ADDRESSES 理解sip地址

https://andrewjprokop.wordpress.com/2014/03/24/understanding-sip-addresses/

image
“To be or not to be. That is the question.”

Ah, the angst of youth — feeling that you are on the cusp of something incredible, but not having the maturity to understand what it is. William Shakespeare brought life to those words over 400 years ago and yet they still ring true today. I will venture to say that they apply equally as well to this middle-aged SIP guy who still struggles to find his place in an ever complex world of people, places, and gadgets.

青春的焦虑,让你感受到在某些不可思议的边缘,但还没成熟到理解它。莎士比亚在400年前就带来了这些文字且至今仍然受用。我敢说,它们同样适用于这个SIP老家伙,他仍然在一个不断复杂的人、地方和设备的世界中努力寻找自己的位置。

Knowing who you are extends well past the trials of Hamlet, the Prince of Denmark. Here in the world of technology, we apply names to the entities we wish to control, be controlled by, or communicate with. In the IP space, we have the Machine Access Control (MAC) and Internet Protocol (IP) addresses.

知道你是谁远远的超过了哈姆雷特的考验。在科技的世界里,我们将名字用于我们希望控制的,被控制的或者与之交流的。在IP的领域里,我们有MAC地址和IP地址

The MAC address uniquely identifies a network interface on a physical network segment. Every Network Interface Card (NIC) has a MAC address. This address is universally unique and no two NIC cards will ever share the same MAC address.

MAC地址唯一地标识物理网络段上的网络接口。每个网卡都有一个MAC地址。这个地址是唯一的且没有哪两块网卡会共享同一个MAC地址

An IP address is a label assigned to a device (e.g. computer, printer, call processing server, etc.) that uses the Internet Protocol for communication. An IP address must be unique within the LAN or WAN it resides in, but is not necessarily universally unique. One enterprise can use many of the same IP address that another enterprise uses. Communication between those two enterprises is possible using Network Address Translation (NAT) techniques, but that is a subject beyond the scope of this article.

ip地址是用ip协议给设备分配的一个用于通信的标签(例如电脑、打印机)。ip地址在其所在的局域网或者广域网中必须是唯一的,但并不是所有的都是独一无二的。一个企业可以使用和另外一个企业一样的ip地址。两个企业间通信可能是使用NAT(地址转换)技术的,但这超出了本文的范围。

SIP has its own share of names and you will find them in a variety of different places. It’s important to know that there are different types of addresses and a single SIP element may be addressed in more than one way.

SIP有它们自己的名字,并且你将在多种不同的地方找到它们。重要的是要知道有不同类型的地址,单个SIP元素可以用多种方式进行寻址。

At the core of SIP communication is the Address of Record (AOR). The AOR is a high level name that is assigned to a SIP entity without regard to the device or devices that names might use. The format for an AOR is as follows.

在SIP通信中的核心是AOR–地址记录,AOR是分配给SIP实体的高级名称,与名称可能使用的设备无关。AOR格式如下:

SIP:user@domain

When a SIP entity wishes to communicate with another SIP entity, it populates the SIP Request-URI and the To header with the recipient’s AOR. It will place its own AOR in the From header.

当一个SIP实体想与其他SIP实体通信,它使用接收者的AOR填充SIP请求reuest-line和To标头。它将在From header中放置自己的AOR。

The AOR is great for high level routing, but it falls short when it comes to identifying the actual recipient of a SIP message. That’s because the form of name@domain doesn’t specify the device or devices that that AOR might be currently using. For instance, I can use my AOR of SIP:aprokop@arrows3.com to register the 9641 SIP telephone on my desk, the One-X Communicator on my PC, the One-X Mobile on my iPhone, and the Flare Experience on my iPad.

AOR非常适合高级路由,但在识别sip消息中真正接收者时略逊一筹。这是因为AOR的格式并没有列举AOR当前可能在使用的设备。例如,我能用我的SIP AOR:SIP:aprokop@arrows3.com 来注册我桌山的9641sip话机,也可以注册在我的电脑上或者我的手机、ipad上

That’s four devices and four IP addresses. How do I go from an AOR to a device?

这是四个设备与四个ip地址。我如何从AOR到一个设备。

This is where the SIP Contact header comes into play. The Contact header allows a user to associate one or more devices to a single AOR. Each of those devices will send its own REGISTER message and each REGISTER will contain a unique Contact header.

这就是SIP Contact头发挥作用的地方。联系人头允许用户将一个或多个设备关联到单个AOR。每个设备将发送自己的注册信息并且每个注册信息将包含唯一的contact头

For example, the Contact header used by the REGISTER from my PC might look as follows:

例如,我PC上注册消息使用的Contact头看起来应该如下:

Contact: Andrew Prokop <SIP:aprokop@192.168.0.14>

The Contact header used by the REGISTER from my iPhone might look as follows:

我的手机上的contact头如下:

Contact: Andrew Prokop <SIP:aprokop@192.168.0.4>

Notice how each Contact header uses a different IP address for the same “aprokop.” This allows a SIP registrar (which in my case is an Avaya Session Manager) to support multiple devices for a single user. If someone calls SIP:aprokop@arrows3.com, both my One-X Communicator and my One-X Mobile will ring. There is no reason for the caller to ever know the actual IP addresses of my devices. DNS routing will find arrows3.com and my company’s Session Manager will simultaneously alert all my registered devices.

注意每个联系人头如何为相同的“aprokop”使用不同的IP地址。这允许SIP注册商(在我的示例中是Avaya会话管理器)为单个用户支持多个设备。如果有人拨打SIP:aprokop@arrows3.com,我的One-X通信器和我的One-X移动电话都会响。调用者没有理由知道我的设备的实际IP地址。DNS路由将会找到 arrows3.com 然后我公司的Session Manager会同时告警我所有的注册设备

Contact headers can be used in messages other than REGISTER, but in all cases the goal is to associate a device address with a user.

contact头可以用于messages除了注册消息,但是在所有情况下,目标都是将设备地址与用户关联起来。

So, even though a rose by any other name would smell as sweet, a single AOR may take on different odors depending on the Contact headers associated with that AOR. Okay, that’s a weak metaphor, but I’m an engineer and not a poet.

因此,尽管玫瑰不管叫什么名字,闻起来都是一样香的。一个AOR可能具有不同的气味,这取决于与该AOR关联的联系人头。ok,这是一个很烂的比喻,但我是一个工程师而不是诗人

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值