DomeDan wrote:senate014 wrote:I've tried the following command:
sip show peers
My SIP trunk doesn't show, only my extensions.
That's a problem, look at the asterisk CLI and see if there is any errors with registration
Hi DomeDan,
Thanks for replying. Yeah it doesn't look through but I just presumed that the SIP Trunk wouldn't show because it's not actually authenicating with the provider because the authentication is simply done via the external IP address.
On my Trixbox server I have to include fromdomain=188.66.71.XX in the TRUNK config file as you can see below so it sends out the IP address that it's from to authenticate and make the call if I'm guessing right?:
type=friend
insecure=very
host=83.245.6.81
fromdomain=188.66.71.XX
context=from-trunk
canreinvite=no
This is the log I get from my Trixbox server when making an outbound call:
Connected to Asterisk 1.4.22-3 RPM by currently running on cspbx001 (pid = 2480)
Verbosity is at least 3
-- Executing [901423564XXX@from-internal:1] Macro("SIP/209-b7908af8", "user-callerid|SKIPTTL|") in new stack
-- Executing [s@macro-user-callerid:1] Set("SIP/209-b7908af8", "AMPUSER=209") in new stack
-- Executing [s@macro-user-callerid:2] GotoIf("SIP/209-b7908af8", "0?report") in new stack
-- Executing [s@macro-user-callerid:3] ExecIf("SIP/209-b7908af8", "1|Set|REALCALLERIDNUM=209") in new stack
-- Executing [s@macro-user-callerid:4] Set("SIP/209-b7908af8", "AMPUSER=209") in new stack
-- Executing [s@macro-user-callerid:5] Set("SIP/209-b7908af8", "AMPUSERCIDNAME=Andy Hughes") in new stack
-- Executing [s@macro-user-callerid:6] GotoIf("SIP/209-b7908af8", "0?report") in new stack
-- Executing [s@macro-user-callerid:7] Set("SIP/209-b7908af8", "AMPUSERCID=209") in new stack
-- Executing [s@macro-user-callerid:8] Set("SIP/209-b7908af8", "CALLERID(all)="Andy Hughes" <209>") in new stack
-- Executing [s@macro-user-callerid:9] ExecIf("SIP/209-b7908af8", "0|Set|CHANNEL(language)=") in new stack
-- Executing [s@macro-user-callerid:10] GotoIf("SIP/209-b7908af8", "1?continue") in new stack
-- Goto (macro-user-callerid,s,19)
-- Executing [s@macro-user-callerid:19] NoOp("SIP/209-b7908af8", "Using CallerID "Andy Hughes" <209>") in new stack
-- Executing [901423564XXX@from-internal:2] Set("SIP/209-b7908af8", "_NODEST=") in new stack
-- Executing [901423564XXX@from-internal:3] Macro("SIP/209-b7908af8", "record-enable|209|OUT|") in new stack
-- Executing [s@macro-record-enable:1] GotoIf("SIP/209-b7908af8", "1?check") in new stack
-- Goto (macro-record-enable,s,4)
-- Executing [s@macro-record-enable:4] AGI("SIP/209-b7908af8", "recordingcheck|20130718-151319|1374156799.2349") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck|20130718-151319|1374156799.2349: Outbound recording not enabled
-- AGI Script recordingcheck completed, returning 0
-- Executing [s@macro-record-enable:5] MacroExit("SIP/209-b7908af8", "") in new stack
-- Executing [901423564XXX@from-internal:4] Macro("SIP/209-b7908af8", "dialout-trunk|2|01423564XXX||") in new stack
-- Executing [s@macro-dialout-trunk:1] Set("SIP/209-b7908af8", "DIAL_TRUNK=2") in new stack
-- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/209-b7908af8", "0?sub-pincheck|s|1") in new stack
-- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/209-b7908af8", "0?disabletrunk|1") in new stack
-- Executing [s@macro-dialout-trunk:4] Set("SIP/209-b7908af8", "DIAL_NUMBER=01423564512") in new stack
-- Executing [s@macro-dialout-trunk:5] Set("SIP/209-b7908af8", "DIAL_TRUNK_OPTIONS=tr") in new stack
-- Executing [s@macro-dialout-trunk:6] Set("SIP/209-b7908af8", "OUTBOUND_GROUP=OUT_2") in new stack
-- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/209-b7908af8", "1?nomax") in new stack
-- Goto (macro-dialout-trunk,s,9)
-- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/209-b7908af8", "0?skipoutcid") in new stack
-- Executing [s@macro-dialout-trunk:10] Set("SIP/209-b7908af8", "DIAL_TRUNK_OPTIONS=") in new stack
-- Executing [s@macro-dialout-trunk:11] Macro("SIP/209-b7908af8", "outbound-callerid|2") in new stack
-- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/209-b7908af8", "0|SetCallerPres|") in new stack
-- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/209-b7908af8", "0|Set|REALCALLERIDNUM=209") in new stack
-- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/209-b7908af8", "1?normcid") in new stack
-- Goto (macro-outbound-callerid,s,6)
-- Executing [s@macro-outbound-callerid:6] Set("SIP/209-b7908af8", "USEROUTCID=") in new stack
-- Executing [s@macro-outbound-callerid:7] Set("SIP/209-b7908af8", "EMERGENCYCID=") in new stack
-- Executing [s@macro-outbound-callerid:8] Set("SIP/209-b7908af8", "TRUNKOUTCID=") in new stack
-- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/209-b7908af8", "1?trunkcid") in new stack
-- Goto (macro-outbound-callerid,s,12)
-- Executing [s@macro-outbound-callerid:12] ExecIf("SIP/209-b7908af8", "0|Set|CALLERID(all)=") in new stack
-- Executing [s@macro-outbound-callerid:13] ExecIf("SIP/209-b7908af8", "0|Set|CALLERID(all)=") in new stack
-- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/209-b7908af8", "0|SetCallerPres|prohib_passed_screen") in new stack
-- Executing [s@macro-dialout-trunk:12] ExecIf("SIP/209-b7908af8", "1|AGI|fixlocalprefix") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
-- AGI Script fixlocalprefix completed, returning 0
-- Executing [s@macro-dialout-trunk:13] Set("SIP/209-b7908af8", "OUTNUM=01423564512") in new stack
-- Executing [s@macro-dialout-trunk:14] Set("SIP/209-b7908af8", "custom=SIP/SIP01") in new stack
-- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/209-b7908af8", "0|Set|DIAL_TRUNK_OPTIONS=M(setmusic^)") in new stack
-- Executing [s@macro-dialout-trunk:16] Macro("SIP/209-b7908af8", "dialout-trunk-predial-hook|") in new stack
-- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/209-b7908af8", "") in new stack
-- Executing [s@macro-dialout-trunk:17] GotoIf("SIP/209-b7908af8", "0?bypass|1") in new stack
-- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/209-b7908af8", "0?customtrunk") in new stack
-- Executing [s@macro-dialout-trunk:19] Dial("SIP/209-b7908af8", "SIP/SIP01/01423564512|300|") in new stack
-- Called SIP01/01423564XXX
-- SIP/SIP01-0a23f368 is making progress passing it to SIP/209-b7908af8
== Spawn extension (macro-dialout-trunk, s, 19) exited non-zero on 'SIP/209-b7908af8' in macro 'dialout-trunk'
== Spawn extension (macro-dialout-trunk, s, 19) exited non-zero on 'SIP/209-b7908af8'
-- Executing [h@macro-dialout-trunk:1] Macro("SIP/209-b7908af8", "hangupcall|") in new stack
-- Executing [s@macro-hangupcall:1] GotoIf("SIP/209-b7908af8", "1?skiprg") in new stack
-- Goto (macro-hangupcall,s,4)
-- Executing [s@macro-hangupcall:4] GotoIf("SIP/209-b7908af8", "1?skipblkvm") in new stack
-- Goto (macro-hangupcall,s,7)
-- Executing [s@macro-hangupcall:7] GotoIf("SIP/209-b7908af8", "1?theend") in new stack
-- Goto (macro-hangupcall,s,9)
-- Executing [s@macro-hangupcall:9] Hangup("SIP/209-b7908af8", "") in new stack
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on 'SIP/209-b7908af8' in macro 'hangupcall'
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on 'SIP/209-b7908af8'