Outbound setup

Hi everyone,

I have a small business setup of 15 extensions.

I have 2 sip providers, both are for inbound and outbound

I need to setup to dial rules for extension to use specific trunks

ie. when 1 is dialed then to use trunk1
if 2 is dialed then to use trunk2

how do i do this ?
my inbound was easy to setup
I’ve got stuck on outbounds.

all extension need to use both trunks as desired.

thank you

Hi,
I also have the same problem. I have 2 sip trunks (2 different voip providers) and also 1 dahdi trunk for pstn line ( i have installed an Openvox A400p with 1 FXO port ). The extensions communicate internally and accept incoming calls via incoming routes and ring groups. But how i will configure outbound routes and trunks
so that i can call from any extension and use any trunk that i want .
Thanks for your help

Hi,
i am trying to dial from an extension but the call fails.Incoming calls are ok. Here is my trunk configuration:

context=from-trunk
fromuser=30XXXXXXXXXX
username=30XXXXXXXXXX
host=voip.viva.gr
srvlookup=yes
insecure=port,invite
canreinvite=no
dtmfmode=rfc2833
t38pt_udptl=yes
nat=no
qualify=yes
type=peer
disallow=all
allow=g729&alaw&ulaw

sip show registry :

Host dnsmgr Username Refresh State
voip.viva.gr:5060 N MYUSERNAME 225 Registered Mon, 29 Apr 2013 12:46:29Registered

asterisk log:

2013-04-29 12:49:02] VERBOSE[1783][C-00000001] netsock2.c: == Using SIP RTP TOS bits 184
[2013-04-29 12:49:02] VERBOSE[1783][C-00000001] netsock2.c: == Using SIP RTP CoS mark 5
[2013-04-29 12:49:02] VERBOSE[1999][C-00000001] pbx.c: – Executing [[email protected]:1] ResetCDR(“SIP/205-00000001”, “”) in new stack
[2013-04-29 12:49:02] VERBOSE[1999][C-00000001] pbx.c: – Executing [[email protected]:2] NoCDR(“SIP/205-00000001”, “”) in new stack
[2013-04-29 12:49:02] VERBOSE[1999][C-00000001] pbx.c: – Executing [[email protected]:3] Progress(“SIP/205-00000001”, “”) in new stack
[2013-04-29 12:49:02] VERBOSE[1999][C-00000001] pbx.c: – Executing [[email protected]:4] Wait(“SIP/205-00000001”, “1”) in new stack
[2013-04-29 12:49:03] VERBOSE[1999][C-00000001] pbx.c: – Executing [[email protected]:5] Progress(“SIP/205-00000001”, “”) in new stack
[2013-04-29 12:49:03] VERBOSE[1999][C-00000001] pbx.c: – Executing [[email protected]:6] Playback(“SIP/205-00000001”, “silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer”) in new stack
[2013-04-29 12:49:03] VERBOSE[1999][C-00000001] file.c: – <SIP/205-00000001> Playing ‘silence/1.alaw’ (language ‘en’)
[2013-04-29 12:49:04] VERBOSE[1999][C-00000001] file.c: – <SIP/205-00000001> Playing ‘cannot-complete-as-dialed.alaw’ (language ‘en’)
[2013-04-29 12:49:07] VERBOSE[1999][C-00000001] file.c: – <SIP/205-00000001> Playing ‘check-number-dial-again.alaw’ (language ‘en’)
[2013-04-29 12:49:09] VERBOSE[1999][C-00000001] pbx.c: – Executing [[email protected]:7] Wait(“SIP/205-00000001”, “1”) in new stack
[2013-04-29 12:49:10] VERBOSE[1999][C-00000001] pbx.c: == Spawn extension (from-internal, 0035XXXXXXXXX, 7) exited non-zero on ‘SIP/205-00000001’
[2013-04-29 12:49:10] VERBOSE[1999][C-00000001] pbx.c: – Executing [[email protected]:1] Hangup(“SIP/205-00000001”, “”) in new stack
[2013-04-29 12:49:10] VERBOSE[1999][C-00000001] pbx.c: == Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/205-00000001’

Any help would be appreciated.

Check the prefix section of the dial pattern in the outbound route.