Understand SIP trunk and registration in DWG gateway Version: 1.0 Dinstar Technologies Co., Ltd. Date: 2014. 09.29 http://www.dinstar.com 1 / 9
Contents Chapter 1: Authors and changes logs... 3 Chapter 2: Introduction... 3 Chapter 3: the comparison of SIP trunk and SIP registration... 3 3.1 SIP trunk and its typical usage... 3 3.1.1 SIP trunk... 3 3.1.2 related parameters... 4 3.1.3 typical usage scenarios... 5 3.2 SIP registration and its typical usage... 5 3.2.1 the procedure of SIP registration... 6 3.2.2 configuration parameters in DWG gateway... 7 3.2.3 Different register modes... 7 3.2.4 usage scenario of SIP registration... 8 Chapter 4: FAQs... 8 1. How to open debug of SIP message in DWG gateway?... 8 2. Does DWG gateway supports SIP trunk registration?... 8 3. Why can t you use SIP trunk while one peer is after NAT and another peer has public ip address?... 8 http://www.dinstar.com 2 / 9
Chapter 1: Authors and changes logs Content Date and version Change by The main content Version 1.0, 2014-9-29 porter Chapter 2: Introduction This document will try to introduce the SIP trunk and registration mode in DWG gateway, and also will compare their difference and their typical usange scenario. We hope that you find it helpful and look forward to your comments. SIP trunk and SIP registration are the connections between two SIP-based entities, and are used to commununicate over the internet in VOIP services. The reader of this document is required to have the basic knowledge about Session Initiation Protocol (SIP) and TCP/IP protocols. Chapter 3: the comparison of SIP trunk and SIP registration In this section, we are going to introduce the SIP trunk and SIP registration in DWG gateway, and then compare their differences and their typical usage. Besides, this section will introduce some parameters in DWG gateway which will effect the SIP trunk or SIP registration. 3.1 SIP trunk and its typical usage 3.1.1 SIP trunk In DWG gateway, SIP trunk is usually used to connect gateway and softswitch for call termination, and DWG gateway works as a termination gateway. SIP trunk mainly consists of four elements: the local IP address, the local SIP listen port, the remote IP address, and the remote SIP listen port. See below figure: In this figure, for DWG gateway: local IP address: 172.16.111.109 local SIP port: 5060 http://www.dinstar.com 3 / 9
remote IP address: 172.16.111.110 remote SIP listen port: 5060 Understand SIP trunk and registration in DWG gateway NOTE: Authentication is not supported in SIP trunk mode of DWG. 3.1.2 related parameters The local IP address can be checked on the web system information of the gateway. And it can be changed under network configuration -> Local network. The local SIP port can be checked and changed under system configuration -> SIP parameter: Local SIP Port. The remote IP address and remote SIP listen port should be provided by the softswitch administrator. Then create the SIP trunk under IP trunk configuration -> IP trunk: http://www.dinstar.com 4 / 9
Besides, to use the SIP trunk in the gateway, we have other two parameters which are used to control the calls through the gateway. They are under system configuration -> Service parameter: Allow call from GSM to IP without registration:this parameter is the global switch to allow or disallow the call from GSM to IP side when using SIP trunk mode. Allow call from IP to GSM without registration:this parameter is the global switch to allow or disallow the call from IP to GSM side when using SIP trunk mode 3.1.3 typical usage scenarios To use SIP trunk, it is required to know the peer IP address and SIP listen port, and these IP address and port MUST be reachable. In this situation, SIP trunk can only work in these scenario: Both gateway and softswitch have public IP address Both gateway and softswitch are at the same local network Gateway and softswitch connect to the same local network over VPN NOTE: It is not recommanded to use SIP trunk that one peer is behind NAT and other peer has public IP address. This usage s behavior is unexpectable. Many clients want to use in this scenario, I have to warn here again: we don t have any successful experience. 3.2 SIP registration and its typical usage SIP registration creates bindings that associates an address-of-record URI with one or more contact addresses in the location service, and location service is usually one of the softswitch features. In SIP registration, DWG gateway acts as a registration client, and softswitch acts as a registrar. See below topology: http://www.dinstar.com 5 / 9
In this scenario, DWG has a private IP address and the router has a public IP address and this IP address may be changed after router restarted. In this situation, DWG must re-initialize an REGISTER request to update it s public IP address. 3.2.1 the procedure of SIP registration The SIP registration procedure looks something like this: Registration is the process in which the endpoint sends a SIP REGISTER to the SIP Server to let it know where the endpoint is.the steps like these: 1. Endpoint initialize an REGISTER request with at least one contact parameter in the request, some implementation have more than one contact. 2. SIP Server responds a 401 response to validate the endpoint s credentials and registers the contacts in its contact database. 3. Endpoint re-initialize an REGISTER request with the credentials ( a valid user ID and password ) to SIP server 4. SIP Server responds a 200 OK response to acknowledge. NOTE: for un-registration procedure, Endpoint initialize an REGISTER request with zero contact parameter or with contacts list which expires=0. After the registration, SIP server knows where is the endpoint, which is the http://www.dinstar.com 6 / 9
IP address and transport protocol ports. When SIP server wants to make a session with endpoint, SIP server sends the INVITE (or other SIP request) to the registered IP:Port pairs. 3.2.2 configuration parameters in DWG gateway Here, suppose that the SIP server s IP address is 172.16.173.107, and the UDP listening port is 5060. In the real environment, the SIP server could have domain and different listening port. Here is just an example: SIP server IP address: 172.16.1.187 UDP listening port: 5060 User ID: 100 Password: 100 The steps to configure the DWG gateway: 1. Configure the SIP server under System configuration -> SIP parameter 2. Configure the SIP account under System configuration -> Port parameter 3. Check the registration status Here all DWG ports share the same SIP account. In the latest firmware, SIP account can be configured on the port group, and associated with that port group if used in port independent mode. 3.2.3 Different register modes DWG supports two types of register mode: port shared mode and port independent mode. http://www.dinstar.com 7 / 9
Port shared mode means that all SIP accounts share the same local port, because of that, no matter how many SIP accounts had been used, when calls are coming from IP side, gateway will check the routing rule to decide which port this call will be routed to. Otherwise, in port independent mode, different SIP accounts use different local ports. So that when calls is received from IP side, gateway could detect different local port to decide which port or port group is associated with this SIP account, and route the call to that port or port group. The parameters which control the register mode are: All Ports Register Used Same User ID and Use Same Local Sip Port. They are under system configuration -> SIP parameter. When All Ports Register Used Same User ID is set as No, and Use Same Local Sip Port is set as Yes, gateway works in port independent mode. 3.2.4 usage scenario of SIP registration theoretically, SIP registration mode could be used in all scenario. But the most popular usage is that when DWG gateway is after a router and has a private IP address, but SIP server has public IP address. Because the router s IP address may change while DWG gateway register with SIP server. When the gateway detects the IP address or mapping port is changed, gateway could update them. While gateway use in this most popular scenario, we suggest to use our DBO solution. For more details about DBO, check our other documents about DBO. Chapter 4: FAQs 1. How to open debug of SIP message in DWG gateway? Sometimes we need to open the debug of SIP message when some issues meets. For example, SIP compatible issue, register failure, etc. we can open debug in the telnet interface: 2. Does DWG gateway supports SIP trunk registration? The port independent mode of SIP registration is another implemention of SIP trunk registration. It can be used with SIP trunk registration. 3. Why can t you use SIP trunk while one peer is after NAT and another peer has public http://www.dinstar.com 8 / 9
ip address? Many clients want to use SIP trunk when one peer is after NAT and another peer has public ip address, because of the NAT device router has a static public IP address. They want to use port forwarding or DMZ function on the router to forward the packets to gateway. Actually, we don t have any successful experience in this scenario. It always gets some issues, for example, one way voice, call is not forwarding to gateway, etc. http://www.dinstar.com 9 / 9