Koozali.org: home of the SME Server

Call out alsways going through same carrier?

Offline wifi

  • **
  • 55
  • +0/-0
Call out alsways going through same carrier?
« on: March 20, 2008, 06:03:10 PM »
Okay after a lot of help from selintra (thank you again), I now have a working in and out line with a Voipbuster account.

As I also have an other carrier (Budgetphone), and as it was not listed in the Carriers menu, I added it.
After adding the new carrier, and creating a new trunk (with the just created new carrier), the command: asterisk -rx "sip show registry" shows that both carriers are registered

Quote
[root@files asterisk]# asterisk -rx "sip show registry"
Host                            Username       Refresh State                Reg.Time
sip.budgetphone.nl:5060         3130xxxxxxx@       145 Registered           Thu, 20 Mar 2008 18:02:50
sip.voipbuster.com:5060         xxxxxxxxx          145 Registered           Thu, 20 Mar 2008 18:02:50
[root@files asterisk]#
(note that I've changed the xxxx for privacy)

I assigned the Voipbuster account to extension: 5000
I assigned the Budgetphone account to extension: 5001

Then in the Routes I assigned a route named call-5000, with as primary path the Voipbuster number
I also assigned a route name call-5001, with as primary path the Budgetphone number
Both routes have as route Dial Plans: _00X. _0X.

Problem now (last line)
When I call the Voipbuster number (from a none Voip phone), the extension 5000 rings, and I can use it (this is working fine)
When I call the Budgetphone number (from a none Voip phone), the extension 5001 rings, and I can use it (this is working fine)
When I make a call from extension 5000, it will use the Voipbuster account (this is also working fine)
When I make a call from extension 5001, it SHOULD use the Budgetphone , but DOES use the Voipbuster account (this is NOT working fine as it should use the Budgetphone carrier to make the call)

I'm sure it's got something to do with the routes, but again what?

Thank you for any help on this.
« Last Edit: March 20, 2008, 06:05:28 PM by wifi »
ıɟ ʇ,uɐɔ noʎ ƃuıɥʇʎuɐ ʇɹɐʇs ɹǝʌǝu

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Call out alsways going through same carrier?
« Reply #1 on: March 20, 2008, 10:05:01 PM »
Routes are an abstraction.  They resolve to simple pathways through the asterisk dialplan in the same context.  Thus you cannot have multiple routes "catching" the same numbers (which is what you have done). 

However, you require to have outbound calls from one extension use a particular carrier while calls from another extension use a different carrier.  You can do this by creating multiple clusters and having the two phones inhabit different clusters.  Clusters are essentially separate route contexts so you can have two, or more, phones, dialling the same, or similar, number yet having their calls carried by different trunks.

If the idea of clusters sounds too complex, you can always use a prefix ( for example, an 8 ).  Catch regular calls (_00X. _0X. etc) in one route and then create another route to catch calls which are prefixed (_800X. _80X. etc.).   In the trunk, remove the prefix with a transformation mask of 8:

Two different ways to achieve your requirement.


Kind Regards



 

 

Offline wifi

  • **
  • 55
  • +0/-0
Re: Call out alsways going through same carrier?
« Reply #2 on: March 20, 2008, 10:50:34 PM »
Hi again,

The clusters do sounds too complex, so I have gone for the 2nd option :/

I've created one route with as Route Dial Plans "_00X. _0X.", and an other one with _800X. _80X.

Now when dialing a number, it will use the "_00X. _0X." route.
Question: How do I dial with the "_800X. _80X." route?
I've tried staring the numer with a 8, and *8 and #8 and so on, but with no luck (till now)

I feel so stupid. Am I the only one here who is always asking for help?
ıɟ ʇ,uɐɔ noʎ ƃuıɥʇʎuɐ ʇɹɐʇs ɹǝʌǝu

Offline wifi

  • **
  • 55
  • +0/-0
Re: Call out alsways going through same carrier?
« Reply #3 on: March 20, 2008, 11:21:57 PM »
Guess what.

After playing a bit with the clusters I got it to work (both  Route Dial Plans are set to: _00X. _0X. again)

Is it still possible to select what carrier to use when making a call by lets say adding a 8 in the prefix of a phone number?
If so, I will need to change the Route Dial Plans back to _800X. _80X. again, but how should the prefix look in the number to dial?
Something like *8# phone number?
ıɟ ʇ,uɐɔ noʎ ƃuıɥʇʎuɐ ʇɹɐʇs ɹǝʌǝu

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Call out alsways going through same carrier?
« Reply #4 on: March 21, 2008, 06:23:28 PM »
Quote
Is it still possible to select what carrier to use when making a call by lets say adding a 8 in the prefix of a phone number?

Not with clusters.  Clusters are there to isolate carriers and extensions from one another. They were designed for multi-occupancy buildings, where you may have several companies all sharing a single PBX.

I suspect your 8 prefix didn't work because you didn't strip the 8 in the trunk transformation mask (8:)  That's 8 with a colon after it.

Have a look at transformation masks in the documentation.

Kind Regards

S









NicoSantiago

Re: Call out alsways going through same carrier?
« Reply #5 on: June 05, 2009, 07:44:05 AM »
              Congratulations for that happened. I hope you are proud of your career now.


_________________
Basement Dehumidifier