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 [2001@from-internal:1] Macro(“SIP/1006-081eca50”, “user-callerid|SKIPTTL|”) in new stack
– Executing [s@macro-user-callerid:1] NoOp(“SIP/1006-081eca50”, “user-callerid: device 1006”) in new stack
– Executing [s@macro-user-callerid:2] Set(“SIP/1006-081eca50”, “AMPUSER=1006”) in new stack
– Executing [s@macro-user-callerid:3] GotoIf(“SIP/1006-081eca50”, “0?report”) in new stack
– Executing [s@macro-user-callerid:4] ExecIf(“SIP/1006-081eca50”, “1|Set|REALCALLERIDNUM=1006”) in new stack
– Executing [s@macro-user-callerid:5] NoOp(“SIP/1006-081eca50”, “REALCALLERIDNUM is 1006”) in new stack
– Executing [s@macro-user-callerid:6] Set(“SIP/1006-081eca50”, “AMPUSER=1006”) in new stack
– Executing [s@macro-user-callerid:7] Set(“SIP/1006-081eca50”, “AMPUSERCIDNAME=xxxxx”) in new stack
– Executing [s@macro-user-callerid:8] GotoIf(“SIP/1006-081eca50”, “0?report”) in new stack
– Executing [s@macro-user-callerid:9] Set(“SIP/1006-081eca50”, “AMPUSERCID=1006”) in new stack
– Executing [s@macro-user-callerid:10] Set(“SIP/1006-081eca50”, “CALLERID(all)=“xxxxxx” <1006>”) in new stack
– Executing [s@macro-user-callerid:11] Set(“SIP/1006-081eca50”, “REALCALLERIDNUM=1006”) in new stack
– Executing [s@macro-user-callerid:12] ExecIf(“SIP/1006-081eca50”, “0|Set|CHANNEL(language)=”) in new stack
– Executing [s@macro-user-callerid:13] NoOp(“SIP/1006-081eca50”, “TTL: ARG1: SKIPTTL”) in new stack
– Executing [s@macro-user-callerid:14] GotoIf(“SIP/1006-081eca50”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,23)
– Executing [s@macro-user-callerid:23] NoOp(“SIP/1006-081eca50”, “Using CallerID “xxxxxx” <1006>”) in new stack
– Executing [2001@from-internal:2] Set(“SIP/1006-081eca50”, “_NODEST=”) in new stack
– Executing [2001@from-internal:3] Macro(“SIP/1006-081eca50”, “record-enable|1006|OUT|”) in new stack
– Executing [s@macro-record-enable:1] GotoIf(“SIP/1006-081eca50”, “0?2:4”) in new stack
– Goto (macro-record-enable,s,4)
– Executing [s@macro-record-enable: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 [s@macro-record-enable:5] NoOp(“SIP/1006-081eca50”, “No recording needed”) in new stack
– Executing [2001@from-internal:4] Macro(“SIP/1006-081eca50”, “dialout-trunk|2|2001||”) in new stack
– Executing [s@macro-dialout-trunk:1] Set(“SIP/1006-081eca50”, “DIAL_TRUNK=2”) in new stack
– Executing [s@macro-dialout-trunk:2] ExecIf(“SIP/1006-081eca50”, “0|Authenticate|”) in new stack
– Executing [s@macro-dialout-trunk:3] GotoIf(“SIP/1006-081eca50”, “0?disabletrunk|1”) in new stack
– Executing [s@macro-dialout-trunk:4] Set(“SIP/1006-081eca50”, “DIAL_NUMBER=2001”) in new stack
– Executing [s@macro-dialout-trunk:5] Set(“SIP/1006-081eca50”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
– Executing [s@macro-dialout-trunk:6] Set(“SIP/1006-081eca50”, “GROUP()=OUT_2”) in new stack
– Executing [s@macro-dialout-trunk:7] GotoIf(“SIP/1006-081eca50”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,9)
– Executing [s@macro-dialout-trunk:9] GotoIf(“SIP/1006-081eca50”, “0?skipoutcid”) in new stack
– Executing [s@macro-dialout-trunk:10] Set(“SIP/1006-081eca50”, “DIAL_TRUNK_OPTIONS=”) in new stack
– Executing [s@macro-dialout-trunk:11] Macro(“SIP/1006-081eca50”, “outbound-callerid|2”) in new stack
– Executing [s@macro-outbound-callerid:1] GotoIf(“SIP/1006-081eca50”, “1?start”) in new stack
– Goto (macro-outbound-callerid,s,3)
– Executing [s@macro-outbound-callerid:3] NoOp(“SIP/1006-081eca50”, “REALCALLERIDNUM is 1006”) in new stack
– Executing [s@macro-outbound-callerid:4] GotoIf(“SIP/1006-081eca50”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,9)
– Executing [s@macro-outbound-callerid:9] Set(“SIP/1006-081eca50”, “USEROUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:10] Set(“SIP/1006-081eca50”, “EMERGENCYCID=”) in new stack
– Executing [s@macro-outbound-callerid:11] Set(“SIP/1006-081eca50”, “TRUNKOUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:12] GotoIf(“SIP/1006-081eca50”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,16)
– Executing [s@macro-outbound-callerid:16] GotoIf(“SIP/1006-081eca50”, “1?usercid”) in new stack
– Goto (macro-outbound-callerid,s,18)
– Executing [s@macro-outbound-callerid:18] GotoIf(“SIP/1006-081eca50”, “1?report”) in new stack
– Goto (macro-outbound-callerid,s,22)
– Executing [s@macro-outbound-callerid:22] NoOp(“SIP/1006-081eca50”, “CallerID set to “xxxxxx” <1006>”) in new stack
– Executing [s@macro-dialout-trunk: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 [s@macro-dialout-trunk:13] Set(“SIP/1006-081eca50”, “OUTNUM=2001”) in new stack
– Executing [s@macro-dialout-trunk:14] Set(“SIP/1006-081eca50”, “custom=IAX2/InterOffice”) in new stack
– Executing [s@macro-dialout-trunk:15] GotoIf(“SIP/1006-081eca50”, “1?gocall”) in new stack
– Goto (macro-dialout-trunk,s,17)
– Executing [s@macro-dialout-trunk:17] Macro(“SIP/1006-081eca50”, “dialout-trunk-predial-hook|”) in new stack
– Executing [s@macro-dialout-trunk:18] GotoIf(“SIP/1006-081eca50”, “0?bypass|1”) in new stack
– Executing [s@macro-dialout-trunk:19] GotoIf(“SIP/1006-081eca50”, “0?customtrunk”) in new stack
– Executing [s@macro-dialout-trunk: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 [s@macro-dialout-trunk:21] Goto(“SIP/1006-081eca50”, “s-NOANSWER|1”) in new stack
– Goto (macro-dialout-trunk,s-NOANSWER,1)
– Executing [s-NOANSWER@macro-dialout-trunk:1] NoOp(“SIP/1006-081eca50”, “Dial failed due to trunk reporting NOANSWER - giving up”) in new stack
– Executing [s-NOANSWER@macro-dialout-trunk:2] PlayTones(“SIP/1006-081eca50”, “congestion”) in new stack
– Executing [s-NOANSWER@macro-dialout-trunk: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 [h@macro-dialout-trunk:1] Macro(“SIP/1006-081eca50”, “hangupcall|”) in new stack
– Executing [s@macro-hangupcall:1] ResetCDR(“SIP/1006-081eca50”, “w”) in new stack
– Executing [s@macro-hangupcall:2] NoCDR(“SIP/1006-081eca50”, “”) in new stack
– Executing [s@macro-hangupcall:3] GotoIf(“SIP/1006-081eca50”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,6)
– Executing [s@macro-hangupcall:6] GotoIf(“SIP/1006-081eca50”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [s@macro-hangupcall:9] GotoIf(“SIP/1006-081eca50”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,11)
– Executing [s@macro-hangupcall: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