[quote=“david55”]The s on the incoming call is because of the type of service you have bought from your provider, and, in any case, that would be the DID number, not the caller ID.
The best way of setting up the trunk side is to ask your service provider. If they are providing a PABX service they should have a standard Asterisk configuration.
Without your Asterisk dialplan, and sip.conf contents, and verbose asterisk CLI output, it really is difficult to know what you are doing wrong.[/quote]
here is a outgoing call CLI with verbose 10
asterisk*CLI>
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
== Using SIP VRTP TOS bits 136
== Using SIP VRTP CoS mark 6
-- Executing [90500432981@from-internal:1] Macro("SIP/400000-0000001a", "user-callerid,SKIPTTL,") in new stack
-- Executing [s@macro-user-callerid:1] Set("SIP/400000-0000001a", "AMPUSER=400000") in new stack
-- Executing [s@macro-user-callerid:2] GotoIf("SIP/400000-0000001a", "0?report") in new stack
-- Executing [s@macro-user-callerid:3] ExecIf("SIP/400000-0000001a", "1?Set(REALCALLERIDNUM=400000)") in new stack
-- Executing [s@macro-user-callerid:4] Set("SIP/400000-0000001a", "AMPUSER=400000") in new stack
-- Executing [s@macro-user-callerid:5] Set("SIP/400000-0000001a", "AMPUSERCIDNAME=400000") in new stack
-- Executing [s@macro-user-callerid:6] GotoIf("SIP/400000-0000001a", "0?report") in new stack
-- Executing [s@macro-user-callerid:7] Set("SIP/400000-0000001a", "AMPUSERCID=400000") in new stack
-- Executing [s@macro-user-callerid:8] Set("SIP/400000-0000001a", "CALLERID(all)="400000" <400000>") in new stack
-- Executing [s@macro-user-callerid:9] ExecIf("SIP/400000-0000001a", "0?Set(CHANNEL(language)=)") in new stack
-- Executing [s@macro-user-callerid:10] GotoIf("SIP/400000-0000001a", "1?continue") in new stack
-- Goto (macro-user-callerid,s,19)
-- Executing [s@macro-user-callerid:19] NoOp("SIP/400000-0000001a", "Using CallerID "400000" <400000>") in new stack
-- Executing [90500432981@from-internal:2] Set("SIP/400000-0000001a", "_NODEST=") in new stack
-- Executing [90500432981@from-internal:3] Macro("SIP/400000-0000001a", "record-enable,400000,OUT,") in new stack
-- Executing [s@macro-record-enable:1] GotoIf("SIP/400000-0000001a", "1?check") in new stack
-- Goto (macro-record-enable,s,4)
-- Executing [s@macro-record-enable:4] AGI("SIP/400000-0000001a", "recordingcheck,20110520-022331,1305847411.26") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck,20110520-022331,1305847411.26: Outbound recording not enabled
-- <SIP/400000-0000001a>AGI Script recordingcheck completed, returning 0
-- Executing [s@macro-record-enable:5] MacroExit("SIP/400000-0000001a", "") in new stack
-- Executing [90500432981@from-internal:4] Macro("SIP/400000-0000001a", "dialout-trunk,2,0500432981,,") in new stack
-- Executing [s@macro-dialout-trunk:1] Set("SIP/400000-0000001a", "DIAL_TRUNK=2") in new stack
-- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/400000-0000001a", "0?sub-pincheck,s,1") in new stack
-- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/400000-0000001a", "0?disabletrunk,1") in new stack
-- Executing [s@macro-dialout-trunk:4] Set("SIP/400000-0000001a", "DIAL_NUMBER=0500432981") in new stack
-- Executing [s@macro-dialout-trunk:5] Set("SIP/400000-0000001a", "DIAL_TRUNK_OPTIONS=tr") in new stack
-- Executing [s@macro-dialout-trunk:6] Set("SIP/400000-0000001a", "OUTBOUND_GROUP=OUT_2") in new stack
-- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/400000-0000001a", "1?nomax") in new stack
-- Goto (macro-dialout-trunk,s,9)
-- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/400000-0000001a", "0?skipoutcid") in new stack
-- Executing [s@macro-dialout-trunk:10] Set("SIP/400000-0000001a", "DIAL_TRUNK_OPTIONS=") in new stack
-- Executing [s@macro-dialout-trunk:11] Macro("SIP/400000-0000001a", "outbound-callerid,2") in new stack
-- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/400000-0000001a", "0?Set(CALLERPRES()=)") in new stack
-- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/400000-0000001a", "0?Set(REALCALLERIDNUM=400000)") in new stack
-- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/400000-0000001a", "1?normcid") in new stack
-- Goto (macro-outbound-callerid,s,6)
-- Executing [s@macro-outbound-callerid:6] Set("SIP/400000-0000001a", "USEROUTCID=") in new stack
-- Executing [s@macro-outbound-callerid:7] Set("SIP/400000-0000001a", "EMERGENCYCID=") in new stack
-- Executing [s@macro-outbound-callerid:8] Set("SIP/400000-0000001a", "TRUNKOUTCID=") in new stack
-- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/400000-0000001a", "1?trunkcid") in new stack
-- Goto (macro-outbound-callerid,s,12)
-- Executing [s@macro-outbound-callerid:12] ExecIf("SIP/400000-0000001a", "0?Set(CALLERID(all)=)") in new stack
-- Executing [s@macro-outbound-callerid:13] ExecIf("SIP/400000-0000001a", "0?Set(CALLERID(all)=)") in new stack
-- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/400000-0000001a", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
-- Executing [s@macro-dialout-trunk:12] ExecIf("SIP/400000-0000001a", "1?AGI(fixlocalprefix)") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
> fixlocalprefix: Using pattern 9|2020
> fixlocalprefix: Using pattern 9|XXXXXXXXXX
> fixlocalprefix: Using pattern 9|XXXXXXXXXXX
-- <SIP/400000-0000001a>AGI Script fixlocalprefix completed, returning 0
-- Executing [s@macro-dialout-trunk:13] Set("SIP/400000-0000001a", "OUTNUM=0500432981") in new stack
-- Executing [s@macro-dialout-trunk:14] Set("SIP/400000-0000001a", "custom=SIP/sipXTrunk") in new stack
-- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/400000-0000001a", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^))") in new stack
-- Executing [s@macro-dialout-trunk:16] Macro("SIP/400000-0000001a", "dialout-trunk-predial-hook,") in new stack
-- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/400000-0000001a", "") in new stack
-- Executing [s@macro-dialout-trunk:17] GotoIf("SIP/400000-0000001a", "0?bypass,1") in new stack
-- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/400000-0000001a", "0?customtrunk") in new stack
-- Executing [s@macro-dialout-trunk:19] Dial("SIP/400000-0000001a", "SIP/sipXTrunk/0500432981,300,") in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
== Using SIP VRTP TOS bits 136
== Using SIP VRTP CoS mark 6
-- Called sipXTrunk/0500432981
<< [ TYPE: Control (4) SUBCLASS: Congestion (8) ] [SIP/sipXTrunk-0000001b]
-- SIP/sipXTrunk-0000001b is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
-- Executing [s@macro-dialout-trunk:20] Goto("SIP/400000-0000001a", "s-CONGESTION,1") in new stack
-- Goto (macro-dialout-trunk,s-CONGESTION,1)
-- Executing [s-CONGESTION@macro-dialout-trunk:1] GotoIf("SIP/400000-0000001a", "1?noreport") in new stack
-- Goto (macro-dialout-trunk,s-CONGESTION,3)
-- Executing [s-CONGESTION@macro-dialout-trunk:3] NoOp("SIP/400000-0000001a", "TRUNK Dial failed due to CONGESTION - failing through to other trunks") in new stack
-- Executing [90500432981@from-internal:5] Macro("SIP/400000-0000001a", "outisbusy,") in new stack
-- Executing [s@macro-outisbusy:1] Playback("SIP/400000-0000001a", "all-circuits-busy-now,noanswer") in new stack
-- <SIP/400000-0000001a> Playing 'all-circuits-busy-now.ulaw' (language 'en')
<< [ TYPE: Null Frame (5) SUBCLASS: N/A (0) ] [SIP/400000-0000001a]
-- Executing [s@macro-outisbusy:2] Playback("SIP/400000-0000001a", "pls-try-call-later,noanswer") in new stack
-- <SIP/400000-0000001a> Playing 'pls-try-call-later.ulaw' (language 'en')
<< [ TYPE: Null Frame (5) SUBCLASS: N/A (0) ] [SIP/400000-0000001a]
-- Executing [s@macro-outisbusy:3] Macro("SIP/400000-0000001a", "hangupcall") in new stack
-- Executing [s@macro-hangupcall:1] GotoIf("SIP/400000-0000001a", "1?skiprg") in new stack
-- Goto (macro-hangupcall,s,4)
-- Executing [s@macro-hangupcall:4] GotoIf("SIP/400000-0000001a", "1?skipblkvm") in new stack
-- Goto (macro-hangupcall,s,7)
-- Executing [s@macro-hangupcall:7] GotoIf("SIP/400000-0000001a", "1?theend") in new stack
-- Goto (macro-hangupcall,s,9)
-- Executing [s@macro-hangupcall:9] Hangup("SIP/400000-0000001a", "") in new stack
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on 'SIP/400000-0000001a' in macro 'hangupcall'
== Spawn extension (macro-outisbusy, s, 3) exited non-zero on 'SIP/400000-0000001a' in macro 'outisbusy'
== Spawn extension (from-internal, 90500432981, 5) exited non-zero on 'SIP/400000-0000001a'
-- Executing [h@from-internal:1] Macro("SIP/400000-0000001a", "hangupcall") in new stack
-- Executing [s@macro-hangupcall:1] GotoIf("SIP/400000-0000001a", "1?skiprg") in new stack
-- Goto (macro-hangupcall,s,4)
-- Executing [s@macro-hangupcall:4] GotoIf("SIP/400000-0000001a", "1?skipblkvm") in new stack
-- Goto (macro-hangupcall,s,7)
-- Executing [s@macro-hangupcall:7] GotoIf("SIP/400000-0000001a", "1?theend") in new stack
-- Goto (macro-hangupcall,s,9)
-- Executing [s@macro-hangupcall:9] Hangup("SIP/400000-0000001a", "") in new stack
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on 'SIP/400000-0000001a' in macro 'hangupcall'
== Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/400000-0000001a'
asterisk*CLI>