Ordering trunks


#1

Hi,

I create 2 trunks (SIP and IAX2), purpose being that SIP is used as failover.

At first, in the IAX GUI there is a mistake in the account description: username is to be set with peer hostname, host is not used and auth-user contain the username which is OK.

In both trunks, in outbound calls, I created two rules, only difference being In-prefix (first empty, second = 0). When I call from Software client call is going out using IAX2 but if I call the using a phone it goes through SIP.

Is there a possibility to order trunks and how tare they choosed as we don’t want to use In-prefix? If a trunk is defined as failover, will it be also used as “normal” trunk?

What would be great too is the possibility to disable a trunk

Thanks for any hint

Daniel


#2

Hi Daniel,

0 and none prefix cause errors when dialing numbers with a leading 0, it will always be cut off and in-prefix 0 trunk will be used (probably dialing wrong number). When using prefix to determine trunk you should use #0 and #1 for example. Default prefix can be set via appliance->services to #0 instead of 0 as well.

For your situation you should use the trunk failover instead of the prefix solution: leave all outbound rules empty in those two trunks and create an trunk failover with iax first and sip second. There you can create the outbound rules without special prefix (or with 0, please consider to adjuste the default setting at appliance->services: telephony). If first trunk is busy or can’t be used, the second will be choosen.

Best regards,
Steve


#3

Hi Steve,

I don’t want to use prefix, 0 or any other. Rules are those in order:

  • call EU emergency numbers
  • call internal numbers including local service numbers like echo test aso, 3 digits
  • call special numbers 10XX or 16XX 3XXX or 116XXX or 118XXX via trunk (IAX then SIP or other way)
  • call 0XXXXXXXXX numbers via trunk (IAX then SIP or other way)
  • call 00X. numbers via trunk (IAX then SIP or other way)

I put everywhere prefix as #0 but still get in logs

-- Executing [0684XXXXXX@mdc_distribute:1] Set("SIP/Ab2tBzpnPL4jQmV-0000003b", "MDC_INPREFIX_TRUNK=0") in new stack
-- Executing [0684XXXXXX@mdc_distribute:2] Verbose("SIP/Ab2tBzpnPL4jQmV-0000003b", "1,remove inprefix: 0") in new stack remove inprefix: 0

Is there no way to NOT use this Inprefix 0 ?

Thanks for your support

Daniel


#4

Hi Daniel,

it seems there is still an outbound rule with prefix 0 exisitant.

It is possible not to use, but you have to remove all outbound rules with this prefix used (or change the prefix at least) and drop the 0 in the default outbound prefix setting (appliance->services: telephony)

Emergency Numbers should work nontheless, but if there is no destination * rule, you might have to add them as well.
If you only use this two trunks in always the same order, destination * is all you need, otherwise you have to use regex for your destinations to seperate special numbers behavior from the _0X. or _00X. calls.

Best regards,
Steve

Best regards,
Steve