Jump to: navigation, search

Asterisk for Business Calls Routing

Integration Task Summary

The following table summarizes the steps to integrate SIP Server with Asterisk to support business calls routing.

Objective

Related Procedures and Actions

1. Configure Asterisk to support business call routing.

See Configuring Asterisk.

2. Configure DNs for the Asterisk Switch object in the Configuration Layer.

See Configuring DN Objects.

Configuring Asterisk

This section describes the procedures for configuring Asterisk in the following environment:

  • Asterisk is connected to the network via a SIP gateway.
  • Two SIP endpoints, 2001 and 2002, are registered on Asterisk.
  • Each endpoint is associated with a T-Library desktop application.
Asterisk Sample Configuration

The following table provides an overview of the main steps to integrate SIP Server with Asterisk.

Objective

Related Procedures and Actions

1. Confirm that Asterisk is functional and handling calls appropriately.

The procedures in this topic assume that Asterisk is functional and handling calls appropriately. For more information, see Asterisk documentation.

2. Configure the sip.conf file.

See Configuring the sip.conf file.

3. Configure the extensions.conf file.

See Configuring the extensions.conf file.

Configuring the sip.conf file

Purpose

To configure the sip.conf file for Asterisk.

Start

  1. Configure two peers, one describing the gateway access, and the other describing SIP Server access—for example: [gwsim] type=peer host=10.0.0.1 port=5066 context=default canreinvite=no [gsip] type=peer username=gsip host=10.0.0.1 context=default canreinvite=no
  2. Configure the endpoints. The user name of the endpoint must match the Extension DN configured on the SIP Server side"for example: [2001] type=friend username=2001 host=dynamic context=default notifyringing=yes canreinvite=no [2002] type=friend username=2002 host=dynamic context=default notifyringing=yes canreinvite=no
    Note: SIP Server does not support receiving authentication challenges. For this reason, Asterisk users must not be configured with the secret option; otherwise, Asterisk would challenge INVITE messages that SIP Server issues on behalf of the user, and SIP Server would fail to respond to the challenge.
  3. When you are finished, save your configuration.

End

Configuring the extensions.conf file

Purpose

To configure the extensions.conf file for Asterisk.

Start

  1. For each endpoint that SIP Server monitors, configure a hint entry to ensure that Asterisk will accept a presence subscription (from SIP Server, in this case) for those endpoints—for example:
    exten => 2001,hint,SIP/2001
    exten => 2001,1,Dial(SIP/2001,60)
    exten => 2002,hint,SIP/2002
    exten => 2002,1,Dial(SIP/2002,60)
  2. Configure a basic dialing plan for contact center calls.
    In this example, extension 2400 is used as a company's service number, so all business calls should arrive to this extension. Those calls are routed to SIP Server. If a call is not answered within 30 seconds, it will be dropped. The "r" flag tells Asterisk to generate a ringback tone for the caller while the call is being routed.
    ; Inbound call to routing point 2400 -> contact SIP Server
    exten => 2400,1,Dial(SIP/${EXTEN}@gsip,30,r)
    exten => 2400,2,Hangup()
  3. Configure a basic dialing plan for calls to external numbers"for example:
    ; Any number with prefix "0' -> contact gateway (with remaining digits only)
    exten => _0.,1,Dial(SIP/${EXTEN:1}@gwsim,60)
  4. When you are finished, save your configuration.

End

Configuring DN Objects

The following table provides an overview of the main steps to configure different DNs under the Asterisk Switch object in the Configuration Layer.

Objective

Related Procedures and Actions

1. Configure a Trunk DN.

See Configuring a Trunk DN.

2. Configure an Extension DN.

See Configuring Extension DNs.

If you integrate SIP Server with Asterisk in order to support the business routing capability, you do not need to set any configuration options in the SIP Server Application object. Instead, you configure DNs for the Asterisk Switch object that is assigned to the appropriate SIP Server.

Configuring a Trunk DN

Purpose

To configure a DN of type Trunk to support the presence SUBSCRIBE/NOTIFY functionality and to configure external access through Asterisk.

Start

  1. Under a configured Switch object, select the DNs folder. From the File menu, select New > DN to create a new DN object.
  2. In the New DN Properties dialog box, click the General tab, and then specify the following properties (see the following figure):
    1. Number: Enter a name for the Trunk DN. This name can be any unique value, and it can be a combination of letters and numbers.
    2. Type: Select Trunk from the drop-down box.
  3. Click the Annex tab.
  4. Create a section named TServer. In the TServer section, create options as specified in the following table (see also the following figure):

    Option Name

    Option Value

    Description

    contact SIP URI The contact URI to which SIP Server sends the SUBSCRIBE message.
    subscribe-presence-domain A string The subscription domain information for the Trunk DN. This option value will be used with the DN name to form the SUBSCRIBE request URI and the To: header.
    subscribe-presence-expire Any positive integer The subscription renewal interval (in seconds).
    subscribe-presence-from SIP URI The subscription endpoint information. This option value will be used to form the From: header in the SUBSCRIBE request.
    prefix Any positive integer The initial digits of the number used to direct to Asterisk any call that SIP Server does not recognize as an internal DN.
    refer-enabled false Set this option to false for SIP Server to use a re-INVITE request method when contacting Asterisk.
  5. When you are finished, click Apply.

End

Configuring Extension DNs

Purpose

To configure Asterisk endpoints that SIP Server will monitor and control.

Start

  1. Under a configured Switch object, select the DNs folder. From the File menu, select New > DN to create a new DN object.
  2. In the New DN Properties dialog box, click the General tab, and then specify the following properties:
    1. Number: Enter a name for the Extension DN. In general, this should be the phone number of the extension. You must not use the @ symbol or a computer name.
    2. Type: Select Extension from the drop-down box.
  3. Click the Annex tab.
  4. Create a section named TServer. In the TServer section, create options as specified in the following table:

    Option Name

    Option Value

    Description

    contact SIP URI The contact URI to which SIP Server sends the SUBSCRIBE message.
    dual-dialog-enabled false Set this option to false so that consultation calls are handled using the same SIP dialog that is sent to Asterisk.
    make-call-rfc3725-flow 1 Set this option to 1, so that 3pcc call flow will be used according to RFC3725.
    refer-enabled false Set this option to false if you are using the RFC3725 flow.
    sip-hold-rfc3264 false Set this option to false so that RTP stream hold is performed in a manner compliant with RFC2543.
    subscribe-presence A string The name of the Trunk DN that is configured for the presence subscription messages to be sent to Asterisk.
  5. When you are finished, click Apply.

End

This page was last edited on August 3, 2016, at 00:14.
Comments or questions about this documentation? Contact us for support!