Koozali.org: home of the SME Server

Extention to Use only ONE trunk with Dialing rule for other Extentions

Offline Teviot

  • *
  • 610
  • +0/-0
Hi

I'm having a bit of trouble getting an extention (4001) to use a particular trunk for out going calls while the other extension follow the dialing rules to make outgoing calls.

Can somebody point me in the right direction?

« Last Edit: April 23, 2009, 02:25:22 AM by teviot »
Regards
M0GLJ
......................................................
I am new to SAIL SME Server v8b6 and have been using SME for many years.
I have already done some research and only ask questions if I still can't work it out.

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
create a route with a mask _X./4001

Offline Teviot

  • *
  • 610
  • +0/-0
Thanks S

That worked perfectly first time
Regards
M0GLJ
......................................................
I am new to SAIL SME Server v8b6 and have been using SME for many years.
I have already done some research and only ask questions if I still can't work it out.

Offline PWDasterisk

  • ***
  • 56
  • +0/-0
I tried that trick and it didn't work for me - did I misinterpret what you were saying?

> I created a Route called "A_TEST" and assigned a "Route Dial Plans" value of "_X./1111"
> When I dial 19876543210 from x1111 it followed the "VoIP-Low_Bandwidth" Route that has a "Route Dial Plans" value of "_1XXXXXXXXXX." which is used by all extensions for outbound calls.

What am I missing ?
if at first you don't succeed then keep on reading until you do succeed...

Offline PWDasterisk

  • ***
  • 56
  • +0/-0
Update... 

I finally got the route mask to take by restarting asterisk - from that point on a commit worked properly for any other route changes
if at first you don't succeed then keep on reading until you do succeed...

Offline Teviot

  • *
  • 610
  • +0/-0
Update -- Dial Rule not working

Hi S & All

Have now put this dialing rule in place and are trying to get it to work.

Code: [Select]
Route         Cluster Desc          Dial Plan   Primary    Secondary Authorized Active     
CCES-OUTBOUND default CCES-OUTBOUND _X./4001    0265xxxxxx 0939xxxx  NO         YES   

I have entered the above and committed then from the console issued the RESTART NOW command

I then tested the dialing rule by making a call and the call follows the other exsiting dialing rules.

What have I done wrong?

Log entries below
Code: [Select]
== Manager 'fop' logged on from 127.0.0.1
    -- Executing [024305xxxx@internal:1] AGI("SIP/4001-09a135e8", "selintra|OutCluster|024305xxxx") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/selintra
    -- AGI Script selintra completed, returning 0
    -- Executing [024305xxxx@default:1] AGI("SIP/4001-09a135e8", "selintra|OutRoute|National") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/selintra
    -- AGI Script Executing Application: (Dial) Options: (SIP/024305xxxx@mynetfone||T)
    -- Called 024305xxxx@mynetfone
    -- Got SIP response 503 "Service Unavailable" back from 125.xxx.xxx.81
    -- SIP/mynetfone-09a0ca18 is circuit-busy
  == Everyone is busy/congested at this time (1:0/1/0)
    -- AGI Script Executing Application: (Dial) Options: (SIP/024305xxxx@61996060002||T)
    -- Called 024305xxxx@61996060002
    -- Executing [09285006@mainmenu:1] AGI("SIP/09398319-09999128", "selintra|Inbound|09285006") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/selintra
    -- AGI Script Executing Application: (Background) Options: (silence/3)
    -- <SIP/09398319-09999128> Playing 'silence/3' (language 'en')
    -- SIP/61996060002-09a0ca18 is ringing
    -- SIP/61996060002-09a0ca18 answered SIP/4001-09a135e8

Please help?
« Last Edit: April 30, 2009, 03:56:35 AM by teviot »
Regards
M0GLJ
......................................................
I am new to SAIL SME Server v8b6 and have been using SME for many years.
I have already done some research and only ask questions if I still can't work it out.

Offline PWDasterisk

  • ***
  • 56
  • +0/-0
I had to do: /etc/init.d/sark restart     
... after that the route took effect
if at first you don't succeed then keep on reading until you do succeed...

Offline Teviot

  • *
  • 610
  • +0/-0
Thanks PWDasterisk

Just tried that and still have the same result
Regards
M0GLJ
......................................................
I am new to SAIL SME Server v8b6 and have been using SME for many years.
I have already done some research and only ask questions if I still can't work it out.

Offline PWDasterisk

  • ***
  • 56
  • +0/-0
teviot -

One other thing you may want to check when you are setting up routes. Sail parses the route tree in-order, specifically top-down in the "Routes" list which is an alphabetical sort. As soon as the dial string hits the first match it finds it jumps to the remaining call flow logic.

I named my test route "A_Test" since that placed it first in the routes list... the alphabetization is case sensitive - "A" to "Z" are pattern matched before "a" to "z"

« Last Edit: April 30, 2009, 05:47:52 AM by PWDasterisk »
if at first you don't succeed then keep on reading until you do succeed...

Offline Teviot

  • *
  • 610
  • +0/-0
Thank you

Will give that a try
Regards
M0GLJ
......................................................
I am new to SAIL SME Server v8b6 and have been using SME for many years.
I have already done some research and only ask questions if I still can't work it out.

Offline Teviot

  • *
  • 610
  • +0/-0
Re: Extention to Use only ONE trunk with Dialing rule for other Extentions
« Reply #10 on: April 30, 2009, 10:25:47 AM »
PWDasterisk

Tried that and still not happening.



Selintra

Have you go a suggestion or fix?
Regards
M0GLJ
......................................................
I am new to SAIL SME Server v8b6 and have been using SME for many years.
I have already done some research and only ask questions if I still can't work it out.

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Extention to Use only ONE trunk with Dialing rule for other Extentions
« Reply #11 on: April 30, 2009, 11:34:26 AM »

Quote
Have you got a suggestion or fix?

Don't have a fix - it just seems to work here. 

One alternative would be to pre-program the phone to insert a leading digit (say an 8 or a 7) which you can catch in your route (don't forget to remove the leading digit in the trunk).  You can do this with most "business" level SIP phones (SNOM, Polycom, Cisco et al).

Another is to set the phone extension up as a cluster in its own right.  You can then give the cluster its own route entries.

Any of these things should work.

Best

S