SIP Proxy Server
A SIP proxy – sometimes also referred to as a SIP server or SIP proxy server – is mainly used by a SIP network to do call processing, but that isn’t its only function. In addition to managing the set-up of calls between SIP devices and controlling call routing, a SIP proxy may also perform other tasks such as authorization, network access control and even the handling of network security in some instances.
SIP Servers
While SIP user-agents (endpoints like SIP phones) can communicate directly without any additional SIP intermediaries, from a practical standpoint, SIP servers are required to facilitate end-to-end communication when utilizing SIP as a public service.
RFC 3261 defines these server elements:
A proxy, or proxy server, “is an intermediary entity that acts as both a server and a client for the purpose of making requests on behalf of other clients. A proxy server primarily plays the role of routing, which means its job is to ensure that a request is sent to another entity “closer” to the targeted user. Proxies are also useful for enforcing policy (for example, making sure a user is allowed to make a call). A proxy interprets, and, if necessary, rewrites specific parts of a request message before forwarding it.”
A registrar is a server that accepts REGISTER requests and places the information it receives in those requests into the location service for the domain it handles.
A redirect server is a user agent server that generates 3xx responses to requests it receives, directing the client to contact an alternate set of URIs.The redirect server allows SIP Proxy Servers to direct SIP session invitations to external domains.
The RFC specifies: “It is an important concept that the distinction between types of SIP servers is logical, not physical.”
What is a SIP Proxy Server?
A SIP Proxy, also called a SIP Server, or even a SIP Proxy Server, facilitates communications between two SIP addresses. In practical terms, any SIP device can talk to another SIP device. But in order to that, they use a go-between, called a SIP proxy, to begin the communication, which then drops out, allowing point-to-point communication.
A SIP proxy is configured to do the tasks associated with finding the proper destination of a call. When an IP phone makes a call, it’s sending an invite request to a proxy server. The phone itself doesn’t know that the digits mean, but the proxy server does. The proxy server routes the request within the network, to a remote proxy server, or to an “off-domain network,” such as the PSTN.
A proxy server also handles call rules such as find me/follow me. The SIP proxy server is configured to have multiple phones ring simultaneously, or sequentially, and for how long before going to another destination, such as another extension or a voice mail box.
The SIP proxy server also handles security. If a call is being made to the PSTN network, an international destination, or any destination that costs money, the proxy server checks the caller’s identity and credit. The proxy server can check the caller’s identity to make sure the originating caller is not trying to impersonate a valid user, but if a valid user has his identity stolen, the SIP proxy will perceive the identity as valid and continue the call.
A SIP Proxy Server has two modes of operation: “transaction stateful” and “transaction stateless.” A “stateless” proxy forgets the information about a request—the transaction—as soon as it is made. A “stateful” proxy remembers the entire transaction until the transaction is complete, at which point it becomes stateless again. A stateful proxy is able to handle SIP forking, day/night mode, and other complicated call rules because it can remember all of the incoming and outgoing transactions.
A SIP proxy server works alongside a registrar server and a redirect server. The registrar server has all the personal information about a user agent, such as their phone number. A redirect server collects information about the off-domain user, and then sends that information back to the proxy server, which can then send out the proper request.
SIP proxy and SIP gateway
https://www.lancom-systems.de/docs/config/en/refmanual/Referenzhandbuch_7.60_EN/VOIP/aa112828.html
The tasks involved in switching calls between the different lines of SIP and ISDN subscribers are handled by two functions in the LANCOM VoIP Router.
SIP proxy A SIP proxy handles the switching between callers.
SIP gateway The SIP gateway handles the conversion between IP-based telephony that uses the SIP protocol and other (telephone) networks, for example the ISDN network.
Gateway
https://webrtcglossary.com/gateway/
https://webrtchacks.com/webrtc-gw/
A gateway is a device or an application that connects two different types of protocols.
In the context of WebRTC, Gateways are used to connect a WebRTC service to another type of network.
Most WebRTC gateways tend to lean towards connecting WebRTC to SIP and IMS.
WebRTC Gateways almost always need to also transcode voice and video due to the fact that WebRTC’s codecs are different than what exist in other VoIP systems.