My provider instead of one SIP trunk with 20 channels and 20 numbers, i 'll have to configure 20 SIP trunks for each number.
That’s why i am confused and i dont know how to configure caller id on extension level, because if the trunk caller id is always prefered than the extension then i want be able to select extension caller-id am I right ?
Here is some logs from a call although i ve set up caller-id in extension level it is always getting the trunk number
το προ-διαμορφωμένο κείμενο να μπει σε εσοχή με 4 κενά
Asterisk 16.3.0, Copyright © 1999 - 2018, Digium, Inc. and others.
Created by Mark Spencer [email protected]
Asterisk comes with ABSOLUTELY NO WARRANTY; type ‘core show warranty’ for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type ‘core show license’ for details.
Connected to Asterisk 16.3.0 currently running on freepbx (pid = 11889)
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
== Extension Changed 735[ext-local] new state InUse for Notify User 701
== Extension Changed 735[ext-local] new state InUse for Notify User 711
== Extension Changed 735[ext-local] new state InUse for Notify User 704
== Extension Changed 735[ext-local] new state InUse for Notify User 705
– Executing [6979988513@from-internal:1] Macro(“SIP/735-000001a8”, “user-callerid,LIMIT”) in new stack
– Executing [s@macro-user-callerid:1] Set(“SIP/735-000001a8”, “TOUCH_MONITOR=1564821796.561”) in new stack
– Executing [s@macro-user-callerid:2] Set(“SIP/735-000001a8”, “AMPUSER=735”) in new stack
– Executing [s@macro-user-callerid:3] GotoIf(“SIP/735-000001a8”, “0?report”) in new stack
– Executing [s@macro-user-callerid:4] ExecIf(“SIP/735-000001a8”, “1?Set(REALCALLERIDNUM=735)”) in new stack
– Executing [s@macro-user-callerid:5] Set(“SIP/735-000001a8”, “AMPUSER=735”) in new stack
– Executing [s@macro-user-callerid:6] GotoIf(“SIP/735-000001a8”, “0?limit”) in new stack
– Executing [s@macro-user-callerid:7] Set(“SIP/735-000001a8”, “AMPUSERCIDNAME=Antonis Ntaragiannis”) in new stack
– Executing [s@macro-user-callerid:8] ExecIf(“SIP/735-000001a8”, “0?Set(__CIDMASQUERADING=TRUE)”) in new stack
– Executing [s@macro-user-callerid:9] GotoIf(“SIP/735-000001a8”, “0?report”) in new stack
– Executing [s@macro-user-callerid:10] Set(“SIP/735-000001a8”, “AMPUSERCID=735”) in new stack
– Executing [s@macro-user-callerid:11] Set(“SIP/735-000001a8”, “__DIAL_OPTIONS=Ttr”) in new stack
– Executing [s@macro-user-callerid:12] Set(“SIP/735-000001a8”, “CALLERID(all)=“Antonis Ntaragiannis” <735>”) in new stack
– Executing [s@macro-user-callerid:13] GotoIf(“SIP/735-000001a8”, “0?limit”) in new stack
– Executing [s@macro-user-callerid:14] ExecIf(“SIP/735-000001a8”, “1?Set(GROUP(concurrency_limit)=735)”) in new stack
– Executing [s@macro-user-callerid:15] ExecIf(“SIP/735-000001a8”, “0?Set(CHANNEL(language)=)”) in new stack
– Executing [s@macro-user-callerid:16] NoOp(“SIP/735-000001a8”, “Macro Depth is 1”) in new stack
– Executing [s@macro-user-callerid:17] GotoIf(“SIP/735-000001a8”, “1?report2:macroerror”) in new stack
– Goto (macro-user-callerid,s,18)
– Executing [s@macro-user-callerid:18] GotoIf(“SIP/735-000001a8”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,37)
– Executing [s@macro-user-callerid:37] Set(“SIP/735-000001a8”, “CALLERID(number)=735”) in new stack
– Executing [s@macro-user-callerid:38] Set(“SIP/735-000001a8”, “CALLERID(name)=Antonis Ntaragiannis”) in new stack
– Executing [s@macro-user-callerid:39] GotoIf(“SIP/735-000001a8”, “0?cnum”) in new stack
– Executing [s@macro-user-callerid:40] Set(“SIP/735-000001a8”, “CDR(cnam)=Antonis Ntaragiannis”) in new stack
– Executing [s@macro-user-callerid:41] Set(“SIP/735-000001a8”, “CDR(cnum)=735”) in new stack
– Executing [s@macro-user-callerid:42] Set(“SIP/735-000001a8”, “CHANNEL(language)=en”) in new stack
– Executing [6979988513@from-internal:2] Set(“SIP/735-000001a8”, “ROUTEUSER=735”) in new stack
– Executing [6979988513@from-internal:3] Set(“SIP/735-000001a8”, “ROUTEUSER=735”) in new stack
– Executing [6979988513@from-internal:4] GotoIf(“SIP/735-000001a8”, “1?notblind”) in new stack
– Goto (from-internal,6979988513,7)
– Executing [6979988513@from-internal:7] GotoIf(“SIP/735-000001a8”, “1?restrictedroute-c4ca4238a0b923820dcc509a6f75849b,6979988513,2:outbound-allroutes,6979988513,2”) in new stack
– Goto (restrictedroute-c4ca4238a0b923820dcc509a6f75849b,6979988513,2)
– Executing [6979988513@restrictedroute-c4ca4238a0b923820dcc509a6f75849b:2] Gosub(“SIP/735-000001a8”, “sub-record-check,s,1(out,6979988513,dontcare)”) in new stack
– Executing [s@sub-record-check:1] GotoIf(“SIP/735-000001a8”, “0?initialized”) in new stack
– Executing [s@sub-record-check:2] Set(“SIP/735-000001a8”, “__REC_STATUS=INITIALIZED”) in new stack
– Executing [s@sub-record-check:3] Set(“SIP/735-000001a8”, “NOW=1564821796”) in new stack
– Executing [s@sub-record-check:4] Set(“SIP/735-000001a8”, “__DAY=03”) in new stack
– Executing [s@sub-record-check:5] Set(“SIP/735-000001a8”, “__MONTH=08”) in new stack
– Executing [s@sub-record-check:6] Set(“SIP/735-000001a8”, “__YEAR=2019”) in new stack
– Executing [s@sub-record-check:7] Set(“SIP/735-000001a8”, “__TIMESTR=20190803-114316”) in new stack
– Executing [s@sub-record-check:8] Set(“SIP/735-000001a8”, “__FROMEXTEN=735”) in new stack
– Executing [s@sub-record-check:9] Set(“SIP/735-000001a8”, “__MON_FMT=wav”) in new stack
– Executing [s@sub-record-check:10] NoOp(“SIP/735-000001a8”, “Recordings initialized”) in new stack
– Executing [s@sub-record-check:11] ExecIf(“SIP/735-000001a8”, “0?Set(ARG3=dontcare)”) in new stack
– Executing [s@sub-record-check:12] Set(“SIP/735-000001a8”, “REC_POLICY_MODE_SAVE=”) in new stack
– Executing [s@sub-record-check:13] ExecIf(“SIP/735-000001a8”, “0?Set(REC_STATUS=NO)”) in new stack
– Executing [s@sub-record-check:14] GotoIf(“SIP/735-000001a8”, “3?checkaction”) in new stack
– Goto (sub-record-check,s,17)
– Executing [s@sub-record-check:17] GotoIf(“SIP/735-000001a8”, “1?sub-record-check,out,1”) in new stack
– Goto (sub-record-check,out,1)
– Executing [out@sub-record-check:1] NoOp(“SIP/735-000001a8”, “Outbound Recording Check from 735 to 6979988513”) in new stack
– Executing [out@sub-record-check:2] Set(“SIP/735-000001a8”, “RECMODE=dontcare”) in new stack
– Executing [out@sub-record-check:3] ExecIf(“SIP/735-000001a8”, “1?Goto(routewins)”) in new stack
– Goto (sub-record-check,out,7)
– Executing [out@sub-record-check:7] Gosub(“SIP/735-000001a8”, “recordcheck,1(dontcare,out,6979988513)”) in new stack
– Executing [recordcheck@sub-record-check:1] NoOp(“SIP/735-000001a8”, “Starting recording check against dontcare”) in new stack
– Executing [recordcheck@sub-record-check:2] Goto(“SIP/735-000001a8”, “dontcare”) in new stack
– Goto (sub-record-check,recordcheck,3)
– Executing [recordcheck@sub-record-check:3] Return(“SIP/735-000001a8”, “”) in new stack
– Executing [out@sub-record-check:8] Return(“SIP/735-000001a8”, “”) in new stack
– Executing [6979988513@restrictedroute-c4ca4238a0b923820dcc509a6f75849b:3] ExecIf(“SIP/735-000001a8”, “0 ?Set(CDR(accountcode)=)”) in new stack
– Executing [6979988513@restrictedroute-c4ca4238a0b923820dcc509a6f75849b:4] Set(“SIP/735-000001a8”, “MOHCLASS=default”) in new stack
– Executing [6979988513@restrictedroute-c4ca4238a0b923820dcc509a6f75849b:5] Set(“SIP/735-000001a8”, “_NODEST=”) in new stack
– Executing [6979988513@restrictedroute-c4ca4238a0b923820dcc509a6f75849b:6] Macro(“SIP/735-000001a8”, “dialout-trunk,2,6979988513,off”) in new stack
– Executing [s@macro-dialout-trunk:1] Set(“SIP/735-000001a8”, “DIAL_TRUNK=2”) in new stack
– Executing [s@macro-dialout-trunk:2] UserEvent(“SIP/735-000001a8”, “zulu-outbound-call,from:735,to:6979988513”) in new stack
– Executing [s@macro-dialout-trunk:3] ExecIf(“SIP/735-000001a8”, “0?Set(DIAL_OPTIONS=tr)”) in new stack
– Executing [s@macro-dialout-trunk:4] GosubIf(“SIP/735-000001a8”, “0?sub-pincheck,s,1()”) in new stack
– Executing [s@macro-dialout-trunk:5] ExecIf(“SIP/735-000001a8”, “0?Set(CALLERID(num)=735)”) in new stack
– Executing [s@macro-dialout-trunk:6] GotoIf(“SIP/735-000001a8”, “0?disabletrunk,1”) in new stack
– Executing [s@macro-dialout-trunk:7] Set(“SIP/735-000001a8”, “DIAL_NUMBER=6979988513”) in new stack
– Executing [s@macro-dialout-trunk:8] Set(“SIP/735-000001a8”, “DIAL_TRUNK_OPTIONS=Ttr”) in new stack
– Executing [s@macro-dialout-trunk:9] Set(“SIP/735-000001a8”, “OUTBOUND_GROUP=OUT_2”) in new stack
– Executing [s@macro-dialout-trunk:10] Set(“SIP/735-000001a8”, “DIAL_TRUNK_OPTIONS=T”) in new stack
– Executing [s@macro-dialout-trunk:11] GotoIf(“SIP/735-000001a8”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,13)
– Executing [s@macro-dialout-trunk:13] GotoIf(“SIP/735-000001a8”, “0?skipoutcid”) in new stack
– Executing [s@macro-dialout-trunk:14] Macro(“SIP/735-000001a8”, “outbound-callerid,2”) in new stack
– Executing [s@macro-outbound-callerid:1] NoOp(“SIP/735-000001a8”, “735”) in new stack
– Executing [s@macro-outbound-callerid:2] NoOp(“SIP/735-000001a8”, “”) in new stack
– Executing [s@macro-outbound-callerid:3] NoOp(“SIP/735-000001a8”, “off”) in new stack
– Executing [s@macro-outbound-callerid:4] ExecIf(“SIP/735-000001a8”, “0?Set(CALLERPRES(name-pres)=)”) in new stack
– Executing [s@macro-outbound-callerid:5] ExecIf(“SIP/735-000001a8”, “0?Set(CALLERPRES(num-pres)=)”) in new stack
– Executing [s@macro-outbound-callerid:6] ExecIf(“SIP/735-000001a8”, “0?Set(REALCALLERIDNUM=735)”) in new stack
– Executing [s@macro-outbound-callerid:7] ExecIf(“SIP/735-000001a8”, “0?Set(AMPUSER=735)”) in new stack
– Executing [s@macro-outbound-callerid:8] GotoIf(“SIP/735-000001a8”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,12)
– Executing [s@macro-outbound-callerid:12] Set(“SIP/735-000001a8”, “USEROUTCID=“Antonis Ntaragiannis”<+302351100637>”) in new stack
– Executing [s@macro-outbound-callerid:13] Set(“SIP/735-000001a8”, “EMERGENCYCID=”) in new stack
– Executing [s@macro-outbound-callerid:14] Set(“SIP/735-000001a8”, “TRUNKOUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:15] GotoIf(“SIP/735-000001a8”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,21)
– Executing [s@macro-outbound-callerid:21] ExecIf(“SIP/735-000001a8”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:22] ExecIf(“SIP/735-000001a8”, “1?Set(CALLERID(all)=“Antonis Ntaragiannis”<+302351100637>)”) in new stack
– Executing [s@macro-outbound-callerid:23] ExecIf(“SIP/735-000001a8”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:24] ExecIf(“SIP/735-000001a8”, “0?Set(CALLERPRES(name-pres)=prohib_passed_screen)”) in new stack
– Executing [s@macro-outbound-callerid:25] ExecIf(“SIP/735-000001a8”, “0?Set(CALLERPRES(num-pres)=prohib_passed_screen)”) in new stack
– Executing [s@macro-outbound-callerid:26] Set(“SIP/735-000001a8”, “CDR(outbound_cnum)=+302351100637”) in new stack
– Executing [s@macro-outbound-callerid:27] Set(“SIP/735-000001a8”, “CDR(outbound_cnam)=Antonis Ntaragiannis”) in new stack
– Executing [s@macro-dialout-trunk:15] GosubIf(“SIP/735-000001a8”, “0?sub-flp-2,s,1()”) in new stack
– Executing [s@macro-dialout-trunk:16] Set(“SIP/735-000001a8”, “OUTNUM=6979988513”) in new stack
– Executing [s@macro-dialout-trunk:17] Set(“SIP/735-000001a8”, “custom=DAHDI/g0”) in new stack
– Executing [s@macro-dialout-trunk:18] ExecIf(“SIP/735-000001a8”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)”) in new stack
– Executing [s@macro-dialout-trunk:19] ExecIf(“SIP/735-000001a8”, “0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))”) in new stack
– Executing [s@macro-dialout-trunk:20] Macro(“SIP/735-000001a8”, “dialout-trunk-predial-hook,”) in new stack
– Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“SIP/735-000001a8”, “”) in new stack
– Executing [s@macro-dialout-trunk:21] GotoIf(“SIP/735-000001a8”, “0?skipcrm”) in new stack
– Executing [s@macro-dialout-trunk:22] Set(“SIP/735-000001a8”, “__CRM_DIRECTION=OUTBOUND”) in new stack
– Executing [s@macro-dialout-trunk:23] Set(“SIP/735-000001a8”, “__CRM_DESTINATION=6979988513”) in new stack
– Executing [s@macro-dialout-trunk:24] Set(“SIP/735-000001a8”, “__CRM_SOURCE=735”) in new stack
– Executing [s@macro-dialout-trunk:25] AGI(“SIP/735-000001a8”, “sangomacrm.agi”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
– <SIP/735-000001a8>AGI Script sangomacrm.agi completed, returning 0
– Executing [s@macro-dialout-trunk:26] Set(“SIP/735-000001a8”, “CHANNEL(hangup_handler_push)=crm-hangup,s,1”) in new stack
– Executing [s@macro-dialout-trunk:27] NoOp(“SIP/735-000001a8”, “CRM Finished”) in new stack
– Executing [s@macro-dialout-trunk:28] GotoIf(“SIP/735-000001a8”, “0?bypass,1”) in new stack
– Executing [s@macro-dialout-trunk:29] ExecIf(“SIP/735-000001a8”, “1?Set(CONNECTEDLINE(num,i)=6979988513)”) in new stack
– Executing [s@macro-dialout-trunk:30] ExecIf(“SIP/735-000001a8”, “1?Set(CONNECTEDLINE(name,i)=CID:+302351100637)”) in new stack
– Executing [s@macro-dialout-trunk:31] ExecIf(“SIP/735-000001a8”, “0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)+302351100637)”) in new stack
– Executing [s@macro-dialout-trunk:32] GotoIf(“SIP/735-000001a8”, “0?customtrunk”) in new stack
– Executing [s@macro-dialout-trunk:33] Dial(“SIP/735-000001a8”, “DAHDI/g0/6979988513,300,Tb(func-apply-sipheaders^s^1,(2))”) in new stack
– DAHDI/i1/6979988513-7d Internal Gosub(func-apply-sipheaders,s,1(2)) start
– Executing [s@func-apply-sipheaders:1] ExecIf(“DAHDI/i1/6979988513-7d”, “0?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)”) in new stack
– Executing [s@func-apply-sipheaders:2] NoOp(“DAHDI/i1/6979988513-7d”, “Applying SIP Headers to channel DAHDI/i1/6979988513-7d”) in new stack
– Executing [s@func-apply-sipheaders:3] Set(“DAHDI/i1/6979988513-7d”, “TECH=DAHDI”) in new stack
– Executing [s@func-apply-sipheaders:4] Set(“DAHDI/i1/6979988513-7d”, “SIPHEADERKEYS=”) in new stack
– Executing [s@func-apply-sipheaders:5] While(“DAHDI/i1/6979988513-7d”, “0”) in new stack
– Jumping to priority 10
– Executing [s@func-apply-sipheaders:11] Return(“DAHDI/i1/6979988513-7d”, “”) in new stack
== Spawn extension (from-digital, 6979988513, 1) exited non-zero on ‘DAHDI/i1/6979988513-7d’
– DAHDI/i1/6979988513-7d Internal Gosub(func-apply-sipheaders,s,1(2)) complete GOSUB_RETVAL=
– Requested transfer capability: 0x00 - SPEECH
– Called DAHDI/g0/6979988513
– DAHDI/i1/6979988513-7d is proceeding passing it to SIP/735-000001a8
– DAHDI/i1/6979988513-7d is making progress passing it to SIP/735-000001a8
– DAHDI/i1/6979988513-7d is ringing
== Extension Changed 735[ext-local] new state Idle for Notify User 701
== Extension Changed 735[ext-local] new state Idle for Notify User 711
== Extension Changed 735[ext-local] new state Idle for Notify User 704
– Hungup ‘DAHDI/i1/6979988513-7d’
== Extension Changed 735[ext-local] new state Idle for Notify User 705
== Spawn extension (macro-dialout-trunk, s, 33) exited non-zero on ‘SIP/735-000001a8’ in macro ‘dialout-trunk’
== Spawn extension (restrictedroute-c4ca4238a0b923820dcc509a6f75849b, 6979988513, 6) exited non-zero on ‘SIP/735-000001a8’
– Executing [h@restrictedroute-c4ca4238a0b923820dcc509a6f75849b:1] Hangup(“SIP/735-000001a8”, “”) in new stack
== Spawn extension (restrictedroute-c4ca4238a0b923820dcc509a6f75849b, h, 1) exited non-zero on ‘SIP/735-000001a8’
– SIP/735-000001a8 Internal Gosub(crm-hangup,s,1) start
– Executing [s@crm-hangup:1] NoOp(“SIP/735-000001a8”, “Sending Hangup to CRM”) in new stack
– Executing [s@crm-hangup:2] NoOp(“SIP/735-000001a8”, “HANGUP CAUSE: 16”) in new stack
– Executing [s@crm-hangup:3] ExecIf(“SIP/735-000001a8”, “0?Set(__CRM_VOICEMAIL=)”) in new stack
– Executing [s@crm-hangup:4] NoOp(“SIP/735-000001a8”, “MASTER CHANNEL: 1564821796.561 = 1564821796.561”) in new stack
– Executing [s@crm-hangup:5] GotoIf(“SIP/735-000001a8”, “0?return”) in new stack
– Executing [s@crm-hangup:6] Set(“SIP/735-000001a8”, “__CRM_HANGUP=1”) in new stack
– Executing [s@crm-hangup:7] AGI(“SIP/735-000001a8”, “sangomacrm.agi”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
– <SIP/735-000001a8>AGI Script sangomacrm.agi completed, returning 0
– Executing [s@crm-hangup:8] Return(“SIP/735-000001a8”, “”) in new stack
== Spawn extension (restrictedroute-c4ca4238a0b923820dcc509a6f75849b, h, 1) exited non-zero on ‘SIP/735-000001a8’
– SIP/735-000001a8 Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=
freepbx*CLI>