You are on page 1of 26

Avaya Solution & Interoperability Test Lab

Configuring SIP Trunks between the Avaya SIP Enablement Services and the SIP Express Router (SER) Issue 1.0

Abstract
These Application Notes describe the administrative steps required to support Session Initiation Protocol (SIP) telephony using Avaya SIP Enablement Services (SES) and Avaya Communication Manager with the SIP Express Router (SER). These Application Notes verified a solution using SIP trunks for the communication between two locations with each office consisting of an Avaya SES server and Avaya Communication Manager with an Avaya Media Gateway. These Application Notes also verified the communication between the SIP endpoints such as CounterPath eyebeam Softphones registered with the SER and the Avaya endpoints in each location.

JZ; Reviewed: SPOC 11/6/2007

Solution & Interoperability Test Lab Application Notes 2007 Avaya Inc. All Rights Reserved.

1 of 26 SER-SES-SIP

1 Introduction
With the introduction of the Session Initiation Protocol (SIP) standard that supports telephony as well as a wide range of other communication modes, there is a broad range of SIP proxy servers available to customers. Customers can use SIP to interconnect their communication systems among multiple locations. The SIP Express Router (SER) is a free SIP server licensed under the open-source GNU license. It can act as SIP registrar, proxy or redirect server. These Application Notes describe the administrative steps required to support Session Initiation Protocol (SIP) telephony using Avaya SIP Enablement Services (SES) and Avaya Communication Manager with the SIP Express Router (SER). These Application Notes verified a solution using SIP trunks for the communication between two locations with each office consisting of an Avaya SES server and Avaya Communication Manager with an Avaya Media Gateway. These Application Notes also verified the communication between the SIP endpoints such as CounterPath eyebeam Softphones registered with the SER and the Avaya endpoints in each location. Figure 1 shows the configuration for these Application Notes. Location A includes the Avaya S8500 Server with an Avaya G600 Media Gateway, the Avaya SIP Enablement Services Server and the Avaya Modular Message Server to support voice messaging. Location B includes the Avaya S8300 Server with an Avaya G700 Media Gateway, the Avaya SIP Enablement Services Server and the Avaya IA770 INTUITYTM AUDIXMessaging Application which resides on the Avaya S8300 Server and is used to support voice messaging. Locations A and B consist of the Avaya H.323, SIP and Digital telephones. The SER and the Counterpath eyeBeam Softphones registered with the SER is physically connected to Location B. In a real scenario, the SER could be in a different location. SIP trunks are configured between the SER and the Avaya SES Server in each location. Location A communicates with location B via the SER. Each location communicates with the SIP endpoints registered with the SER via the SIP trunks. When the SER is configured for the communication between two locations, the SER is configured to be transparent for the call features supported on the Avaya VoIP infrastructure. The following features were verified between the two locations: Basic two-party calling with different audio codecs Proper termination of incomplete call attempts Caller ID/name display Call hold/multiple call handling Call transfer Conference Voice mail and DTMF The testing did not focus on the interoperability between the SER and SIP endpoints registered with the SER. The following basic features on the Avaya VoIP infrastructure were verified with the endpoints registered with the SER:

JZ; Reviewed: SPOC 11/6/2007

Solution & Interoperability Test Lab Application Notes 2007 Avaya Inc. All Rights Reserved.

2 of 26 SER-SES-SIP

Basic two-party calling with different audio codecs Call hold Call transfer Conference Voice mail and DTMF

Figure 1: SIP Trunk Configuration between the Avaya SES Servers and the SER

JZ; Reviewed: SPOC 11/6/2007

Solution & Interoperability Test Lab Application Notes 2007 Avaya Inc. All Rights Reserved.

3 of 26 SER-SES-SIP

2 Equipment and Software Validated


Table 1 below shows the versions verified in these Application Notes. Equipment Avaya S8300 Server and Avaya S8500 Server running Avaya Communication Manager Avaya G600 Media Gateway IPSI (TN2312AP HW32) C-LAN (TN799DP HW01) MEDPRO (TN2602AP HW02) Avaya G700 Media Gateway Avaya S8500 Server running Avaya SIP Enablement Services Avaya 9620 SIP Telephone Avaya 9630 SIP Telephone Avaya 4610SW SIP Telephone Avaya 4621SW SIP Telephone Avaya one-X Desktop Edition Avaya 9620 H.323 Telephone Avaya 9630 H.323 Telephone Avaya 4610SW H.323 Telephone Avaya 4621SW H.323 Telephone Avaya IP Softphone (H.323) CounterPath eyeBeam Softphone SIP Express Router Red Hat Enterprise Edition Mysql Server Software 4.0.1 (load 731.2)

