IceWarp Server VoIP Server Reference Version 10 Printed on 12 August, 2009
i Contents VoIP Service 1 Introduction... 1 V10 New Features... 3 SIP REFER... 3 SIP Call Transfer Agent Settings... 3 NAT traversal - RTCP... 3 Video Calls... 3 Multiple Resources- Contact Binding... 3 Incoming Calls To Groups... 3 Logging - SIP Calls... 3 Statistics SIP Calls... 4 The Big Picture... 7 General... 8 Gateways... 9 Call Forwarding... 13 Advanced... 15 Using the Dial Via SIP Functionality... 16 Setting up a SIP Client - X-Lite... 18 First run of X-Lite... 19 SIP Accounts Dialog... 21
ii Contents Settings for the Grandstream Hardware SIP Phone... 25 Access Mode... 27 Index 29
1 C HAP T E R 1 VoIP Service Introduction IceWarp Server VoIP Service implements SIP. The SIP (Session Initiation Protocol) is designed to allow devices, both software and hardware, to establish a communication session. The VoIP Service in IceWarp Server is actually a SIP domain which should be defined within IceWarp Server as a Domain or Domain Alias. This Domain must have a valid DNS "A" record. The four basic components of a SIP session are: SIP User Agents These are the end-user devices. These can be Software devices, running on PCs, PDAs, Cell phones etc. or they can be SIP-enabled network devices such as SIP-phones, or even, via SIP Gateways, ordinary telephony devices. A SIP call is initiated by a User Agent Client and responded to by User Agent Server. SIP Registrar Servers These are databases containing the location of all User Agents within a Domain. There servers retrieve and send IP addresses and other information at the request of a SIP Proxy Server SIP Proxy Server A SIP Proxy Server accepts session requests from a User Agent and queries a SIP registrar for the recipient's address. It then forwards the session invitation directly to the User Agent if it is in the same Domain or to another Proxy Server if the User Agent is in another Domain. SIP Redirect Servers These allow Proxy Servers to locate other, external Proxy servers (rather like a DNS for SIP). NOTE that in IceWarp Server the Registrar, Proxy and Redirect Servers are integral to the software, no further software is required The following diagrams and examples should help explain the structure and process of placing a SIP call.
2 VoIP Server Reference IceWarp Server In This Chapter V10 New Features... 3 General... 8 Gateways... 9 Call Forwarding... 13 Advanced... 15 Using the Dial Via SIP Functionality... 16 Setting up a SIP Client - X-Lite... 18 Settings for the Grandstream Hardware SIP Phone... 25 Access Mode... 27
3 C H A P T E R 2 V10 New Features SIP REFER 100% RFC compliant, allows SIP Server to be configured with external SIP account by the means of siprefer.dat. Calls can be transferred over to remote gateway and back. See the following. SIP Call Transfer Agent Settings Call transfer to any SIP Server (e.g. Asterisk), across SIP servers and gateways, no gateway, account configuration required, IceWarp would be used only as call initiator but your real SIP account would be used to make the final call, mailbox/~sip/siprefer.dat file, <regex> <sip_destination> on each line containing custom siprefer addresses, RegEx replace based. NAT traversal - RTCP RTCP stream support added, off by default. RTP is using an even port number, +1 is used for RTCP. RTCP is used for stream quality control and negotiation between clients. Unsupported by common clients, but may be required for video playback. Video Calls Support for video stream has been tested and works with common desktop clients. The RTP NAT traversal automatically assigns 2 more streams for the video RTP. Multiple Resources- Contact Binding Contact list retrieval based on CallID (multiple binding). Allows the same user to connect with several clients at once and make calls on each, receive calls on any (rings to all). Very similar to instant messaging resources and concurrent logins. Suppose you have a wired phone and you connect with your softphone. At this moment the softphone will take over all calls. Once logged out the wired phone will work as usual. Incoming Calls To Groups Incoming calls can be processed by a group or the whole domain if desirable. Logging - SIP Calls Logging of SIP Calls is available in Logs. Administrator can get overview of the traffic over SIP gateway in terms of calls made.
4 VoIP Server Reference IceWarp Server Statistics SIP Calls Statistics - Sessions - SIP Calls added, session termination supported. TCP and TLS Calls and Instant Messaging SIP and SIMPLE secure connections over SIP TCP and TLS (SIPS) are supported, tested with CounterPath Bria. New Rules Functions New functions: RESPONSE (allows to send your own response to a SIP request), METHOD (create a RegEx restriction to SIP method), STOP (stop processing the SIP packet) and SMS (send text message with parameters e.g. "1" or "maxmsgs=1"), integrates smoothly with the SMS service to send SMS over SIP SIMPLE. Use Rules Although URI Is Local and Existing Account Gateway rules override local URI's (higher priority for local accounts, if call is made to "001" and "001" is local and a a routing rule matches "001", the call will be made to the local account anyway. 00 For + Replacement "00" for "+" sign replacement in smsgateways.dat, can be turned off using XML option IGNOREPLUSREWRITE. Many VoIP carriers don't support "+" prefix. Record-Route Response Record-Route rewriting support added. Rewrite and number match in gateway dial rules - all RegEx and RegEx rewrite driven, previous compatibility not preserved, requires all rules to be rewritten, e.g. Condition: ^(0)(.*) Rewrite: $2 (checks if number starts with 0 and rewrites to the remainder), Condition: ^([0-9])(.*) Rewrite: $1$2 (checks if numbers starts with any digit and keeps the number - rewrite could be blank to keep the original number). Authentication- DIGEST-MD5 SIP server supports DIGEST MD5 authentication if required. e164.org Support e164.org is a free Internet service allowing to register phone numbers easily, so that clients can retrieve information about a telephone number from DNS, find the real SIP address, email, PSTN phone number etc. In addition to the existing e164.arpa lookup, IceWarp SIP has been updated and tested for 100% compliance with e164.org. SIP RTP Dump Internal option for use with RTP Dump troubleshooting utility. Allows to save streams to RTP Dump, a special format supported by WireShark and other tools.
V10 New Features 5 RTPDump and RTPDump to MP3 Utility for VoIP SIP troubleshooting. Requires lame_enc.dll, captures PCMU streams, allows to play the stream, convert to MP3, create call recording by overlaying 2 streams. Miscellaneous Optimizations Improved TCP Keep-Alive, Location service (keeps users logged in), Contact: * removal support added. Updated processing of requests and responses from the Contact: header perspective, local packets bypassed. Init and Timer updated. SIP gateway startup delayed after service really started. Port 0 handling. Send failure logged. Stream timeout not applied to RTCP. If External host IP is blank it is automatically detected and set. User verification based on SIPLocation service verifies both email and IP:port in non-anonymous access. TCP additional bindings - Response finds the proper binding and uses it to send the packet. 1. User A places a call to User B (User B is in a Domain external to User A's Domain). This request is picked up by SIP Proxy A. (arrow 1). 2. SIP Proxy A determines that User B is outside its Domain so asks a SIP Redirect Server where "User B of Domain B" can be found (arrow 2). 3. SIP Redirect Server responds with the address for SIP Server B (arrow 2). 4. SIP Proxy A sends the call request to SIP Server B (arrow 3). 5. SIP Server B requests the location of User B from SIP Registrar B (arrow 4). 6. SIP Registrar B responds with User B's location (arrow 4). 7. SIP Proxy B contacts User B's device (arrow 5). 8. User B accepts the call. 9. User B's device tells SIP Proxy B (arrow 5). 10. SIP Proxy B tells SIP Proxy A (arrow 3).
6 VoIP Server Reference IceWarp Server 11. SIP Proxy A tells User A's device (arrow 1). 12. Channel is established (arrow 6). If you have multiple Users behind a firewall or router then you will probably need to enable NAT Traversal on the SIP Server (see SIP - Advanced (see "Advanced" on page 15) tab). The following diagram shows a call using NAT traversal and Proxy ports. The basic functionality is the same except that all communication outside of the Domain is done via a proxy port. One proxy port is opened for each User communicating outside the Domain.
V10 New Features 7 A SIP gateway is a service provided that allows you to connect to non-sip devices, such as the public telephone network. These services usually have to be paid for. The initiation of the call is the same up to the point where the SIP Gateway is reached. The Big Picture The SIP server allows you to offer a complete voice communications solution to your Users.
8 VoIP Server Reference IceWarp Server General Field Active Disable anonymous access SIP access mode: Description Check this box to enable the SIP server Check this box if you do not wish to allow anonymous users access to the SIP service. If you select this option you can use the B button to edit a bypass file, allowing IP ranges, Users and Domains anonymous access. Use the Access Mode button to specify which Accounts, Domains etc. will have access to the SIP Service. This opens the standard Access Mode dialog. See Access Mode for further information. Field Local Network Local interface host External interface host Description Here you need to specify all the local IP addresses that this SIP server should be available for. Specify the local IP address of the SIP Server here. Specify the local IP address of any External interface (probably your router or firewall) NOTE - Incorrect Routing information is the biggest cause of problems with SIP communications. Make sure you set this up correctly. Field Max number of simultaneous calls Description Once the maximum number of simultaneous calls is reached any further attempted calls will be rejected by the Service. This can be useful if you want to limit the bandwidth that is used by the SIP Server. A typical voice call is around 8kB/s.
Gateways 9 Log user calls to user mailbox Log all calls to file Check this box to have SIP calls logged to the mailbox of the user who made the call. NOTE - This option must be checked for the REDIAL to work. Check this box and specify a fully qualified path to the file where a log of ALL calls should be stored. Note that yyyy, mm and dd can be used in the directory name, For example: <InstallDirectory>\SIPyyyymmdd\sip.log Gateways Here you should specify any Gateways you wish to route calls to. Gateways are usually an interface to a non-sip communications system, such as Public Telephony, and you would normally have to pay subscription or usage charges to the Gateway provider. Selecting the Gateways tab presents you with a list of defined Gateways. Use the Delete button to delete a selected Gateway. Use the Save and Load buttons to respectively save and load a list of Gateways. A standard file browser dialog will be presented.
10 VoIP Server Reference IceWarp Server Pressing the Add or Edit button will open the SIP Gateway dialog: Field Active Title Server Proxy Username Password Expire Max. number of simultaneous calls Rewrite From header Rewrite To header Description Check this box to make this Gateway active. A descriptive name for the Gateway. Specify the IP address or hostname of the Gateway. Specify the IP address or hostname of any proxy server IceWarp Server should use to get to this Gateway. Specify the username supplied by your Gateway provider. Specify the password for the above username. Specify here how often, in seconds, the SIP Gateway should re-register with the Gateway. Basically, this tells the Gateway that the server is still here and available. Specify here the maximum number of simultaneous calls allowed via this Gateway. Can be useful in limiting bandwidth usage. Normally this field should be left un-checked. This is here in case your gateway provider requires it. Normally this field should be left un-checked. This is here in case your Gateway provider requires it.
Gateways 11 The Outgoing Calls tab allows you to select particular calls to use this Gateway, using the number prefix. A number prefix must be assigned to a Gateway, even if there is only one Gateway, or the Gateway will be inaccessible. If you have multiple gateways then this is effectively a way to select which gateway the call will be routed through. You may have different SIP to phone providers for different countries and want to route calls appropriately. You can select you own prefix for each gateway and publish the list within your organization. Field Number prefix Description Specify the number prefix that will cause a call to be routed through this Gateway. The above example shows that any recipient address that starts with 555 will be processed via this Gateway. Multiple prefixes can be entered, separated by semicolons. NOTE - do not enter any spaces in this field as this will cause a failure. Replace number This field allows you to modify the prefix if necessary. You can enter numbers here and there are three special stings that are substituted by part of the original dialed number: %& - is substituted with the original number, minus the prefix. %^ - is substituted with just the prefix %* - is substituted with the whole number
12 VoIP Server Reference IceWarp Server These stings can be selected via the button to the right of the text field. Example (see previous screenshot) This gateway is a SIP to Phone gateway offering cheap calls to the UK, but the gateway requires that the full UK number is specified for the call (without the country code but with the leading zero). Specify Number prefix as 0044;44;+44 Specify Replace number as 0%& and if a user dials +4479795551234, the call would be routed to 079795551234 via this gateway. Restrict calls to users below Check this box to restrict the Users who can use this Gateway to place an outgoing call. This option is recommended as otherwise you could be leaving your Gateway open to abuse by anyone that knows of its existence. Use the Add button to open the Select Item dialog, allowing you to add Accounts and/or Domains to the list. The Incoming Calls tab allows you to specify where an incoming call to you number on this Gateway is routed. Use the Add button to specify which User or Users the call should be routed to. If no Users are specified IceWarp Server will do nothing with the call request, not even reject it. If one User is specified then IceWarp Server will attempt to route the call to that User. If multiple Users are specified IceWarp Server will attempt to contact all of those Users simultaneously, and will wait until either: A User accepts the call, in which case it is routed to that User
Call Forwarding 13 All Users reject the call or the request times out, in which case IceWarp Server will reject the incoming call Use the Delete button to delete a selected Gateway Call Forwarding The Call Forwarding tab allows you to specify rules on how to handle SIP requests, Accept, Reject or Drop based on where the request is coming from, going to, etc. You are presented with a list of defined rules: Away number The Away number is a number which any user can dial to have his phone "switched off" or forwarded to another number, by the server. The user initiates this on demand from his own SIP device, and IceWarp Server instantly writes a Call Forwarding rule for the number. Specify here the number a User should dial. Reset number Specify here the number a User should dial to "switch on" his phone and cancel any Call Forwarding. In the above example: if a User dials *151* then the server will reject any calls to that User. if a User dials *151*3105551234 then the server will forward calls for that user to 3105551234 if a User dials *151*john@icewarpdemo.com then the server will forward any calls to john@icewarpdemo.com NOTE that the above Call Forwarding is dynamic, initiated and cancelled by individual Users via their SIP device. The Call Forwarding described later in this section is controlled by the system administrator, and is not dynamic. Redial number
14 VoIP Server Reference IceWarp Server Specify here a number that a User can dial to redial the last number for his address. NOTE - that the number dialed will be the number associated with the last event associated with this User, whether it is an outgoing or incoming call. Use the Delete button to delete a selected rule. Pressing the Add or Edit button opens up the Call Forwarding dialog: Field Number Forward To Description Description Specify here the original intended recipient of the call. Multiple recipients can be specified, separated by semicolons. Masks can be used, using %, instead of *, to specify any string. (This is because * is valid in telephony terms) Examples: +11% - means any string starting with +11. %@icewarpdemo.com - means any string ending with @icewarpdemo.com. %domain% - means any string containing domain. Specify here a number or address for the new recipient. Multiple addresses/numbers can be specified, separated by semicolons. Short descriptive text for identification purposes.
Advanced 15 Advanced The Advanced tab allows you to specify how the SIP server will perform NAT translation, and whether the server will use a parent SIP proxy. Field Use Telephone/E164 Number Mapping (ENUM) Description Check this box to enable your users to place calls to standard telephone numbers. The ENUM system allows a standard telephone number to be dialed from a SIP client. The SIP server will check for a NAPTR DNS record based on the number dialed (the 164.arpa server is tried out, if record not found, then the e164.org one.) NOTE that the option mentioned above has higher priority than SIP gateways (if used.) Use extended DNS lookup (NAPTR and SRV) Select this option to have IceWarp Server check for SRV and NAPTR DNS records to determine the hostname for a SIP Server. IceWarp Server first checks for a NAPTR DNS record and, if none is found, it will check for an SRV DNS record. Field Enable SDP NAT traversal proxy RTP NAT Traversal server mode Description Check this box to enable the SDP (Session Description Protocol) NAT (Network Address Translation) Proxy. NAT is used to correctly route incoming data to the correct local network recipient. RTP (Real-time Transport Protocol) is the protocol used by the SIP server for streaming data. The SIP server can create Proxy Ports for each SIP call. This is useful if you have no control over the ports being used by your User's SIP clients. Choose from the following options: Disabled
16 VoIP Server Reference IceWarp Server Select this option and no Port Proxies will be created Sessions from external hosts Select this option and Port Proxies will be created for communications with external hosts. All sessions Select this option and Port Proxies will be created for all SIP server communications. This is especially useful if you have many Windows XP Users. Local RTP port range from Local RTP port range to You need to specify the Ports to be used as Proxies by the SIP server. You should specify the start of the port range to be used Specify the last port of the range to be used. NOTE that the port range specified here must be open in your router/firewall setup. Field Use parent SIP proxy Parent proxy Contact: registration expiration (Sec) Description You can have multiple SIP servers with only one server having access to the outside world. In this case you would specify this external server as the "parent" server. Check this option if you wish to use a parent server, and specify the hostname of the parent in the text box Specify the IP address or hostname of the parent SIP server. Specify a value here to tell clients that they should re-register with the server at the interval specified. This can be very useful to keep the Client/Server connection alive. Using the Dial Via SIP Functionality Both the Outlook Connector and IceWarp Web Client have the ability to dial out via SIP clients. In the Outlook Connector Locate and select the contact you wish to call (if the person you wish to call is not in your contacts skip this step) Select "Dial via Merak Server" from the Outlook Connector dropdown menu. Check the correct contact is displayed and click Dial Your SIP client will start to ring, answer it. After a couple of seconds the other person's SIP client will be contacted and your conversation can start.
Using the Dial Via SIP Functionality 17 In IceWarp Web Client Click "Dial" on the menu bar. Select the Contact you wish to call (or type in the email address) and click Dial. Your SIP client will start to ring, answer it. After a couple of seconds the other person's SIP client will be contacted and your conversation can start. Note that the call is in no way routed by Outlook Connector or IceWarp Web Client, they are just used to initiate the call. The SIP server dials your registered client and once connected route the call to the destination you specified. This method will work with any SIP client.
18 C H A P T E R 3 Setting up a SIP Client - X-Lite There are numerous SIP clients available, both software and hardware. This section describes how to set up X-Lite to access your SIP server. X-Lite is available from http://www.counterpath.com/ In This Chapter First run of X-Lite... 19 SIP Accounts Dialog... 21
Setting up a SIP Client - X-Lite 19 First run of X-Lite When you first run X-Lite it will discover that you have no SIP account defined and will show the message "No SIP accounts are enabled"" And the "SIP accounts" dialog will we be displayed automatically.
20 VoIP Server Reference IceWarp Server If you wish to add your IceWarp Server account to X-Lite you should open the "SIP accounts" manually:
Setting up a SIP Client - X-Lite 21 SIP Accounts Dialog The SIP Accounts dialog shows you a list of all the SIP accounts you have defined.
22 VoIP Server Reference IceWarp Server Press the Add button to define your IceWarp Server account. The properties dialog will be displayed: Field Display name User name Description Enter the display name you would like people to see when you are in a call with them. The User name supplied by your SIP service provider. NOTE that it is necessary to log in using this user name only (not the user's e-mail address). In case of IceWarp Server use the alias of the appropriate account. NOTE that this applies even if the "Users login with their email addresses" option (Domains & Accounts / Policies / Login Policy / Login Settings) of the IceWarp Server is selected. Password Authorization user name Domain Domain Proxy The password supplied by your SIP service provider. Same as your User name. Enter the domain name of your SIP service supplied by your SIP service provider. Leave as is.
Setting up a SIP Client - X-Lite 23 Dialing plan Leave as is. Press OK to return to the SIP Accounts dialog: Press Close to return to X-Lite.
24 VoIP Server Reference IceWarp Server X-lite will now attempt to connect to your SIP service provider and will show the following if successful:
Settings for the Grandstream Hardware SIP Phone 25 Settings for the Grandstream Hardware SIP Phone The following screenshot shows the settings for the Grandstream hardware SIP phone:
26 VoIP Server Reference IceWarp Server The settings you need to change for IceWarp Server are: Proxy - The SIP server domain name Display name - the name you wish others to see when you are in a call Password - the password for your SIP server Auth ID - Your SIP server username
Access Mode 27 Access Mode The access mode lets you specify which accounts are allowed to access the service. Mode All accounts Accounts from list Use domain options Use account options Advanced mode (Logical NOT XOR) Description The service is accessible by all accounts in all domains on this server. Only accounts/domains listed in the text box can access the server Enter the accounts that are allowed to access the service in the List text box, separated by semicolons. Use the '...' button to open the Select Item dialog to select accounts. Only accounts in domains that have the service selected in Domain Options can access the service. Only accounts that have the service selected in User Options can access the service. Access will be granted to all accounts which have access: Disabled via both Domain Options and User Options. or Enabled via both Domain Options and User Options. Example: Backup domains do not usually have users but they can have. By default, all backup domain users (both local and locally non-existing ones) have services (e.g. anti-spam) enabled. You can want to use this service just for local users. It is possible to use the "Accounts from the list" mode but it is not too handy. Better solution is to use the "Advanced mode", deselect the service on the domain level and on the user level deselect the service for all local users. (It means that they will have the service enabled. Alternatively, you can create a user template with this service deselected and use it as a default one.) List Accounts... Clicking this button reveals: In the 'Use domain options' mode the current list of domains. In the 'Use account options' and 'Advanced mode' modes the current list of users. In the 'All accounts' and 'Accounts from list' modes the button is disabled.
28 VoIP Server Reference IceWarp Server
29 Index No index entries found.