dslreports logo
site
 
    All Forums Hot Topics Gallery
spc

spacer




how-to block ads


Search Topic:
uniqs
1277
share rss forum feed

bluechalk

join:2009-09-20
New York, NY

FreePBX: two different Callcentric Account

I have two Callcentric accounts, and want incoming calls from them to have different values for dtmfmode and directmedia. I tried setting up two different SIP Trunks in FreePBX, one for each account, but its not working. Incoming calls from either account randomly goes to one SIP Trunk or the other depending on the IP address Callcentric is sending from.

My peer details for one of the accounts look like:
context=my-cid-zap-custom
fromuser=1777xxxxxxx
host=callcentric.com
fromdomain=callcentric.com
insecure=port,invite
secret=yyyyyyy
type=peer
defaultuser=1777xxxxxxx
dtmfmode=inband
qualify=yes
disallow=all
allow=ulaw
nat=yes
canreinvite=no
directmedia=no
srvlookup=yes


Is there some way to get the calls directed to the correct SIP Trunk, or is there some other way to do this with the configuration files in /etc/asterisk?


ropeguru
Premium
join:2001-01-25
Mechanicsville, VA

What does the register line look like for each? What you should do is put the account number at the end of each register line and then create an incoming route based on the account number.

1777MYCCID:SUPERSECRET@callcentric.com/1777MYCCID

Each route should be based on 1777MYCCID / Any CID


bluechalk

join:2009-09-20
New York, NY

ropeguru:

The register line looks like you described. The routing is working just fine. The problem is that its randomly picking the wrong trunk and using the wrong values for dtmfmode and directmedia. Each trunk is registered with a different Callcentric host. It appears that the incoming calls use the registered host IP address to choose the trunk instead of using the information in the register line.


SCADAGeo

join:2012-11-08
N California
kudos:2

said by bluechalk:

Each trunk is registered with a different Callcentric host. It appears that the incoming calls use the registered host IP address to choose the trunk instead of using the information in the register line.

I believe this will solve your issue:
»[Asterisk] PBX in a Flash with Multiple CC DIDs

bluechalk

join:2009-09-20
New York, NY

That thread solves a different problem: a single Callcentric account with multiple DIDs. In that solution, all the incoming Callcentric calls go through the same FreePBX trunk. In my case, I have two Callcentric accounts, and want incoming calls from each to go the the correct trunk.



Trimline
Premium
join:2004-10-24
Windermere, FL

I originally put that together. I had 3 separate CC accounts on a single PBX instance and wanted them segregated, both inbound and outbound.

Works fine. I just use the newer outbound rules (extension) for routing to each of the 3 accounts.


SCADAGeo

join:2012-11-08
N California
kudos:2
reply to bluechalk

said by bluechalk:

That thread solves a different problem: a single Callcentric account with multiple DIDs. In that solution, all the incoming Callcentric calls go through the same FreePBX trunk. In my case, I have two Callcentric accounts, and want incoming calls from each to go the the correct trunk.

Same solution, just abstraction at another level.

No need to register with @callcentric.com/1777MYCCID, just have both accounts register to @callcentric.com.

You'll be able to create multiple Inbound Routes using your CallCentric IDs (or other/free CallCentric DIDs) as the DID number, and route it accordingly.

Assigning a CID name prefix (such as CC01:, CC02:, CCFree01:) to the Inbound Route will make it easier to troubleshoot.

bluechalk

join:2009-09-20
New York, NY

The inbound routes are working fine. The trouble is that I want different settings for dtmfmode and directmedia depending on which account the inbound call is coming from.


SCADAGeo

join:2012-11-08
N California
kudos:2

said by bluechalk:

The inbound routes are working fine. The trouble is that I want different settings for dtmfmode and directmedia depending on which account the inbound call is coming from.

You may have found a bug...

SCADAGeo

join:2012-11-08
N California
kudos:2
reply to bluechalk

I was able to duplicate your results in Asterisk 11.1.2.

Surprisingly, after changing the configuration from:
context=my-cid-zap-custom
insecure=port,invite
srvlookup=yes
 
Registration String: 1777MYCCID:SUPERSECRET@callcentric.com
 

to

context=my-cid-zap-custom1
fromuser=1777xxxxxx1
secret=yyyyyyy1
defaultuser=1777xxxxxx1
insecure=invite
srvlookup=no
 
Registration String: 1777xxxxxx1:yyyyyyy1@callcentric.com:5080
 

and

context=my-cid-zap-custom2
fromuser=1777xxxxxx2
secret=yyyyyyy2
defaultuser=1777xxxxxx2
insecure=invite
srvlookup=no
 
Registration String: 1777xxxxxx2:yyyyyyy2@callcentric.com:10123
 

The wrong trunk was called (matched domain, but ignored port), hence in my opinion, the inbound routing is not working correctly because the first context matching the domain, irregardless of port, is always called.

bluechalk

join:2009-09-20
New York, NY

SCADAGeo: Thanks for verifying that this is indeed a problem with Asterisk. Using different port numbers was a clever idea. Its too bad that it doesn't work.


SCADAGeo

join:2012-11-08
N California
kudos:2

said by bluechalk:

SCADAGeo: Thanks for verifying that this is indeed a problem with Asterisk. Using different port numbers was a clever idea. Its too bad that it doesn't work.

This is an interesting issue.

It also appears to affect other providers, too, such as sub-accounts that are registered to the same POP.