FW030 FW024 FW030 26.33.0 SES 4.0 (load SES-4.0.0.0033.6) Avaya one-X Deskphone SIP Version 1.0.13.1 (5) Avaya one-X Deskphone SIP Version 1.0.13.1 (5) 2.2.2 2.2.2 Release 2.1, Build 70 1.50 1.50 2.80 2.80 R6.0 SP1 1.5.13 build 37982 0.96 4.0 update 3 4.1.22

Table 1: Equipment and Software Validated

JZ; Reviewed: SPOC 11/6/2007

Solution & Interoperability Test Lab Application Notes 2007 Avaya Inc. All Rights Reserved.

4 of 26 SER-SES-SIP

3 Configurations
Each location consists of an Avaya SES server and Avaya Communication Manager with an Avaya Media Gateway. Refer to [1] and [2] for the detailed configuration on the Avaya SES Server, Avaya Communication Manager and Avaya Media Gateway. Refer to http://www.iptel.org for detailed information on how to configure the SER. The following table shows the IP addresses of the SIP proxy servers: Location A 10.1.1.50 Location B 10.3.3.60 SER 10.3.3.125

SIP Proxy Server

The following table shows the dial plan prefix for the local extensions in each location. Location A 2xxxx Location B 5xxxx SER 6xxxx

Local ext.

3.1 Configure Avaya VoIP infrastructure


Since the configuration is similar for both locations A and B, only the configuration for location B is demonstrated.

3.1.1 Configure Avaya SIP Enablement Services


Avaya SIP Enablement Services is configured using a web browser. Set the URL of the browser to http://IP-address/admin, where IP-address is the IP address of the Avaya SIP Enablement Services Master Administrator server (usually the edge server), and log in with proper credentials. When prompted, enter the password (not shown here). The main administration screen will be displayed after logging in. Click on Launch Administration Web Interface, the Avaya SIP Enablement Services administration web interface will be displayed:

JZ; Reviewed: SPOC 11/6/2007

Solution & Interoperability Test Lab Application Notes 2007 Avaya Inc. All Rights Reserved.

5 of 26 SER-SES-SIP

All SIP proxies to which calls can be routed should be administered as trusted hosts in the Avaya SIP Enablement Services server. This will permit far-end call clearing and other supplementary call service requests by remote parties to be handled without authentication challenges. Expand the Trusted Hosts link on the left side of the page, and click on Add. Fill in the fields as shown. The IP Address is the IP address of the SER and select the Host IP address to the Avaya SIP Enablement Services Edge (10.3.3.60).

JZ; Reviewed: SPOC 11/6/2007

Solution & Interoperability Test Lab Application Notes 2007 Avaya Inc. All Rights Reserved.

6 of 26 SER-SES-SIP

Call routing is configured on Avaya SIP Enablement Services by means of an address map, which specifies one or more dial strings to be matched and the SIP destination to which the call is to be routed if a match is found. Click on the Hosts link on the left side of the main administration page. The existing home and edge servers will be displayed. The address map will be defined once for the edge server, and will be active in all home servers for call routing. In the row corresponding to the edge server, click on Map under Commands.

The List Host Address Map page is displayed (not shown). Click on Add Map in New Group. The Add Host Address Map page will be displayed. Specify a Name for the address map, and the Pattern match specification. In the sample configuration, number 2xxxx (to location A) and number 6xxxx (to the SER) should be routed to the SER. The pattern match specification is applied to the Uniform Resource Identifier (URI) field of incoming INVITE messages.

JZ; Reviewed: SPOC 11/6/2007

Solution & Interoperability Test Lab Application Notes 2007 Avaya Inc. All Rights Reserved.

7 of 26 SER-SES-SIP

Avaya SIP Enablement Services will always route call requests (INVITEs) from registered SIP telephones to Avaya Communication Manager for dial plan analysis and origination/termination services. Avaya Communication Manager then routes the INVITE back to Avaya SIP Enablement Services for further routing to the next hop. Next hop routing can be administered in two ways. If the domain supplied in the request URI of the INVITE message sent by Avaya Communication Manager is the home domain (companyx.com in this case), routing must be based on the dialed number and is configured via address maps. If the supplied domain is a foreign SIP domain, next hop routing will be based on a DNS lookup of the foreign domain name. Avaya Communication Manager can be administered to determine the domain based on dial plan and routing rules. In these Application Notes, address maps on the Avaya SES were used. The specification below means match on the characters sip:2 or sip:6 if they occur at the beginning of the URI, followed by any number of characters in the range 0 through 9. Check Replace URI (default). When routing the incoming INVITE, Avaya SIP Enablement Services will replace the URI with the URI specified in the contact. Click on Add; then click on Continue on the confirmation page.

