I’m running asterisk version 1.4… I have 2 asterisk servers in two offices… asterisk servers are connected using a IAX trunk… All extensions are connected to the asterisk using SIP…
In this office B can call office A
but Office A can’t call Office B
the two offices are connected through openvpn… below is a simple diagram of the setup
sip client--------------office A asterisk----------office A gw--------------vpn-------------office b gw/asterisk---------sip client
below is the verbose output i get when i call office B from office A
– Executing [[email protected]:1] Macro(“SIP/1006-081eca50”, “user-callerid|SKIPTTL|”) in new stack
– Executing [[email protected]:1] NoOp(“SIP/1006-081eca50”, “user-callerid: device 1006”) in new stack
– Executing [[email protected]:2] Set(“SIP/1006-081eca50”, “AMPUSER=1006”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/1006-081eca50”, “0?report”) in new stack
– Executing [[email protected]:4] ExecIf(“SIP/1006-081eca50”, “1|Set|REALCALLERIDNUM=1006”) in new stack
– Executing [[email protected]:5] NoOp(“SIP/1006-081eca50”, “REALCALLERIDNUM is 1006”) in new stack
– Executing [[email protected]:6] Set(“SIP/1006-081eca50”, “AMPUSER=1006”) in new stack
– Executing [[email protected]:7] Set(“SIP/1006-081eca50”, “AMPUSERCIDNAME=xxxxx”) in new stack
– Executing [[email protected]:8] GotoIf(“SIP/1006-081eca50”, “0?report”) in new stack
– Executing [[email protected]:9] Set(“SIP/1006-081eca50”, “AMPUSERCID=1006”) in new stack
– Executing [[email protected]:10] Set(“SIP/1006-081eca50”, “CALLERID(all)=“xxxxxx” <1006>”) in new stack
– Executing [[email protected]:11] Set(“SIP/1006-081eca50”, “REALCALLERIDNUM=1006”) in new stack
– Executing [[email protected]:12] ExecIf(“SIP/1006-081eca50”, “0|Set|CHANNEL(language)=”) in new stack
– Executing [[email protected]:13] NoOp(“SIP/1006-081eca50”, “TTL: ARG1: SKIPTTL”) in new stack
– Executing [[email protected]:14] GotoIf(“SIP/1006-081eca50”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,23)
– Executing [[email protected]:23] NoOp(“SIP/1006-081eca50”, “Using CallerID “xxxxxx” <1006>”) in new stack
– Executing [[email protected]:2] Set(“SIP/1006-081eca50”, “_NODEST=”) in new stack
– Executing [[email protected]:3] Macro(“SIP/1006-081eca50”, “record-enable|1006|OUT|”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/1006-081eca50”, “0?2:4”) in new stack
– Goto (macro-record-enable,s,4)
– Executing [[email protected]:4] AGI(“SIP/1006-081eca50”, “recordingcheck|20080605-094249|1212655369.4”) in new stack
– Launched AGI Script /usr/share/asterisk/agi-bin/recordingcheck
recordingcheck|20080605-094249|1212655369.4: Outbound recording not enabled
– AGI Script recordingcheck completed, returning 0
– Executing [[email protected]:5] NoOp(“SIP/1006-081eca50”, “No recording needed”) in new stack
– Executing [[email protected]:4] Macro(“SIP/1006-081eca50”, “dialout-trunk|2|2001||”) in new stack
– Executing [[email protected]:1] Set(“SIP/1006-081eca50”, “DIAL_TRUNK=2”) in new stack
– Executing [[email protected]:2] ExecIf(“SIP/1006-081eca50”, “0|Authenticate|”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/1006-081eca50”, “0?disabletrunk|1”) in new stack
– Executing [[email protected]:4] Set(“SIP/1006-081eca50”, “DIAL_NUMBER=2001”) in new stack
– Executing [[email protected]:5] Set(“SIP/1006-081eca50”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
– Executing [[email protected]:6] Set(“SIP/1006-081eca50”, “GROUP()=OUT_2”) in new stack
– Executing [[email protected]:7] GotoIf(“SIP/1006-081eca50”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,9)
– Executing [[email protected]:9] GotoIf(“SIP/1006-081eca50”, “0?skipoutcid”) in new stack
– Executing [[email protected]:10] Set(“SIP/1006-081eca50”, “DIAL_TRUNK_OPTIONS=”) in new stack
– Executing [[email protected]:11] Macro(“SIP/1006-081eca50”, “outbound-callerid|2”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/1006-081eca50”, “1?start”) in new stack
– Goto (macro-outbound-callerid,s,3)
– Executing [[email protected]:3] NoOp(“SIP/1006-081eca50”, “REALCALLERIDNUM is 1006”) in new stack
– Executing [[email protected]:4] GotoIf(“SIP/1006-081eca50”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,9)
– Executing [[email protected]:9] Set(“SIP/1006-081eca50”, “USEROUTCID=”) in new stack
– Executing [[email protected]:10] Set(“SIP/1006-081eca50”, “EMERGENCYCID=”) in new stack
– Executing [[email protected]:11] Set(“SIP/1006-081eca50”, “TRUNKOUTCID=”) in new stack
– Executing [[email protected]:12] GotoIf(“SIP/1006-081eca50”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,16)
– Executing [[email protected]:16] GotoIf(“SIP/1006-081eca50”, “1?usercid”) in new stack
– Goto (macro-outbound-callerid,s,18)
– Executing [[email protected]:18] GotoIf(“SIP/1006-081eca50”, “1?report”) in new stack
– Goto (macro-outbound-callerid,s,22)
– Executing [[email protected]:22] NoOp(“SIP/1006-081eca50”, “CallerID set to “xxxxxx” <1006>”) in new stack
– Executing [[email protected]:12] AGI(“SIP/1006-081eca50”, “fixlocalprefix”) in new stack
– Launched AGI Script /usr/share/asterisk/agi-bin/fixlocalprefix
== fixlocalprefix: Dialpattern 2XXX matched. 2001 -> 2001
– AGI Script fixlocalprefix completed, returning 0
– Executing [[email protected]:13] Set(“SIP/1006-081eca50”, “OUTNUM=2001”) in new stack
– Executing [[email protected]:14] Set(“SIP/1006-081eca50”, “custom=IAX2/InterOffice”) in new stack
– Executing [[email protected]:15] GotoIf(“SIP/1006-081eca50”, “1?gocall”) in new stack
– Goto (macro-dialout-trunk,s,17)
– Executing [[email protected]:17] Macro(“SIP/1006-081eca50”, “dialout-trunk-predial-hook|”) in new stack
– Executing [[email protected]:18] GotoIf(“SIP/1006-081eca50”, “0?bypass|1”) in new stack
– Executing [[email protected]:19] GotoIf(“SIP/1006-081eca50”, “0?customtrunk”) in new stack
– Executing [[email protected]:20] Dial(“SIP/1006-081eca50”, “IAX2/InterOffice/2001|300|”) in new stack
– Called InterOffice/2001
– Call accepted by (format ulaw)
– Format for call is ulaw
– Hungup ‘IAX2/InterOffice-2’
– No one is available to answer at this time (1:0/0/0)
– Executing [[email protected]:21] Goto(“SIP/1006-081eca50”, “s-NOANSWER|1”) in new stack
– Goto (macro-dialout-trunk,s-NOANSWER,1)
– Executing [[email protected]:1] NoOp(“SIP/1006-081eca50”, “Dial failed due to trunk reporting NOANSWER - giving up”) in new stack
– Executing [[email protected]:2] PlayTones(“SIP/1006-081eca50”, “congestion”) in new stack
– Executing [[email protected]:3] Congestion(“SIP/1006-081eca50”, “20”) in new stack
== Spawn extension (macro-dialout-trunk, s-NOANSWER, 3) exited non-zero on ‘SIP/1006-081eca50’ in macro ‘dialout-trunk’
== Spawn extension (macro-dialout-trunk, s-NOANSWER, 3) exited non-zero on ‘SIP/1006-081eca50’
– Executing [[email protected]:1] Macro(“SIP/1006-081eca50”, “hangupcall|”) in new stack
– Executing [[email protected]:1] ResetCDR(“SIP/1006-081eca50”, “w”) in new stack
– Executing [[email protected]:2] NoCDR(“SIP/1006-081eca50”, “”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/1006-081eca50”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,6)
– Executing [[email protected]:6] GotoIf(“SIP/1006-081eca50”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [[email protected]:9] GotoIf(“SIP/1006-081eca50”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,11)
– Executing [[email protected]:11] Hangup(“SIP/1006-081eca50”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on ‘SIP/1006-081eca50’ in macro ‘hangupcall’
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on ‘SIP/1006-081eca50’
I still couldn’t figure out why its working only one way… any help regarding this really appreciate…
Thanks