Difference between revisions of "MOR and Trixbox"

From Kolmisoft Wiki
Jump to navigationJump to search
Line 228: Line 228:


This is not a connection problem. This happens when you have an incorrect (or not set) outbound caller ID within trixbox. Thus "201" is being passed through to Mor.
This is not a connection problem. This happens when you have an incorrect (or not set) outbound caller ID within trixbox. Thus "201" is being passed through to Mor.
--VCCS

Revision as of 19:39, 5 March 2008

As MOR and Trixbox (FreePBX) both use Asterisk Realtime and custom extensions - they can't work nicely on the same server.

In order to integrate Trixbox with MOR you need to connect in following way:


Trixbox small.png


Connection diagram

As an example we will configure one phone dialing. Phone is connected to Trixbox which is connected to MOR:


Trixbox2 small.png


Here for simplicity all devices are in same LAN:

  • MOR server has IP: 10.10.1.10
  • Trixbox: 10.10.1.20
  • Phone: 10.10.1.30

MOR and Trixbox are connected with following settings:

  • username: mor_trixbox
  • password: mor_trixbox_psw

And phone to Trixbox is connected with:

  • username: 201
  • password: 201psw


Dialing from phone to MOR

Trixbox3 small.png


  • Here device makes call to example destination 9999999999.
  • When call reaches Trixbox correct CallerID number for this phone is applied. In our example it is 1111111111. Then call is forwarded to MOR.
  • When MOR gets a call it sees that call is sent by Trixbox.
  • Also it sees that Trixbox is Trunk with ANI - that means MOR needs to chech CallerID of the call to find real caller.
  • MOR checks for CallerID number (1111111111) and sees that this CallerID is assigned to phone device.
  • The MOR retrieves all info necessary to send call further (LCR/Tariff/Rates/Providers/etc).
  • When call is finished - it is logged in MOR not for Trixbox, but for phone's user/device. That is what we wanted from our configuration.


Trixbox configuration for phone

Lets connect phone to Trixbox. In FreePBX create Extension for 201 phone:

Trixbox8.png

Most important details:

Trixbox9.png


Here we set CallerID number which should be applied to the call from this device. Password and dial string also here.



Trixbox configuration for MOR

In Trixbox we need to define MOR as a Trunk:

Trixbox10.png

Define some route in Trixbox to use this Trunk (here is just an example):

Trixbox11.png



TrixBox Trunk Troubleshooting

When passing multiple CallerIDs from multiple extensions in TrixBox through a single ANI-enabled trunk to MOR, make sure to define the outbound TrixBox PEER CallerID as empty using callerid="" <>.

If you don't include this, your MOR trunk will publish whichever CallerID was last passed to it. This will not allow you to correctly track different users' CallerID in MOR to provide them with separate call cost tracking.

Also, be sure NOT to define the inbound USER CalleID on the same TrixBox trunk with the same empty entry. If you do, the CallerID will be stripped from all incoming calls


MOR configuration for Trixbox

We need to create connection between MOR and Trixbox. In this example we will configure MOR-Trixbox connection using SIP.

We need to create user for Trixbox - pbx_user, put any details for it - it does not matter:

Trixbox3.png

Now we need to configure device for Trixbox:

Trixbox4.png

Main settings are:

Trixbox5.png

  • Mark this device as Trunk with ANI support
  • Username (by example): mor_trixbox
  • Password: mor_trixbox_psw
  • Host: 10.10.1.20
  • Make sure Dynamic? is unchecked and port is 5060 (for SIP)


MOR configuration for phone

To correctly bill phone calls you need to create separate user and device for it on MOR.

First let's create user for phone (phone_user):

Trixbox6.png

Make sure you configure this user correctly - e.g. enter password/LCR/Tariff and other necessary details - this user will be used for real dialing out.

Then we need to create virtual device for our phone:

Trixbox7.png

All settings for this device are not important at all except:

  1. Make sure you marked this device as Trunk - important for receiving calls
  2. Make sure you have good password for security


CallerID for phone in MOR

In order MOR to recognize device/phone we need to assign CalledID to our phone's device:

Trixbox12.png

NOTE: currently it is not possible to enter same CallerID as device's name. That way call will fail. It is due to the way Asterisk handles authentication.



Dialing to phone using DID

Trixbox4small.png


  • Here call is coming to DID: 2222222222
  • When it reaches MOR - MOR knows that 2222222222 should be forwarded to device 201
  • Device 201 forwards call to Trixbox device: Dial(SIP/22222222222@mor_trixbox)
  • Trixbox receives call with destination 2222222222
  • Trixbox know that this call should be forwarded to phone SIP/201
  • Phone rings
  • After call in MOR log call is in device's 201 logs (CDR) - as it should be



MOR configuration

You need to create DID 2222222222 in MOR and assign phones user/device to this DID:

Trixbox13.png

And in this device's Call Flow you need to forward call to Trixbox:

Trixbox14.png



Trixbox configuration

Now when call arrives in Trixbox, it should know how to route call to phone 201.

We can configure this in 2 ways:

  • Using Direct DID
  • Using Inbound Route


Direct DID configuration

Trixbox16.png



Inbound Route configuration

Trixbox15.png




Final notes

Here as an example we used DID 2222222222 and CallerID 1111111111. In most cases in real installations these values are the same. That means - if user is dialing out and his CallerID (for example is) 3333333333 then he can receive calls by DID: 3333333333. You can configure this in same way using this manual. Different values for DID and CallerID here are chosen to make example more understandable.


Configuring more phones

In order to configure more phones:

  1. Connect phone to Trixbox
  2. Configure user/device in MOR for phone
  3. Make sure CallerID for phone in Trixbox is the same as CallerID (CID) for phone's device in MOR
  4. Create DID for phone on MOR, assign it to phone's device, forward call from device to Trixbox in MOR
  5. Make sure Trixbox knows how to route call from DID to phone


Limitations

Using this configuration to connect Trixbox (FreePBX actually) to MOR has some limitations:

  1. MOR device's CallerID can't be the same as device's name
  2. Phones connected to Trixbox can't have similar CallerIDs. Actually they can - but MOR will not be able to distinguish which device is actually making a call - so these devices with identical CallerIDs will be billed together using one account (user/device) in the MOR


Errors

chan_sip.c:8373 check_auth: username mismatch, have <201>, digest has <mor_trixbox>

Error is made when configuring connection between MOR and Trixbox.

--note--

This is not a connection problem. This happens when you have an incorrect (or not set) outbound caller ID within trixbox. Thus "201" is being passed through to Mor.

--VCCS