JZ; Reviewed: SPOC 11/6/2007

Solution & Interoperability Test Lab Application Notes 2007 Avaya Inc. All Rights Reserved.

8 of 26 SER-SES-SIP

The current host address map list is displayed (not shown here). To specify the routing for the address map just defined, click on Add Another Contact under the address map named SER.

Fill in the Contact field as shown. In this case, the IP address and port number are specified, as well as the transport protocol used to send SIP signaling messages. TCP protocol should be used as the transport protocol. Avaya SIP Enablement Services will substitute $(user) with the user field (i.e., the dialed number) in the outgoing INVITE message. Click on Add; then click on Continue on the confirmation page.

JZ; Reviewed: SPOC 11/6/2007

Solution & Interoperability Test Lab Application Notes 2007 Avaya Inc. All Rights Reserved.

9 of 26 SER-SES-SIP

The List Host Address Map page is then displayed with the updated contact information. This completes configuration of the host address map for routing calls to the SER.

To apply the administration in the above steps, click Update on the left side of the page on the web browser interface. This link appears on the current page whenever updates are outstanding, and can be used at any time to save the administration performed to that point.

JZ; Reviewed: SPOC 11/6/2007

Solution & Interoperability Test Lab Application Notes 2007 Avaya Inc. All Rights Reserved.

10 of 26 SER-SES-SIP

3.1.2 Configure Avaya Communication Manager


Please refer to [1] and [2] for detailed SIP trunks configuration between Avaya SIP Enablement Services and Avaya Communication Manager. In the sample configuration, there are two Avaya SIP Enablement Services home servers, Home1 and Home2. The following screens show the configuration for Home1. The similar configuration should be done with Home2 and is not shown here. The following shows one signaling group configuration with Home1. The Far-end Domain is the same as that administered in Avaya SIP Enablement Services (companyx.com).
display signaling-group 10 SIGNALING GROUP Group Number: 10 Group Type: sip Transport Method: tls

Near-end Node Name: procr Near-end Listen Port: 5061 Far-end Domain: companyx.com

Far-end Node Name: Home1 Far-end Listen Port: 5061 Far-end Network Region: 1

Bypass If IP Threshold Exceeded? n DTMF over IP: rtp-payload Enable Layer 3 Test? n Session Establishment Timer(min): 120 Direct IP-IP Audio Connections? y IP Audio Hairpinning? y

The following screen shows the corresponding trunk group controlled by signaling group 10:
display trunk-group 10 TRUNK GROUP Group Number: Group Name: Direction: Dial Access? Queue Length: Service Type: 10 Home 1 two-way n 0 tie Group Type: sip CDR Reports: y COR: 1 TN: 1 TAC: 110 Outgoing Display? y Night Service: Auth Code? n Signaling Group: 10 Number of Members: 100 Page 1 of 21

The following screen shows the IP network region 1 configuration. IP network region 1 is associated with signaling group 10, the Authoritative Domain should be the same as that administered in Avaya SIP Enablement Services Home1 Server.

JZ; Reviewed: SPOC 11/6/2007

Solution & Interoperability Test Lab Application Notes 2007 Avaya Inc. All Rights Reserved.

11 of 26 SER-SES-SIP

display ip-network-region 1 IP NETWORK REGION

Page

1 of

19

Region: 1 Location: 1 Authoritative Domain: companyx.com Name: Company X MEDIA PARAMETERS Intra-region IP-IP Direct Audio: yes Codec Set: 7 Inter-region IP-IP Direct Audio: yes UDP Port Min: 5000 IP Audio Hairpinning? y UDP Port Max: 6001 DIFFSERV/TOS PARAMETERS RTCP Reporting Enabled? y Call Control PHB Value: 46 RTCP MONITOR SERVER PARAMETERS Audio PHB Value: 46 Use Default Server Parameters? y Video PHB Value: 26 802.1P/Q PARAMETERS Call Control 802.1p Priority: 6 Audio 802.1p Priority: 6 Video 802.1p Priority: 5 AUDIO RESOURCE RESERVATION PARAMETERS H.323 IP ENDPOINTS RSVP Enabled? n H.323 Link Bounce Recovery? y Idle Traffic Interval (sec): 20 Keep-Alive Interval (sec): 5 Keep-Alive Count: 5

