Difference between revisions of "Using Repro"

From reSIProcate
Jump to navigation Jump to search
Line 172: Line 172:
 
=== Troubleshooting ===
 
=== Troubleshooting ===
  
[[Running Repro on the same machine as a User Agent]]
+
#[[Running Repro on the same machine as a User Agent]]
[[Enabling repro to proxy SUBSCRIBE and PUBLISH requests]]
+
#[[Enabling repro to proxy SUBSCRIBE and PUBLISH requests]]

Revision as of 09:09, 22 December 2006

Getting the Software

Running repro

Run the executable from the command line. A number of command line options are available. For a summary of options run repro with the help option:

%repro --help

Usage: repro [OPTION...]

 -l, --log-type=syslog|cerr|cout                       where to send logging messages (default: "cout")
 -v, --log-level=STACK|DEBUG|INFO|WARNING|ALERT        specify the default log level (default: "INFO")
 -r, --record-route=sip:example.com                    specify uri to use as Record-Route 
 --Udp=5060                                            listen on UDP port (default: 5060)
 --tcp=5060                                            listen on TCP port (default: 5060)
 -t, --tls-domain=example.com                          act as a TLS server for specified domain
 --tls=5061                                            add TLS transport on specified port (default: 5061)
 --dtls=0                                              add DTLS transport on specified port (default: 0)
 --enable-cert-server                                  run a cert server
 -c, --cert-path=STRING                                path for certificates (default: "C:\sipCerts" or "$(HOME)/.sipCerts")
 --enable-v6                                           enable IPV6
 --disable-v4                                          disable IPV4
 --disable-auth                                        disable DIGEST challenges
 --disable-web-auth                                    disable HTTP challenges
 --disable-reg                                         disable registrar
 -i, --interfaces=sip:10.1.1.1:5065;transport=tls      specify interfaces to add transports to
 -d, --domains=example.com,foo.com                     specify domains that this proxy is authorative
 -R, --route=sip:p1.example.com,sip:p2.example.com     specify where to route requests that are in this proxy's domain
 --reqChainName=STRING                                 name of request chain (default: default)
 --http=5080                                           run HTTP server on specified port (default: 5080)
 --recursive-redirect                                  Handle 3xx responses in the proxy
 --q-value                                             Enable sequential q-value processing
 --q-value-behavior=STRING                             Specify forking behavior for q-value targets:
                                                       FULL_SEQUENTIAL,
                                                       EQUAL_Q_PARALLEL, or
                                                       FULL_PARALLEL
 --q-value-cancel-btw-fork-groups                      Whether to cancel groups of parallel forks after the period
                                                       specified by the --q-value-ms-before-cancel parameter.
 --q-value-wait-for-terminate-btw-fork-groups          Whether to wait for parallel fork groups to terminate before
                                                       starting new fork-groups.
 --q-value-ms-between-fork-groups=INT                  msec to wait before starting new groups of parallel forks
 --q-value-ms-before-cancel=INT                        msec to wait before cancelling parallel fork groups
 -e, --enum-suffix=e164.arpa                           specify enum suffix to search
 -b, --allow-bad-reg                                   allow To tag in registrations 
 --timer-C=180                                         specify length of timer C in sec (0 or negative will disable
                                                       timer C)
 -a, --admin-password=                                 set web administrator password
 -V, --version                                         show the version number

Help options:

 -?, --help                                            Show this help message
 --usage                                               Display brief usage message

Running the proxy server with the default options is fine. If you are troubleshooting, we recommend that you enable DEBUG level logging:

% ./repro -v DEBUG

Installing

Installing on Windows

After Getting the Software just run the installation file following the installer instructions.

Installing on Linux OS or Unix-Like Systems

Repro is avaliable both as a RPM build and as a source code.

To install the rpm version run: $ rpm -i <repro_rpm_file>

To install from source code:

  • decompress the source code file
  • cd into the directory
  • run: $ ./configure
  • run: $ make install-repro

Configuring repro using the Web Admin

Once repro is running additional configuration are avalible using the WebAdmin pages. The WebAdmin runs on port 5080 by default, or a specific port if you specified it on the command line with the "--http" command-line option.

To view the pages use any Web Browser and open the url: "<repro_address>:<port>" i.e. if you are running repro on your local machine and you are using the default web access port just open: "http://localhost:5080/". To Login use the initial username: admin and the password "admin" or use the password that you specified on the command line.

File:Repro-login.png

Setting Up Admin Account

Adding Users

To add users click on the add user page, this page allows you to add users that will be able to use repro. The mandatory fields are the username and the domain. The password is the SIP Digest password File:Repro-addUser.png


Adding Routes to Gateways

Routes are used by repro to send certain requests to a particular location. The static routes use (POSIX-standard) regular expression to match and rewrite SIP URIs. The screenshot shows an example of sending all requests that consist of only digits in the userpart of the SIP URI to a gateway. Note that to match characters that have a special meaning in regular expression (like a "."), you need to escape these. You can also use variable substitution in the rewrite expression. The string inside the first set of parentheses () is referenced in the rewrite string as $1, the second is $2, etc.

File:Repro-addRoute.png

Since it is easy to make mistakes entering regular expressions, you can test your static routes in the Show Routes page. Type in a SIP URI, click Test Route. You should see the rewritten URL below.

File:Repro-showRoutes.png

See Common_rePro_Routes for some commonly used routes and regular expressions used in routes.

Configuring the Address Control List

The Address Control List allows you to add trusted nodes that will not require any authentication. Identification of the node is done using the incoming address (masks allowed) or Tls peer name. Note: If hostnames or FQDN's are used then a TLS transport type is assumed. All other transport types must specify ACLs by address. To add a trusted node open the ACLs page under configure menu and edit the address and port boxes then click add button.

File:Repro-ACLs.png

Configuring SIP user agents to work with repro

Configure a SIP user agent (softphone or appliance) with the same user information entered for the user in the rePro configuration interface. The address of record (AOR) for the user will be sip:user-name@repro-domain where the user-name part is the value entered on in the User Name field on the USERS -> ADD USER page. The repro-domain part is the valued entered on the CONFIGURE -> DOMAINS page. Note: you can also see the users' AORs listed on the USERS -> SHOW USERS page. The authentication user id that is expected by rePro is the user-name part of the AOR (no @ or domain name). The parameters for your specific user agent may be labeled differently but typically the following information is required:

  • User Address of Record
  • Proxy
  • User Authorization Id
  • User Password

The values for these parameters assuming the above examples for domain and user would be as follows:

User Address of Record: sip:alicedoe@example.com Proxy: example.com User Authorization Id: alicedoe User Password: 1234

Setting Up Certificates for TLS

Configuring DNS

Setting up multiple domains

You must add at least one "domain" before you can use the proxy server. The domains are names that the proxy recognizes after the at-sign (@) in the SIP URI. The list of domains is used by the proxy and the registrar to decide if repro is responsible for SIP requests it receives. The WebAdmin also uses the list of domains to make sure users you add are in one of the domains.

For example, if you want the proxy to answer requests for atlanta.com, you need to add atlanta.com to the list of domains. You still need to make sure that you configure DNS so that SIP requests for that domain resolve to repro.

If you don't have a fully qualified domain name, you can use your IP address as a "domain".

File:Repro-domains.png

Configuring Logging

(this should be a pointer to the resip docs)

Troubleshooting

  1. Running Repro on the same machine as a User Agent
  2. Enabling repro to proxy SUBSCRIBE and PUBLISH requests