2 boxes conneted via SIP trunks, one has analog card, i want the other box to dial out through the analog lines.!

i have 2 Asterisk boxes, Box A and Box B, connected via SIP trunks, internal calls from users registered on BOX A to users registered on BOX B are working very fine, and vice verca.

My Issue is that only Box A have and analog card and connected external phone lines.
So i want users on Box B to be able to dial out through the lines connected to the analog card on Box A.

I have setup up am out bound route on Box B with the needed dial pattern, but its not working, it keeps telling me the specified number cannot be dialed.

sent you an email, got it?

could you shoot me an email at u n g e r f i e l d a t G m a i l dot C 0 M then I can send you screen shots and other attachments. This forum is pretty tedious.

I checked out PFSense, downloaded the VMware Appliance and it seems promising!
You want the outbound dial rules in the dial rules section; is that from the freepbx gui web interface?
or from the .conf files?

on box b i have a very simple outbound dial rule, every number that with a prefix 11 will be directed to the SIP trunk between box b and box a.

do you think the problem might be with SIP trunks? and it might work better with IAX2 trunks?

can you explain to me your logic when you connected the boxes with IPsec and dialed out from the remote office?

Thanks!

additionally my question is, when box a receives the number that we wish to call, how does he read it and know that he should direct it to the analog lines?

I’m using PFSense as my firewall and I would very much recommend it. PSFense is a FreeBSD based Unix firewall… Open source , free and has commercial support if wanted.

On Box B (branch office) could you show me your outbound dial rules in the “Dial Rules” section.

The telco which serices one of our branch offices messed up on an office move day and at the last minute I created a IPSec VPN tunnel between the two offices in two different cities. I then set up iax2 peer trunks between the two offices and the remote was able to dial out through our T1 connection.

So yes it can be done and it’s normal for asterisk.

I’ll look at the dial plan when I get back t the office

I would really appreciate your time to look into my issue, keep in mind im on SIP trunks, we are also working on IPsec VPN to connect our offices in different cities,
can you tell me how you set up the IPsec VPN, is it linux based? we tried with openswan on Ubuntu but no success till now.

Thanks again.