SIP signaling group 10 and trunk group 10 will be used within the domain companyx.com. To accept calls from foreign domain such as avaya.com in Location A and 10.3.3.125 from the SER, another signaling group and trunk group should be configured. In the sample configuration, the Far-end Domain is configured to be empty for signaling group 13. Signaling group 13 will be used as a default if no other signaling groups can match incoming calls.
display signaling-group 13 SIGNALING GROUP Group Number: 13 Group Type: sip Transport Method: tls

Near-end Node Name: procr Near-end Listen Port: 5061 Far-end Domain:

Far-end Node Name: Home1 Far-end Listen Port: 5061 Far-end Network Region: 1

Bypass If IP Threshold Exceeded? n DTMF over IP: rtp-payload Enable Layer 3 Test? n Session Establishment Timer(min): 3 Direct IP-IP Audio Connections? y IP Audio Hairpinning? n

JZ; Reviewed: SPOC 11/6/2007

Solution & Interoperability Test Lab Application Notes 2007 Avaya Inc. All Rights Reserved.

12 of 26 SER-SES-SIP

The following screen shows the corresponding trunk group controlled by signaling group 13:
display trunk-group 13 TRUNK GROUP Group Number: Reports: y Group Name: Direction: Dial Access? Queue Length: Service Type: 13 Group Type: sip CDR TN: 1 Night Service: TAC: 113 Page 1 of 21

Blank domain 1 COR: 1 two-way Outgoing Display? y n 0 tie Auth Code? n

Signaling Group: 13 Number of Members: 10

Avaya SIP Enablement Services always routes calls from companyx.com SIP telephones to Avaya Communication Manager, where dial plan and routing rules will be applied to determine where the call should be routed next. Use the change dialplan analysis command to add the Dialed String 2 and 6 with Total Length 5 and Call Type ext.
change dialplan analysis DIAL PLAN ANALYSIS TABLE Percent Full: Dialed String 0 1 2 3 4 5 6 7 8 9 * Total Length 3 3 5 5 5 5 5 5 1 1 2 Call Type fac dac ext ext ext ext ext ext fac fac fac Dialed String Total Call Length Type Dialed String Total Call Length Type 1 Page 1 of 12

Use the change uniform-dialplan command to configure the route selection, based on the number dialed following the 2 and 6. In the sample configuration, Automatic Alternate Routing (AAR) is configured to route calls to the SER.

JZ; Reviewed: SPOC 11/6/2007

Solution & Interoperability Test Lab Application Notes 2007 Avaya Inc. All Rights Reserved.

13 of 26 SER-SES-SIP

change uniform-dialplan 2 UNIFORM DIAL PLAN TABLE

Page

1 of

Percent Full: 0 Matching Pattern 2 6 Insert Digits Node Net Conv Num aar n aar n

Len Del 5 0 5 0

Use the change aar analysis command to configure the Route Pattern selection, based on the number dialed following the 2 and 6.
change aar analysis 2 AAR DIGIT ANALYSIS TABLE Percent Full: Dialed String 2 6 Total Min Max 5 5 5 5 Route Pattern 10 10 Call Type aar aar Node Num ANI Reqd n n 1 Page 1 of 2

Use the change route-pattern command to define the SIP trunk group to be selected for the corresponding route patterns, as shown below.
change route-pattern 10 Page Pattern Number: 10 Pattern Name: PSTN via 3825 SCCAN? n Secure SIP? n Grp FRL NPA Pfx Hop Toll No. Inserted No Mrk Lmt List Del Digits Dgts 1: 10 0 2: 3: 4: 1 of 3

DCS/ QSIG Intw n n n

IXC

user user user

n 5: 6:

user n n user user

BCC VALUE TSC CA-TSC 0 1 2 M 4 W Request 1: 2: 3: 4: 5: 6: y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y n n n n n n n n n n n n

ITC BCIE Service/Feature PARM

rest rest rest rest rest rest

No. Numbering LAR Dgts Format Subaddress none none none none none none

JZ; Reviewed: SPOC 11/6/2007

Solution & Interoperability Test Lab Application Notes 2007 Avaya Inc. All Rights Reserved.

14 of 26 SER-SES-SIP

3.2 Configure the SER


The SER software can be downloaded from http://www.iptel.org. Install the SER by following the installation procedures. By default, the SER is installed under the /usr/local directory. Some features on the SER need database backend support. In these Application Notes, Mysql database server is used. Please refer to http://www.mysql.com on how to install and configure the Mysql server. Please note that Mysql must be compiled to support the Mysql database during the SER installation. Check /usr/local/lib/ser/modules directory to verify that the Mysql module is included in the installation.
[root@localhost modules]$ dir /usr/local/lib/ser/modules/my* /usr/local/lib/ser/modules/mysql.so

The Mysql server and client use /etc/my.cnf for configuration. Configure the socket to /var/lib/mysql/mysql.sock (as shown below) if it is different. In the sample configuration, the SER will look up the socket in /var/lib/mysql/mysql.sock to access the database.
# # # # # # # # # # # Example MySQL config file for medium systems. This is for a system with little memory (32M - 64M) where MySQL plays an important part, or systems up to 128M where MySQL is used together with other programs (such as a web server) You can copy this file to /etc/my.cnf to set global options, mysql-data-dir/my.cnf to set server-specific options (in this installation this directory is /usr/local/mysql/data) or ~/.my.cnf to set user-specific options.

# The following options will be passed to all MySQL clients [client] #password = your_password port = 3306 #socket # The MySQL server [mysqld] port = 3306 socket = /var/lib/mysql/mysql.sock # Here follows entries for some specific programs # The MySQL server [mysqld] port = 3306 socket = /var/lib/mysql/mysql.sock skip-locking key_buffer = 16M max_allowed_packet = 1M table_cache = 64

JZ; Reviewed: SPOC 11/6/2007

Solution & Interoperability Test Lab Application Notes 2007 Avaya Inc. All Rights Reserved.

15 of 26 SER-SES-SIP

sort_buffer_size = 512K net_buffer_length = 8K read_buffer_size = 256K read_rnd_buffer_size = 512K myisam_sort_buffer_size = 8M