and this is what happens at the same time on box a:
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [[email protected]:1] ResetCDR(“SIP/user239-0000000a”, “”) in new stack
– Executing [[email protected]:2] NoCDR(“SIP/user239-0000000a”, “”) in new stack
– Executing [[email protected]:3] Progress(“SIP/user239-0000000a”, “”) in new stack
– Executing [[email protected]:4] Wait(“SIP/user239-0000000a”, “1”) in new stack
– Executing [[email protected]:5] Progress(“SIP/user239-0000000a”, “”) in new stack
– Executing [[email protected]:6] Playback(“SIP/user239-0000000a”, “silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer”) in new stack
– <SIP/user239-0000000a> Playing ‘silence/1.ulaw’ (language ‘en’)
– <SIP/user239-0000000a> Playing ‘cannot-complete-as-dialed.gsm’ (language ‘en’)
– <SIP/user239-0000000a> Playing ‘check-number-dial-again.gsm’ (language ‘en’)
– Executing [[email protected]:7] Wait(“SIP/user239-0000000a”, “1”) in new stack
– Executing [[email protected]:8] Congestion(“SIP/user239-0000000a”, “20”) in new stack
== Spawn extension (from-internal, 01325880, 8) exited non-zero on ‘SIP/user239-0000000a’
– Executing [[email protected]:1] Macro(“SIP/user239-0000000a”, “hangupcall”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/user239-0000000a”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,4)
– Executing [[email protected]:4] GotoIf(“SIP/user239-0000000a”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [[email protected]:7] GotoIf(“SIP/user239-0000000a”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [[email protected]:9] Hangup(“SIP/user239-0000000a”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘SIP/user239-0000000a’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero o

Hi tadpole,

i hope you can help me on this one, i really need it for my project.

You should post a diagnostic output of what is going on. But first what what are the dial rules for box b.

Well first,

Is it possible in general to dial out through the pstn lines of Box a from a user registered on Box B?

What dial rules u want exactly, the outbound route rule that i configure on freepbx web interface or the contents of a certain .conf file?

currently i have a rule that will direct any calls starting with prefix 11 to the trunk from box b to box a,
i dialed a number from box b and this was the result:
onnected to Asterisk 1.6.2.7 currently running on localhost (pid = 3173)
Verbosity is at least 40
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [[email protected]:1] Macro(“SIP/2000-00000086”, “user-callerid,SKIPTTL,”) in new stack
– Executing [[email protected]:1] Set(“SIP/2000-00000086”, “AMPUSER=2000”) in new stack
– Executing [[email protected]:2] GotoIf(“SIP/2000-00000086”, “0?report”) in new stack
– Executing [[email protected]:3] ExecIf(“SIP/2000-00000086”, “1?Set(REALCALLERIDNUM=2000)”) in new stack
– Executing [[email protected]:4] Set(“SIP/2000-00000086”, “AMPUSER=2000”) in new stack
– Executing [[email protected]:5] Set(“SIP/2000-00000086”, “AMPUSERCIDNAME=NavLink Test”) in new stack
– Executing [[email protected]:6] GotoIf(“SIP/2000-00000086”, “0?report”) in new stack
– Executing [[email protected]:7] Set(“SIP/2000-00000086”, “AMPUSERCID=2000”) in new stack
– Executing [[email protected]:8] Set(“SIP/2000-00000086”, “CALLERID(all)=“NavLink Test” <2000>”) in new stack
– Executing [[email protected]:9] ExecIf(“SIP/2000-00000086”, “0?Set(CHANNEL(language)=)”) in new stack
– Executing [[email protected]:10] GotoIf(“SIP/2000-00000086”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,19)
– Executing [[email protected]:19] NoOp(“SIP/2000-00000086”, “Using CallerID “NavLink Test” <2000>”) in new stack
– Executing [[email protected]:2] NoOp(“SIP/2000-00000086”, “Calling Out Route: RemoteDial28”) in new stack
– Executing [[email protected]:3] Set(“SIP/2000-00000086”, “MOHCLASS=default”) in new stack
– Executing [[email protected]:4] Set(“SIP/2000-00000086”, “_NODEST=”) in new stack
– Executing [[email protected]:5] Macro(“SIP/2000-00000086”, “record-enable,2000,OUT,”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/2000-00000086”, “1?check”) in new stack
– Goto (macro-record-enable,s,4)
– Executing [[email protected]:4] ExecIf(“SIP/2000-00000086”, “0?MacroExit()”) in new stack
– Executing [[email protected]:5] GotoIf(“SIP/2000-00000086”, “0?Group:OUT”) in new stack
– Goto (macro-record-enable,s,15)
– Executing [[email protected]:15] GotoIf(“SIP/2000-00000086”, “0?IN”) in new stack
– Executing [[email protected]:16] ExecIf(“SIP/2000-00000086”, “1?MacroExit()”) in new stack
– Executing [[email protected]:6] Macro(“SIP/2000-00000086”, “dialout-trunk,4,01325880,”) in new stack
– Executing [[email protected]:1] Set(“SIP/2000-00000086”, “DIAL_TRUNK=4”) in new stack
– Executing [[email protected]:2] GosubIf(“SIP/2000-00000086”, “0?sub-pincheck,s,1”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/2000-00000086”, “0?disabletrunk,1”) in new stack
– Executing [[email protected]:4] Set(“SIP/2000-00000086”, “DIAL_NUMBER=01325880”) in new stack
– Executing [[email protected]:5] Set(“SIP/2000-00000086”, “DIAL_TRUNK_OPTIONS=”) in new stack
– Executing [[email protected]:6] Set(“SIP/2000-00000086”, “OUTBOUND_GROUP=OUT_4”) in new stack
– Executing [[email protected]:7] GotoIf(“SIP/2000-00000086”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,9)
– Executing [[email protected]:9] GotoIf(“SIP/2000-00000086”, “0?skipoutcid”) in new stack
– Executing [[email protected]:10] Set(“SIP/2000-00000086”, “DIAL_TRUNK_OPTIONS=”) in new stack
– Executing [[email protected]:11] Macro(“SIP/2000-00000086”, “outbound-callerid,4”) in new stack
– Executing [[email protected]:1] ExecIf(“SIP/2000-00000086”, “0?Set(CALLERPRES()=)”) in new stack
– Executing [[email protected]:2] ExecIf(“SIP/2000-00000086”, “0?Set(REALCALLERIDNUM=2000)”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/2000-00000086”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,6)
– Executing [[email protected]:6] Set(“SIP/2000-00000086”, “USEROUTCID=”) in new stack
– Executing [[email protected]:7] Set(“SIP/2000-00000086”, “EMERGENCYCID=”) in new stack
– Executing [[email protected]:8] Set(“SIP/2000-00000086”, “TRUNKOUTCID=”) in new stack
– Executing [[email protected]:9] GotoIf(“SIP/2000-00000086”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,12)
– Executing [[email protected]:12] ExecIf(“SIP/2000-00000086”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [[email protected]:13] ExecIf(“SIP/2000-00000086”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [[email protected]:14] ExecIf(“SIP/2000-00000086”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [[email protected]:15] ExecIf(“SIP/2000-00000086”, “0?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
– Executing [[email protected]:12] GosubIf(“SIP/2000-00000086”, “0?sub-flp-4,s,1”) in new stack
– Executing [[email protected]:13] Set(“SIP/2000-00000086”, “OUTNUM=01325880”) in new stack
– Executing [[email protected]:14] Set(“SIP/2000-00000086”, “custom=SIP/peer28”) in new stack
– Executing [[email protected]:15] ExecIf(“SIP/2000-00000086”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default))”) in new stack
– Executing [[email protected]:16] Macro(“SIP/2000-00000086”, “dialout-trunk-predial-hook,”) in new stack
– Executing [[email protected]:1] MacroExit(“SIP/2000-00000086”, “”) in new stack
– Executing [[email protected]:17] GotoIf(“SIP/2000-00000086”, “0?bypass,1”) in new stack
– Executing [[email protected]:18] GotoIf(“SIP/2000-00000086”, “0?customtrunk”) in new stack
– Executing [[email protected]:19] Dial(“SIP/2000-00000086”, “SIP/peer28/01325880,300,”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called peer28/01325880
– SIP/peer28-00000087 is making progress passing it to SIP/2000-00000086
== Spawn extension (macro-dialout-trunk, s, 19) exited non-zero on ‘SIP/2000-00000086’ in macro ‘dialout-trunk’
== Spawn extension (from-internal, 1101325880, 6) exited non-zero on ‘SIP/2000-00000086’
– Executing [[email protected]:1] Macro(“SIP/2000-00000086”, “hangupcall”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/2000-00000086”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,4)
– Executing [[email protected]:4] GotoIf(“SIP/2000-00000086”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [[email protected]:7] GotoIf(“SIP/2000-00000086”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [[email protected]:9] Hangup(“SIP/2000-00000086”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘SIP/2000-00000086’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/2000-00000086’

Hi,
My Trunk settings:
[peer28]
host=192.168.1.28
username=user239
fromuser=user239
secret=navlink
type=peer
qualify=yes
sendrpid=yes
context=from-trunk-sip-peer28

[user28]
secret=navlink
type=friend
context=from-internal
trustrpid=yes

as for the outbound route
i put 9 as the prefix so whenever someone want to call an outside line, he uses 9.

my logic in solving this was to make an outbound route that throw the calls on the trunk to Box A and on Box A an inbound route that will direct the call to the Zap Trunk, but for some reason it didn’t work.

Appreciate your help,

What are your trunk settings to box A ?
What are your outbound routes to box A ?