The SER provides the script ser_mysql.sh to manage the database used by the SER. Run the command /usr/local/sbin/ser_mysql.sh create to create a database for the SER. The comand will create an database named ser and the username ser with password heslo to access the database.
[root@localhost sbin]$ /usr/local/sbin/ser_mysql.sh --help MySql password for root: usage: ser_mysql.sh create ser_mysql.sh drop (!!entirely deletes tables) ser_mysql.sh reinit (!!entirely deletes and than re-creates tables ser_mysql.sh backup (dumps current database to stdout) ser_mysql.sh restore <file> (restores tables from a file) ser_mysql.sh copy <new_db> (creates a new db from an existing one) ser_mysql.sh reinstall (updates to a new SER database) if you want to manipulate database as other MySql user than root, want to change database name from default value "ser", or want to use other values for users and password, edit the "config vars" section of the command ser_mysql.sh

Database ser can be accessed via the Mysql client interface. The Mysql client interface comes with the Mysql server installation. The following shows the tables in datebase ser.
[root@localhost bin]# ./mysql -u ser -pheslo Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 342 to server version: 4.1.22-standard-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> use ser; Database changed mysql> show tables; +-----------------------+ | Tables_in_ser | +-----------------------+ | acc | | active_sessions | | admin_privileges | | aliases | | calls_forwarding | | config | | domain | | event | | grp | | location | JZ; Reviewed: SPOC 11/6/2007 Solution & Interoperability Test Lab Application Notes 2007 Avaya Inc. All Rights Reserved. 16 of 26 SER-SES-SIP

| missed_calls | | pending | | phonebook | | preferences_types | | reserved | | server_monitoring | | server_monitoring_agg | | silo | | speed_dial | | subscriber | | trusted | | uri | | usr_preferences | | version | +-----------------------+ 24 rows in set (0.00 sec)

The SER also provides the command serctl to create an SIP user account. The following screen shows how to create a user acount. Note that 123456 is a password for a user 60001. The user accounts will be stored in the table named subscriber. When a user is registered, their contact information will be stored in the table named contact.
[root@localhost sbin]$ ./serctl add 60001 123456 user1 MySql password: new user added new user into uri table added

The table named domain stores the domains the SER is responsible for. The SER can be configured to query the table based on the domain portion of the Request URI. If it does not match, the SER could stop processing the call. In the sample configuration, the IP address of the SER (10.3.3.125) is added in table domain.
mysql> select * from domain; +------------+---------------------+ | domain | last_modified | +------------+---------------------+ | 10.3.3.125 | 0000-00-00 00:00:00 | +------------+---------------------+ 1 row in set (0.00 sec)

SER is built around a processing core that receives SIP messages and enables the basic functionality of handling SIP messages. Most of SERs functionality is offered through its modules. SER modules expose functionality that can be utilized in the SER configuration file named ser.cfg. The ser.cfg configuration file controls which modules shall be loaded and defines how the modules shall behave by setting module variables. Please refer to [3] for detailed analysis for the ser.cfg.

JZ; Reviewed: SPOC 11/6/2007

Solution & Interoperability Test Lab Application Notes 2007 Avaya Inc. All Rights Reserved.

17 of 26 SER-SES-SIP

The following show the annotated ser.cfg file used in these Application Notes.
# $Id: gw-pstn.cfg 51 2006-01-31 13:28:04Z /CN=Paul Hazlett/emailAddress=paul@onsip.org $ # Configure the SER to listen to port 5060. # fork=yes enables TCP stack. debug=3 fork=yes log_stderror=yes listen=10.3.3.125 port=5060 children=4 # DNS server is not used for the SER dns=no rev_dns=no fifo="/tmp/ser_fifo" # Access the local Mysql database with the username and password fifo_db_url="mysql://ser:heslo@localhost/ser" # Load the necessary modules. loadmodule loadmodule loadmodule loadmodule loadmodule loadmodule loadmodule loadmodule loadmodule loadmodule loadmodule loadmodule loadmodule loadmodule loadmodule loadmodule loadmodule "/usr/local/lib/ser/modules/mysql.so" "/usr/local/lib/ser/modules/sl.so" "/usr/local/lib/ser/modules/tm.so" "/usr/local/lib/ser/modules/rr.so" "/usr/local/lib/ser/modules/maxfwd.so" "/usr/local/lib/ser/modules/usrloc.so" "/usr/local/lib/ser/modules/registrar.so" "/usr/local/lib/ser/modules/auth.so" "/usr/local/lib/ser/modules/auth_db.so" "/usr/local/lib/ser/modules/uri.so" "/usr/local/lib/ser/modules/uri_db.so" "/usr/local/lib/ser/modules/domain.so" "/usr/local/lib/ser/modules/mediaproxy.so" "/usr/local/lib/ser/modules/nathelper.so" "/usr/local/lib/ser/modules/textops.so" "/usr/local/lib/ser/modules/avpops.so" "/usr/local/lib/ser/modules/permissions.so"

modparam("auth_db|permissions|uri_db|usrloc", "db_url", "mysql://ser:heslo@localhost/ser") modparam("auth_db", "calculate_ha1", 1) modparam("auth_db", "password_column", "password") modparam("nathelper", "rtpproxy_disable", 1) modparam("nathelper", "natping_interval", 0) modparam("mediaproxy","natping_interval", 30) modparam("mediaproxy","mediaproxy_socket", "/var/run/mediaproxy.sock") JZ; Reviewed: SPOC 11/6/2007 Solution & Interoperability Test Lab Application Notes 2007 Avaya Inc. All Rights Reserved. 18 of 26 SER-SES-SIP

modparam("mediaproxy","sip_asymmetrics","/usr/local/etc/ser/sip-clients") modparam("mediaproxy","rtp_asymmetrics","/usr/local/etc/ser/rtp-clients") modparam("usrloc", "db_mode", 2) modparam("registrar", "nat_flag", 6) modparam("rr", "enable_full_lr", 1) modparam("tm", "fr_inv_timer", 27) modparam("tm", "fr_inv_timer_avp", "inv_timeout") modparam("permissions", "db_mode", 1) modparam("permissions", "trusted_table", "trusted") # This is the beginning of the SIP processing logic. route { # ----------------------------------------------------------------# Sanity Check Section # ----------------------------------------------------------------if (!mf_process_maxfwd_header("10")) { sl_send_reply("483", "Too Many Hops"); break; }; if (msg:len > max_len) { sl_send_reply("513", "Message Overflow"); break; }; # ----------------------------------------------------------------# Record Route Section # Insert the IP address (10.3.3.125) of the SER # ----------------------------------------------------------------if (method=="INVITE" && client_nat_test("3")) { record_route_preset("10.3.3.125:5060;nat=yes"); } else if (method!="REGISTER") { record_route(); }; # ----------------------------------------------------------------# Call Tear Down Section # ----------------------------------------------------------------if (method=="BYE" || method=="CANCEL") { end_media_session(); }; # ----------------------------------------------------------------# Loose Route Section # ----------------------------------------------------------------if (loose_route()) { if ((method=="INVITE" || method=="REFER") && !has_totag()) { sl_send_reply("403", "Forbidden"); break; }; if (method=="INVITE") {

JZ; Reviewed: SPOC 11/6/2007

Solution & Interoperability Test Lab Application Notes 2007 Avaya Inc. All Rights Reserved.

19 of 26 SER-SES-SIP

if (client_nat_test("3")||search("^Route:.*;nat=yes")){ setflag(6); use_media_proxy(); }; }; route(1); break; }; # ----------------------------------------------------------------# Call Type Processing Section # ----------------------------------------------------------------# Verify if the Request URI is a domain that the SER is responsible # for. It does so by querying the Mysql table called domain. if (!is_uri_host_local()) { if (is_from_local() || allow_trusted()) { route(4); route(1); } else { sl_send_reply("403", "Forbidden"); }; break; }; if (uri!=myself) { route(1); break; };

if (method=="ACK") { route(1); break; } else if (method=="CANCEL") { route(1); break; # route (3) is used for the INVITE. } else if (method=="INVITE" || method=="SUBSCRIBE") { route(3); break; # route (2) is used for the registration. } else if (method=="REGISTER") { route(2); break; }; lookup("aliases"); if (!is_uri_host_local()) { route(4); route(1); break; }; if (!lookup("location")) { sl_send_reply("404", "User Not Found"); JZ; Reviewed: SPOC 11/6/2007 Solution & Interoperability Test Lab Application Notes 2007 Avaya Inc. All Rights Reserved. 20 of 26 SER-SES-SIP

break; }; route(1); } route[1] { # ----------------------------------------------------------------# Default Message Handler # ----------------------------------------------------------------t_on_reply("1"); if (!t_relay()) { if (method=="INVITE" || method=="ACK") { end_media_session(); }; sl_reply_error(); }; } route[2] { # ----------------------------------------------------------------# REGISTER Message Handler # ----------------------------------------------------------------sl_send_reply("100", "Trying"); if (!search("^Contact:[ ]*\*") && client_nat_test("7")) { setflag(6); fix_nated_register(); force_rport(); }; # Challenge the SIP endpoint if is not authenticated if (!www_authorize("","subscriber")) { www_challenge("","0"); break; }; if (!check_to()) { sl_send_reply("401", "Unauthorized"); break; }; consume_credentials(); if (!save("location")) { sl_reply_error(); }; } route[3] { JZ; Reviewed: SPOC 11/6/2007 Solution & Interoperability Test Lab Application Notes 2007 Avaya Inc. All Rights Reserved. 21 of 26 SER-SES-SIP

# ----------------------------------------------------------------# INVITE Message Handler # ----------------------------------------------------------------if (client_nat_test("3")) { setflag(7); force_rport(); fix_nated_contact(); }; if (uri=~"^sip:1[0-9]{10}@") { strip(1); }; lookup("aliases"); if (!is_uri_host_local()) { route(4); route(1); break; }; # route (5) is used for the calls to Location B if (uri=~"^sip:3[0-9]*@") { route(4); route(5); break; }; # route (6) is used for the calls to Location A if (uri=~"^sip:2[0-9]*@") { route(4); route(6); break; };

if (uri=~"^sip:011[0-9]*@") { route(4); route(5); break; }; # Lookup the location database to verify the availability of the called # Endpoint if (!lookup("location")) { if (uri=~"^sip:[0-9]{10}@") { route(4); route(5); break; }; sl_send_reply("404", "User Not Found"); break; };

JZ; Reviewed: SPOC 11/6/2007

Solution & Interoperability Test Lab Application Notes 2007 Avaya Inc. All Rights Reserved.

22 of 26 SER-SES-SIP

route(4); route(1); } route[4] { # ----------------------------------------------------------------# NAT Traversal Section # ----------------------------------------------------------------if (isflagset(6) || isflagset(7)) { if (!isflagset(8)) { setflag(8); use_media_proxy(); }; }; } route[5] { # ----------------------------------------------------------------# Handler for Location B # ----------------------------------------------------------------rewritehost("10.3.3.60"); avp_write("i:45", "inv_timeout"); route(1); } route[6] { # ----------------------------------------------------------------# Handler for Location A # ----------------------------------------------------------------rewritehost("10.1.1.50"); avp_write("i:45", "inv_timeout"); route(1); } onreply_route[1] { if ((isflagset(6) || isflagset(7)) && (status=~"(180)|(183)|2[0-9][0-9]")) { if (!search("^Content-Length:[ ]*0")) { use_media_proxy(); }; }; if (client_nat_test("1")) { fix_nated_contact(); }; } JZ; Reviewed: SPOC 11/6/2007 Solution & Interoperability Test Lab Application Notes 2007 Avaya Inc. All Rights Reserved. 23 of 26 SER-SES-SIP

The SER can be started in the debug mode by running the command /usr/local/sbin/ser D E. The following shows the sample output in these Application Notes.
[root@localhost sbin]$ ./ser D E 0(9441) WARNING: fix_socket_list: could not rev. resolve 10.3.3.125 0(9441) WARNING: fix_socket_list: could not rev. resolve 10.3.3.125 Listening on udp: 10.3.3.125 [10.3.3.125]:5060 tcp: 10.3.3.125 [10.3.3.125]:5060 Aliases: stateless - initializing 0(0) Maxfwd module- initializing [root@localhost sbin]$ textops - initializing 0(0) AVPops - initializing 0(0) permissions - initializing 0(0) Default allow file (/usr/local/etc/ser/permissions.allow) not found => empty rule set 0(0) Default deny file (/usr/local/etc/ser/permissions.deny) not found => empty rule set 0(0) INFO: udp_init: SO_RCVBUF is initially 110592 0(0) INFO: udp_init: SO_RCVBUF is finally 262142 1(0) INFO: fifo process starting: 9450 1(9450) SER: open_uac_fifo: fifo server up at /tmp/ser_fifo...

4 Verification
The following steps can be used to troubleshoot network configurations in the field: Network connectivity: 1. For each proxy server, ping the SIP phones that should be registered to it. 2. For each proxy server, ping the remote proxies to which it should be routing calls. If the pings fail, check the network device to troubleshoot the routing issue. 3. Verify that the Avaya SIP trunks are up between Avaya Communication Manager and the Avaya SIP Enablement Services servers. Use the status signaling-group command on Avaya Communication Manager. Call routing: 1. Verify successful calls between SIP phones within each proxy. 2. Verify the calls between two proxy servers. If the calls are unsuccessful, use a SIP-capable protocol analyzer to view the message exchange between SIP proxies. If a proxy does not route the INVITE message to the proper destination, check the route entries for that proxy to make sure the dial string match specification is correct (e.g., the address map in Avaya SIP Enablement Services, or the static route in the SER). 3. Verify that voicemail can be left in the mailbox of a telephone and retrieved by dialing the voicemail extension.

JZ; Reviewed: SPOC 11/6/2007

Solution & Interoperability Test Lab Application Notes 2007 Avaya Inc. All Rights Reserved.

24 of 26 SER-SES-SIP

5 Conclusion
As shown in these Application Notes, the SIP trunks can be configured between the SER and the Avaya SIP Enablement Services Servers. The SIP trunks can be used to route calls between two Avaya SES Servers with the SER as an intermediate proxy. The SIP trunks can also be used for routing calls that originate and terminate between one of the Avaya SES servers and the SER. Testing verified the following features between the two locations: Basic two-party calling with different audio codecs Proper termination of incomplete call attempts Caller ID/name display Call hold/multiple call handling Call transfer Conference Voice mail and DTMF

These Application Notes also verify the following basic features on the Avaya VoIP infrastructure with the endpoints registered with the SER: Basic two-party calling with different audio codecs Call hold Call transfer Conference Voice mail and DTMF

6 Additional References
The following Application Notes can be found at http://support.avaya.com: [1] SIP Support in Avaya Communication Manager Running on the Avaya S8300, S8400, S8500 series, and S8700 series Media Server. Document Number 555-245-206, Issue 7, May 2007. Installing and Administering SIP Enablement Services. Document Number 03-600768, Issue 4.0, May 2007.

[2]

The following document can be found at http://www.iptel.org/ser/doc/gettingstarted: [3] SER Getting Started

JZ; Reviewed: SPOC 11/6/2007

Solution & Interoperability Test Lab Application Notes 2007 Avaya Inc. All Rights Reserved.

25 of 26 SER-SES-SIP

2007 Avaya Inc. All Rights Reserved. Avaya and the Avaya Logo are trademarks of Avaya Inc. All trademarks identified by and are registered trademarks or trademarks, respectively, of Avaya Inc. All other trademarks are the property of their respective owners. The information provided in these Application Notes is subject to change without notice. The configurations, technical data, and recommendations provided in these Application Notes are believed to be accurate and dependable, but are presented without express or implied warranty. Users are responsible for their application of any products specified in these Application Notes.

Please e-mail any questions or comments pertaining to these Application Notes along with the full title name and filename, located in the lower right corner, directly to the Avaya Solution & Interoperability Test Lab at interoplabnotes@list.avaya.com

JZ; Reviewed: SPOC 11/6/2007

Solution & Interoperability Test Lab Application Notes 2007 Avaya Inc. All Rights Reserved.

26 of 26 SER-SES-SIP

You might also like