chan-sccp / sccp_manager

SCCP Manager
21 stars 13 forks source link

outbound CID also used for internal calls #70

Open hboetes opened 3 years ago

hboetes commented 3 years ago

I just noticed, if I set the outbound CID for an SCCP phone, internal calls from that phone also get that CID.

Here is the debug log from a call, with the external number replaced with XXXXX

root@asterix ~ # asterisk -rvvvvv
Asterisk 13.38.3, Copyright (C) 1999 - 2014, Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
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.
=========================================================================
Please note that this version of Asterisk no longer receives bug fixes.
Consult the following URL for Asterisk version support status information:
https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions
=========================================================================
Connected to Asterisk 13.38.3 currently running on asterix (pid = 19584)
  == Using SCCP RTP TOS bits 184
  == Using SCCP RTP CoS mark 6
    -- Executing [148@from-internal:1] GotoIf("SCCP/147-000000B7", "0?ext-local,148,1:followme-check,148,1") in new stack
    -- Goto (followme-check,148,1)
    -- Executing [148@followme-check:1] Gosub("SCCP/147-000000B7", "followme-sub,148,1()") in new stack
    -- Executing [148@followme-sub:1] GotoIf("SCCP/147-000000B7", "0?skipclid") in new stack
    -- Executing [148@followme-sub:2] Macro("SCCP/147-000000B7", "user-callerid,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("SCCP/147-000000B7", "TOUCH_MONITOR=1634814401.510") in new stack
    -- Executing [s@macro-user-callerid:2] Set("SCCP/147-000000B7", "CHANCONTEXT=") in new stack
    -- Executing [s@macro-user-callerid:3] Set("SCCP/147-000000B7", "CHANCONTEXT=") in new stack
    -- Executing [s@macro-user-callerid:4] Set("SCCP/147-000000B7", "CHANEXTENCONTEXT=147-000000B7") in new stack
    -- Executing [s@macro-user-callerid:5] Set("SCCP/147-000000B7", "CHANEXTEN=147-000000B7") in new stack
    -- Executing [s@macro-user-callerid:6] Set("SCCP/147-000000B7", "CALLERID(number)="Han Boetes" <0XXXXX147") in new stack
    -- Executing [s@macro-user-callerid:7] Set("SCCP/147-000000B7", "AMPUSER=Han Boetes <0XXXXX147") in new stack
    -- Executing [s@macro-user-callerid:8] Set("SCCP/147-000000B7", "HOTDESCKCHAN=147-000000B7") in new stack
    -- Executing [s@macro-user-callerid:9] Set("SCCP/147-000000B7", "HOTDESKEXTEN=147") in new stack
    -- Executing [s@macro-user-callerid:10] Set("SCCP/147-000000B7", "HOTDESKCALL=0") in new stack
    -- Executing [s@macro-user-callerid:11] ExecIf("SCCP/147-000000B7", "0?Set(HOTDESKCALL=1)") in new stack
    -- Executing [s@macro-user-callerid:12] ExecIf("SCCP/147-000000B7", "0?Set(CALLERID(name)=)") in new stack
    -- Executing [s@macro-user-callerid:13] GotoIf("SCCP/147-000000B7", "0?report") in new stack
    -- Executing [s@macro-user-callerid:14] ExecIf("SCCP/147-000000B7", "1?Set(REALCALLERIDNUM="Han Boetes" <0XXXXX147)") in new stack
    -- Executing [s@macro-user-callerid:15] Set("SCCP/147-000000B7", "AMPUSER=") in new stack
    -- Executing [s@macro-user-callerid:16] GotoIf("SCCP/147-000000B7", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:17] Set("SCCP/147-000000B7", "AMPUSERCIDNAME=") in new stack
    -- Executing [s@macro-user-callerid:18] ExecIf("SCCP/147-000000B7", "0?Set(__CIDMASQUERADING=TRUE)") in new stack
    -- Executing [s@macro-user-callerid:19] GotoIf("SCCP/147-000000B7", "1?report") in new stack
    -- Goto (macro-user-callerid,s,28)
    -- Executing [s@macro-user-callerid:28] NoOp("SCCP/147-000000B7", "Macro Depth is 1") in new stack
    -- Executing [s@macro-user-callerid:29] GotoIf("SCCP/147-000000B7", "1?report2:macroerror") in new stack
    -- Goto (macro-user-callerid,s,30)
    -- Executing [s@macro-user-callerid:30] GotoIf("SCCP/147-000000B7", "0?continue") in new stack
    -- Executing [s@macro-user-callerid:31] ExecIf("SCCP/147-000000B7", "1?Set(__CALLEE_ACCOUNCODE=)") in new stack
    -- Executing [s@macro-user-callerid:32] Set("SCCP/147-000000B7", "__TTL=64") in new stack
    -- Executing [s@macro-user-callerid:33] GotoIf("SCCP/147-000000B7", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,49)
    -- Executing [s@macro-user-callerid:49] Set("SCCP/147-000000B7", "CALLERID(number)="Han Boetes" <0XXXXX147") in new stack
    -- Executing [s@macro-user-callerid:50] Set("SCCP/147-000000B7", "CALLERID(name)=Han Boetes") in new stack
    -- Executing [s@macro-user-callerid:51] GotoIf("SCCP/147-000000B7", "0?cnum") in new stack
    -- Executing [s@macro-user-callerid:52] Set("SCCP/147-000000B7", "CDR(cnam)=Han Boetes") in new stack
    -- Executing [s@macro-user-callerid:53] Set("SCCP/147-000000B7", "CDR(cnum)="Han Boetes" <0XXXXX147") in new stack
    -- Executing [s@macro-user-callerid:54] Set("SCCP/147-000000B7", "CHANNEL(language)=en") in new stack
    -- Executing [148@followme-sub:3] Set("SCCP/147-000000B7", "DIAL_OPTIONS=HhTtrI") in new stack
    -- Executing [148@followme-sub:4] Set("SCCP/147-000000B7", "CONNECTEDLINE(num,i)=148") in new stack
    -- Executing [148@followme-sub:5] Gosub("SCCP/147-000000B7", "sub-presencestate-display,s,1(148)") in new stack
    -- Executing [s@sub-presencestate-display:1] Goto("SCCP/147-000000B7", "state-not_set,1") in new stack
    -- Goto (sub-presencestate-display,state-not_set,1)
    -- Executing [state-not_set@sub-presencestate-display:1] Set("SCCP/147-000000B7", "PRESENCESTATE_DISPLAY=") in new stack
    -- Executing [state-not_set@sub-presencestate-display:2] Return("SCCP/147-000000B7", "") in new stack
    -- Executing [148@followme-sub:6] Set("SCCP/147-000000B7", "CONNECTEDLINE(name)=René Hirtenfelder") in new stack
    -- Executing [148@followme-sub:7] Set("SCCP/147-000000B7", "FM_DIALSTATUS=NOT_INUSE") in new stack
    -- Executing [148@followme-sub:8] Set("SCCP/147-000000B7", "__EXTTOCALL=148") in new stack
    -- Executing [148@followme-sub:9] Set("SCCP/147-000000B7", "__PICKUPMARK=148") in new stack
    -- Executing [148@followme-sub:10] Macro("SCCP/147-000000B7", "blkvm-setifempty,") in new stack
    -- Executing [s@macro-blkvm-setifempty:1] GotoIf("SCCP/147-000000B7", "1?init") in new stack
    -- Goto (macro-blkvm-setifempty,s,4)
    -- Executing [s@macro-blkvm-setifempty:4] Set("SCCP/147-000000B7", "__BLKVM_CHANNEL=SCCP/147-000000B7") in new stack
    -- Executing [s@macro-blkvm-setifempty:5] Set("SCCP/147-000000B7", "SHARED(BLKVM,SCCP/147-000000B7)=TRUE") in new stack
    -- Executing [s@macro-blkvm-setifempty:6] Set("SCCP/147-000000B7", "GOSUB_RETVAL=TRUE") in new stack
    -- Executing [s@macro-blkvm-setifempty:7] MacroExit("SCCP/147-000000B7", "") in new stack
    -- Executing [148@followme-sub:11] GotoIf("SCCP/147-000000B7", "1?skipov") in new stack
    -- Goto (followme-sub,148,14)
    -- Executing [148@followme-sub:14] Set("SCCP/147-000000B7", "RRNODEST=") in new stack
    -- Executing [148@followme-sub:15] Set("SCCP/147-000000B7", "__NODEST=148") in new stack
    -- Executing [148@followme-sub:16] GosubIf("SCCP/147-000000B7", "0?sub-fmsetcid,s,1()") in new stack
    -- Executing [148@followme-sub:17] GotoIf("SCCP/147-000000B7", "1?skipprepend") in new stack
    -- Goto (followme-sub,148,19)
    -- Executing [148@followme-sub:19] Set("SCCP/147-000000B7", "RecordMethod=Group") in new stack
    -- Executing [148@followme-sub:20] Gosub("SCCP/147-000000B7", "sub-record-check,s,1(exten,148,)") in new stack
    -- Executing [s@sub-record-check:1] GotoIf("SCCP/147-000000B7", "0?initialized") in new stack
    -- Executing [s@sub-record-check:2] Set("SCCP/147-000000B7", "__REC_STATUS=INITIALIZED") in new stack
    -- Executing [s@sub-record-check:3] Set("SCCP/147-000000B7", "NOW=1634814402") in new stack
    -- Executing [s@sub-record-check:4] Set("SCCP/147-000000B7", "__DAY=21") in new stack
    -- Executing [s@sub-record-check:5] Set("SCCP/147-000000B7", "__MONTH=10") in new stack
    -- Executing [s@sub-record-check:6] Set("SCCP/147-000000B7", "__YEAR=2021") in new stack
    -- Executing [s@sub-record-check:7] Set("SCCP/147-000000B7", "__TIMESTR=20211021-130642") in new stack
    -- Executing [s@sub-record-check:8] Set("SCCP/147-000000B7", "__FROMEXTEN=Han Boetes <0XXXXX147") in new stack
    -- Executing [s@sub-record-check:9] Set("SCCP/147-000000B7", "__MON_FMT=wav") in new stack
    -- Executing [s@sub-record-check:10] NoOp("SCCP/147-000000B7", "Recordings initialized") in new stack
    -- Executing [s@sub-record-check:11] ExecIf("SCCP/147-000000B7", "1?Set(ARG3=dontcare)") in new stack
    -- Executing [s@sub-record-check:12] Set("SCCP/147-000000B7", "REC_POLICY_MODE_SAVE=") in new stack
    -- Executing [s@sub-record-check:13] ExecIf("SCCP/147-000000B7", "0?Set(REC_STATUS=NO)") in new stack
    -- Executing [s@sub-record-check:14] GotoIf("SCCP/147-000000B7", "5?checkaction") in new stack
    -- Goto (sub-record-check,s,17)
    -- Executing [s@sub-record-check:17] GotoIf("SCCP/147-000000B7", "1?sub-record-check,exten,1") in new stack
    -- Goto (sub-record-check,exten,1)
    -- Executing [exten@sub-record-check:1] NoOp("SCCP/147-000000B7", "Exten Recording Check between Han Boetes <0XXXXX147 and 148") in new stack
    -- Executing [exten@sub-record-check:2] Set("SCCP/147-000000B7", "CALLTYPE=internal") in new stack
    -- Executing [exten@sub-record-check:3] ExecIf("SCCP/147-000000B7", "0?Set(CALLTYPE=)") in new stack
    -- Executing [exten@sub-record-check:4] Set("SCCP/147-000000B7", "CALLEE=dontcare") in new stack
    -- Executing [exten@sub-record-check:5] ExecIf("SCCP/147-000000B7", "0?Set(CALLEE=dontcare)") in new stack
    -- Executing [exten@sub-record-check:6] GotoIf("SCCP/147-000000B7", "0?callee") in new stack
    -- Executing [exten@sub-record-check:7] GotoIf("SCCP/147-000000B7", "1?caller") in new stack
    -- Goto (sub-record-check,exten,13)
    -- Executing [exten@sub-record-check:13] Set("SCCP/147-000000B7", "RECMODE=") in new stack
    -- Executing [exten@sub-record-check:14] Set("SCCP/147-000000B7", "CALLERRECMODE=") in new stack
    -- Executing [exten@sub-record-check:15] Set("SCCP/147-000000B7", "CALEERECMODE=dontcare") in new stack
    -- Executing [exten@sub-record-check:16] GotoIf("SCCP/147-000000B7", "0?processnormal") in new stack
    -- Executing [exten@sub-record-check:17] ExecIf("SCCP/147-000000B7", "0?Set(RECMODE=dontcare)") in new stack
    -- Executing [exten@sub-record-check:18] ExecIf("SCCP/147-000000B7", "0?Set(RECMODE=dontcare)") in new stack
    -- Executing [exten@sub-record-check:19] ExecIf("SCCP/147-000000B7", "0?Set(RECMODE=dontcare)") in new stack
    -- Executing [exten@sub-record-check:20] ExecIf("SCCP/147-000000B7", "0?Set(RECMODE=dontcare)") in new stack
    -- Executing [exten@sub-record-check:21] ExecIf("SCCP/147-000000B7", "1?Set(RECMODE=dontcare)") in new stack
    -- Executing [exten@sub-record-check:22] ExecIf("SCCP/147-000000B7", "1?Set(RECMODE=dontcare)") in new stack
    -- Executing [exten@sub-record-check:23] Gosub("SCCP/147-000000B7", "recordcheck,1(dontcare,internal,148)") in new stack
    -- Executing [recordcheck@sub-record-check:1] NoOp("SCCP/147-000000B7", "Starting recording check against dontcare") in new stack
    -- Executing [recordcheck@sub-record-check:2] Goto("SCCP/147-000000B7", "dontcare") in new stack
    -- Goto (sub-record-check,recordcheck,3)
    -- Executing [recordcheck@sub-record-check:3] Return("SCCP/147-000000B7", "") in new stack
    -- Executing [exten@sub-record-check:24] Return("SCCP/147-000000B7", "") in new stack
    -- Executing [148@followme-sub:21] GotoIf("SCCP/147-000000B7", "1?skipdring") in new stack
    -- Goto (followme-sub,148,24)
    -- Executing [148@followme-sub:24] Set("SCCP/147-000000B7", "STRATEGY=ringallv2-prim") in new stack
    -- Executing [148@followme-sub:25] Set("SCCP/147-000000B7", "__RVOL=") in new stack
    -- Executing [148@followme-sub:26] GotoIf("SCCP/147-000000B7", "1?skipsimple") in new stack
    -- Goto (followme-sub,148,29)
    -- Executing [148@followme-sub:29] Set("SCCP/147-000000B7", "RingGroupMethod=ringallv2-prim") in new stack
    -- Executing [148@followme-sub:30] Set("SCCP/147-000000B7", "_FMGRP=148") in new stack
    -- Executing [148@followme-sub:31] GotoIf("SCCP/147-000000B7", "1?DIALGRP") in new stack
    -- Goto (followme-sub,148,35)
    -- Executing [148@followme-sub:35] ExecIf("SCCP/147-000000B7", "1?Set(DOPTS=HhTtrI):Set(DOPTS=m(Ring)HhTtI)") in new stack
    -- Executing [148@followme-sub:36] Set("SCCP/147-000000B7", "__ALT_CONFIRM_MSG=") in new stack
    -- Executing [148@followme-sub:37] GotoIf("SCCP/147-000000B7", "0?doconfirm") in new stack
    -- Executing [148@followme-sub:38] GotoIf("SCCP/147-000000B7", "1?ringallv21") in new stack
    -- Goto (followme-sub,148,41)
    -- Executing [148@followme-sub:41] Macro("SCCP/147-000000B7", "dial,20,HhTtrI,148-142") in new stack
    -- Executing [s@macro-dial:1] NoOp("SCCP/147-000000B7", "Blind Transfer: , Attended Transfer: , User: , Alert Info: ") in new stack
    -- Executing [s@macro-dial:2] Set("SCCP/147-000000B7", "__CRM_SOURCE="Han Boetes" <0XXXXX147") in new stack
    -- Executing [s@macro-dial:3] ExecIf("SCCP/147-000000B7", "0?Set(ALERT_INFO=)") in new stack
    -- Executing [s@macro-dial:4] ExecIf("SCCP/147-000000B7", "0?Set(ALERT_INFO=)") in new stack
    -- Executing [s@macro-dial:5] ExecIf("SCCP/147-000000B7", "0?Set(ALERT_INFO=)") in new stack
    -- Executing [s@macro-dial:6] ExecIf("SCCP/147-000000B7", "0?Set(CHANNEL(musicclass)=)") in new stack
    -- Executing [s@macro-dial:7] AGI("SCCP/147-000000B7", "dialparties.agi") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi
 dialparties.agi: Starting New Dialparties.agi
dialparties.agi: Caller ID name is 'Han Boetes' number is 'Han
 dialparties.agi: CW Ignore is: 
 dialparties.agi: CF Ignore is: 
 dialparties.agi: CW IN_USE/BUSY is: 1
 dialparties.agi: Ringgroup confirm is  : 
       > dialparties.agi: USE_CONFIRMATION:  'FALSE'
       > dialparties.agi: RINGGROUP_INDEX:   ''
 dialparties.agi: Methodology of ring is  'ringallv2-prim'
    -- dialparties.agi: Added extension 148 to extension map
    -- dialparties.agi: Added extension 142 to extension map
       > dialparties.agi: got fmgrp_prering: 2, fmgrp_grptime: 20
       > dialparties.agi: fmgrp_totalprering: 22
       > dialparties.agi: found extension in pre-ring and array
       > dialparties.agi: ringallv2 ring times: REALPRERING: 22, PRERING: 2
    -- dialparties.agi: Extension 148 cf is disabled
    -- dialparties.agi: Extension 142 cf is disabled
    -- dialparties.agi: Extension 148 do not disturb is disabled
    -- dialparties.agi: Extension 142 do not disturb is disabled
       > dialparties.agi: extnum 148 has:  cw: 0; hascfb: 0 [] hascfu: 0 []
 dialparties.agi: EXTENSION_STATE: 0 (NOT_INUSE)
 dialparties.agi: Extension 148 has ExtensionState: 0
 dialparties.agi: EXTENSION_STATE: 0 (NOT_INUSE)
 dialparties.agi: Extension 148 has ExtensionState: 0
    -- dialparties.agi: Checking CW and CFB status for extension 148
    -- dialparties.agi: DbDel CALLTRACE/148 - Caller ID is not defined
       > dialparties.agi: extnum 142 has:  cw: 0; hascfb: 0 [] hascfu: 0 []
 dialparties.agi: EXTENSION_STATE: 4 (UNAVAILABLE)
 dialparties.agi: Extension 142 has ExtensionState: 4
    -- dialparties.agi: Checking CW and CFB status for extension 142
 dialparties.agi: Extension 142 is not available to be called
    -- dialparties.agi: Filtered ARG3: 148
    -- dialparties.agi: RING ALL V2 : 142
       > dialparties.agi: NODEST: 148 adding M(auto-blkvm) to dialopts: HhTtrIM(auto-blkvm)
       > dialparties.agi: NODEST: 148 blkvm enabled macro already in dialopts: HhTtrIM(auto-blkvm)
 dialparties.agi: RVOL_MODE '' 
 dialparties.agi: RVOL is: 
 dialparties.agi: RVOLPARENT is: 
    -- <SCCP/147-000000B7>AGI Script dialparties.agi completed, returning 0
    -- Executing [s@macro-dial:8] GotoIf("SCCP/147-000000B7", "1?normdial") in new stack
    -- Goto (macro-dial,s,11)
    -- Executing [s@macro-dial:11] NoOp("SCCP/147-000000B7", "Returned from dialparties with groups to dial") in new stack
    -- Executing [s@macro-dial:12] NoOp("SCCP/147-000000B7", "ringall array 142 ") in new stack
    -- Executing [s@macro-dial:13] Set("SCCP/147-000000B7", "__FMGL_DIAL=142") in new stack
    -- Executing [s@macro-dial:14] Set("SCCP/147-000000B7", "LOOPCNT=1") in new stack
    -- Executing [s@macro-dial:15] Set("SCCP/147-000000B7", "ITER=1") in new stack
    -- Executing [s@macro-dial:16] Set("SCCP/147-000000B7", "__EXTTOCALL=148") in new stack
    -- Executing [s@macro-dial:17] NoOp("SCCP/147-000000B7", "Working with 148") in new stack
    -- Executing [s@macro-dial:18] ExecIf("SCCP/147-000000B7", "0?Set(HASH(__SIPHEADERS,Alert-Info)=Normal;volume=)") in new stack
    -- Executing [s@macro-dial:19] ExecIf("SCCP/147-000000B7", "0?Set(HASH(__SIPHEADERS,Alert-Info)=Normal;volume=)") in new stack
    -- Executing [s@macro-dial:20] Set("SCCP/147-000000B7", "ITER=2") in new stack
    -- Executing [s@macro-dial:21] GotoIf("SCCP/147-000000B7", "0?ndloopbegin") in new stack
    -- Executing [s@macro-dial:22] Macro("SCCP/147-000000B7", "dial-ringall-predial-hook,") in new stack
    -- Executing [s@macro-dial-ringall-predial-hook:1] MacroExit("SCCP/147-000000B7", "") in new stack
    -- Executing [s@macro-dial:23] ExecIf("SCCP/147-000000B7", "0?Set(CWRING=r(callwaiting)):Set(CWRING=)") in new stack
    -- Executing [s@macro-dial:24] ExecIf("SCCP/147-000000B7", "0?Set(ds=Local/FMPR-148@from-internal&Local/FMGL-142@from-internal,22,HhTtrIM(auto-blkvm)g)") in new stack
    -- Executing [s@macro-dial:25] Dial("SCCP/147-000000B7", "Local/FMPR-148@from-internal&Local/FMGL-142@from-internal,22,HhTtrIM(auto-blkvm)b(func-apply-sipheaders^s^1),") in new stack
    -- Local/FMPR-148@from-internal-0000007f;1 Internal Gosub(func-apply-sipheaders,s,1) start
    -- Executing [s@func-apply-sipheaders:1] ExecIf("Local/FMPR-148@from-internal-0000007f;1", "0?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)") in new stack
    -- Executing [s@func-apply-sipheaders:2] NoOp("Local/FMPR-148@from-internal-0000007f;1", "Applying SIP Headers to channel Local/FMPR-148@from-internal-0000007f;1") in new stack
    -- Executing [s@func-apply-sipheaders:3] Set("Local/FMPR-148@from-internal-0000007f;1", "TECH=Local") in new stack
    -- Executing [s@func-apply-sipheaders:4] Set("Local/FMPR-148@from-internal-0000007f;1", "SIPHEADERKEYS=") in new stack
    -- Executing [s@func-apply-sipheaders:5] While("Local/FMPR-148@from-internal-0000007f;1", "0") in new stack
    -- Jumping to priority 13
    -- Executing [s@func-apply-sipheaders:14] Return("Local/FMPR-148@from-internal-0000007f;1", "") in new stack
  == Spawn extension (from-internal, 148, 1) exited non-zero on 'Local/FMPR-148@from-internal-0000007f;1'
    -- Local/FMPR-148@from-internal-0000007f;1 Internal Gosub(func-apply-sipheaders,s,1) complete GOSUB_RETVAL=
    -- Local/FMGL-142@from-internal-00000080;1 Internal Gosub(func-apply-sipheaders,s,1) start
    -- Executing [s@func-apply-sipheaders:1] ExecIf("Local/FMGL-142@from-internal-00000080;1", "0?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)") in new stack
    -- Executing [s@func-apply-sipheaders:2] NoOp("Local/FMGL-142@from-internal-00000080;1", "Applying SIP Headers to channel Local/FMGL-142@from-internal-00000080;1") in new stack
    -- Executing [s@func-apply-sipheaders:3] Set("Local/FMGL-142@from-internal-00000080;1", "TECH=Local") in new stack
    -- Executing [s@func-apply-sipheaders:4] Set("Local/FMGL-142@from-internal-00000080;1", "SIPHEADERKEYS=") in new stack
    -- Executing [s@func-apply-sipheaders:5] While("Local/FMGL-142@from-internal-00000080;1", "0") in new stack
    -- Jumping to priority 13
    -- Executing [s@func-apply-sipheaders:14] Return("Local/FMGL-142@from-internal-00000080;1", "") in new stack
  == Spawn extension (from-internal, 148, 1) exited non-zero on 'Local/FMGL-142@from-internal-00000080;1'
    -- Local/FMGL-142@from-internal-00000080;1 Internal Gosub(func-apply-sipheaders,s,1) complete GOSUB_RETVAL=
    -- Called Local/FMPR-148@from-internal
    -- Called Local/FMGL-142@from-internal
    -- Executing [FMGL-142@from-internal:1] Set("Local/FMGL-142@from-internal-00000080;2", "CDR_PROP(disable)=true") in new stack
    -- Executing [FMGL-142@from-internal:2] Set("Local/FMGL-142@from-internal-00000080;2", "DIALNUMS=142") in new stack
    -- Executing [FMGL-142@from-internal:3] Set("Local/FMGL-142@from-internal-00000080;2", "ENDLOOP=1634814404") in new stack
    -- Executing [FMGL-142@from-internal:4] GotoIf("Local/FMGL-142@from-internal-00000080;2", "0?dodnd") in new stack
    -- Executing [FMGL-142@from-internal:5] Wait("Local/FMGL-142@from-internal-00000080;2", "1") in new stack
    -- Executing [FMPR-148@from-internal:1] Set("Local/FMPR-148@from-internal-0000007f;2", "CDR_PROP(disable)=true") in new stack
    -- Executing [FMPR-148@from-internal:2] Set("Local/FMPR-148@from-internal-0000007f;2", "RingGroupMethod=") in new stack
    -- Executing [FMPR-148@from-internal:3] Set("Local/FMPR-148@from-internal-0000007f;2", "USE_CONFIRMATION=") in new stack
    -- Executing [FMPR-148@from-internal:4] Set("Local/FMPR-148@from-internal-0000007f;2", "RINGGROUP_INDEX=") in new stack
    -- Executing [FMPR-148@from-internal:5] Macro("Local/FMPR-148@from-internal-0000007f;2", "simple-dial,148,22") in new stack
    -- Executing [s@macro-simple-dial:1] Set("Local/FMPR-148@from-internal-0000007f;2", "__EXTTOCALL=148") in new stack
    -- Executing [s@macro-simple-dial:2] Set("Local/FMPR-148@from-internal-0000007f;2", "RT=22") in new stack
    -- Executing [s@macro-simple-dial:3] Set("Local/FMPR-148@from-internal-0000007f;2", "CFUEXT=") in new stack
    -- Executing [s@macro-simple-dial:4] Set("Local/FMPR-148@from-internal-0000007f;2", "CFBEXT=") in new stack
    -- Executing [s@macro-simple-dial:5] Set("Local/FMPR-148@from-internal-0000007f;2", "CWI_TMP=") in new stack
    -- Executing [s@macro-simple-dial:6] Macro("Local/FMPR-148@from-internal-0000007f;2", "dial-one,22,HhTtr,148") in new stack
    -- Executing [s@macro-dial-one:1] Set("Local/FMPR-148@from-internal-0000007f;2", "DEXTEN=148") in new stack
    -- Executing [s@macro-dial-one:2] Set("Local/FMPR-148@from-internal-0000007f;2", "__CRM_SOURCE="Han Boetes" <0XXXXX147") in new stack
    -- Executing [s@macro-dial-one:3] ExecIf("Local/FMPR-148@from-internal-0000007f;2", "0?Set(__EXTTOCALL=148)") in new stack
    -- Executing [s@macro-dial-one:4] Set("Local/FMPR-148@from-internal-0000007f;2", "DIALSTATUS_CW=") in new stack
    -- Executing [s@macro-dial-one:5] GosubIf("Local/FMPR-148@from-internal-0000007f;2", "0?screen,1()") in new stack
    -- Executing [s@macro-dial-one:6] GosubIf("Local/FMPR-148@from-internal-0000007f;2", "0?cf,1()") in new stack
    -- Executing [s@macro-dial-one:7] GotoIf("Local/FMPR-148@from-internal-0000007f;2", "1?skip1") in new stack
    -- Goto (macro-dial-one,s,10)
    -- Executing [s@macro-dial-one:10] GotoIf("Local/FMPR-148@from-internal-0000007f;2", "0?nodial") in new stack
    -- Executing [s@macro-dial-one:11] GotoIf("Local/FMPR-148@from-internal-0000007f;2", "0?continue") in new stack
    -- Executing [s@macro-dial-one:12] Set("Local/FMPR-148@from-internal-0000007f;2", "EXTHASCW=") in new stack
    -- Executing [s@macro-dial-one:13] GotoIf("Local/FMPR-148@from-internal-0000007f;2", "1?next1:cwinusebusy") in new stack
    -- Goto (macro-dial-one,s,14)
    -- Executing [s@macro-dial-one:14] GotoIf("Local/FMPR-148@from-internal-0000007f;2", "0?docfu:skip3") in new stack
    -- Goto (macro-dial-one,s,18)
    -- Executing [s@macro-dial-one:18] GotoIf("Local/FMPR-148@from-internal-0000007f;2", "1?next2:continue") in new stack
    -- Goto (macro-dial-one,s,19)
    -- Executing [s@macro-dial-one:19] GotoIf("Local/FMPR-148@from-internal-0000007f;2", "1?continue") in new stack
    -- Goto (macro-dial-one,s,27)
    -- Executing [s@macro-dial-one:27] GotoIf("Local/FMPR-148@from-internal-0000007f;2", "0?nodial") in new stack
    -- Executing [s@macro-dial-one:28] GosubIf("Local/FMPR-148@from-internal-0000007f;2", "1?dstring,1():dlocal,1()") in new stack
    -- Executing [dstring@macro-dial-one:1] Set("Local/FMPR-148@from-internal-0000007f;2", "DSTRING=") in new stack
    -- Executing [dstring@macro-dial-one:2] Set("Local/FMPR-148@from-internal-0000007f;2", "DEVICES=148&99148") in new stack
    -- Executing [dstring@macro-dial-one:3] ExecIf("Local/FMPR-148@from-internal-0000007f;2", "0?Return()") in new stack
    -- Executing [dstring@macro-dial-one:4] ExecIf("Local/FMPR-148@from-internal-0000007f;2", "0?Set(DEVICES=48&99148)") in new stack
    -- Executing [dstring@macro-dial-one:5] Set("Local/FMPR-148@from-internal-0000007f;2", "LOOPCNT=2") in new stack
    -- Executing [dstring@macro-dial-one:6] Set("Local/FMPR-148@from-internal-0000007f;2", "ITER=1") in new stack
    -- Executing [dstring@macro-dial-one:7] Set("Local/FMPR-148@from-internal-0000007f;2", "THISDIAL=SCCP/148") in new stack
    -- Executing [dstring@macro-dial-one:8] GotoIf("Local/FMPR-148@from-internal-0000007f;2", "1?docheck") in new stack
    -- Goto (macro-dial-one,dstring,14)
    -- Executing [dstring@macro-dial-one:14] GotoIf("Local/FMPR-148@from-internal-0000007f;2", "0?skipset") in new stack
    -- Executing [dstring@macro-dial-one:15] Set("Local/FMPR-148@from-internal-0000007f;2", "DSTRING=SCCP/148&") in new stack
    -- Executing [dstring@macro-dial-one:16] Set("Local/FMPR-148@from-internal-0000007f;2", "ITER=2") in new stack
    -- Executing [dstring@macro-dial-one:17] GotoIf("Local/FMPR-148@from-internal-0000007f;2", "1?begin") in new stack
    -- Goto (macro-dial-one,dstring,7)
    -- Executing [dstring@macro-dial-one:7] Set("Local/FMPR-148@from-internal-0000007f;2", "THISDIAL=SIP/99148") in new stack
    -- Executing [dstring@macro-dial-one:8] GotoIf("Local/FMPR-148@from-internal-0000007f;2", "1?docheck") in new stack
    -- Goto (macro-dial-one,dstring,14)
    -- Executing [dstring@macro-dial-one:14] GotoIf("Local/FMPR-148@from-internal-0000007f;2", "0?skipset") in new stack
    -- Executing [dstring@macro-dial-one:15] Set("Local/FMPR-148@from-internal-0000007f;2", "DSTRING=SCCP/148&SIP/99148&") in new stack
    -- Executing [dstring@macro-dial-one:16] Set("Local/FMPR-148@from-internal-0000007f;2", "ITER=3") in new stack
    -- Executing [dstring@macro-dial-one:17] GotoIf("Local/FMPR-148@from-internal-0000007f;2", "0?begin") in new stack
    -- Executing [dstring@macro-dial-one:18] ExecIf("Local/FMPR-148@from-internal-0000007f;2", "0?Return()") in new stack
    -- Executing [dstring@macro-dial-one:19] Set("Local/FMPR-148@from-internal-0000007f;2", "DSTRING=SCCP/148&SIP/99148") in new stack
    -- Executing [dstring@macro-dial-one:20] Return("Local/FMPR-148@from-internal-0000007f;2", "") in new stack
    -- Executing [s@macro-dial-one:29] GotoIf("Local/FMPR-148@from-internal-0000007f;2", "0?nodial") in new stack
    -- Executing [s@macro-dial-one:30] GotoIf("Local/FMPR-148@from-internal-0000007f;2", "0?skiptrace") in new stack
    -- Executing [s@macro-dial-one:31] GosubIf("Local/FMPR-148@from-internal-0000007f;2", "0?ctset,1():ctclear,1()") in new stack
    -- Executing [ctclear@macro-dial-one:1] NoOp("Local/FMPR-148@from-internal-0000007f;2", "Deleting: CALLTRACE/148 ") in new stack
    -- Executing [ctclear@macro-dial-one:2] Return("Local/FMPR-148@from-internal-0000007f;2", "") in new stack
    -- Executing [s@macro-dial-one:32] Set("Local/FMPR-148@from-internal-0000007f;2", "D_OPTIONS=HhTtrM(auto-blkvm)") in new stack
    -- Executing [s@macro-dial-one:33] GosubIf("Local/FMPR-148@from-internal-0000007f;2", "0?func-set-sipheader,s,1(Alert-Info,)") in new stack
    -- Executing [s@macro-dial-one:34] NoOp("Local/FMPR-148@from-internal-0000007f;2", "Blind Transfer: , Attended Transfer: , User: , Alert Info: ") in new stack
    -- Executing [s@macro-dial-one:35] ExecIf("Local/FMPR-148@from-internal-0000007f;2", "0?Set(ALERT_INFO=)") in new stack
    -- Executing [s@macro-dial-one:36] ExecIf("Local/FMPR-148@from-internal-0000007f;2", "0?Set(ALERT_INFO=)") in new stack
    -- Executing [s@macro-dial-one:37] ExecIf("Local/FMPR-148@from-internal-0000007f;2", "0?Set(ALERT_INFO=)") in new stack
    -- Executing [s@macro-dial-one:38] ExecIf("Local/FMPR-148@from-internal-0000007f;2", "0?Set(ALERT_INFO=Normal;volume=)") in new stack
    -- Executing [s@macro-dial-one:39] ExecIf("Local/FMPR-148@from-internal-0000007f;2", "0?Set(ALERT_INFO=Normal;volume=)") in new stack
    -- Executing [s@macro-dial-one:40] GosubIf("Local/FMPR-148@from-internal-0000007f;2", "0?func-set-sipheader,s,1(Alert-Info,)") in new stack
    -- Executing [s@macro-dial-one:41] ExecIf("Local/FMPR-148@from-internal-0000007f;2", "0?Set(CHANNEL(musicclass)=)") in new stack
    -- Executing [s@macro-dial-one:42] GosubIf("Local/FMPR-148@from-internal-0000007f;2", "0?qwait,1()") in new stack
    -- Executing [s@macro-dial-one:43] Set("Local/FMPR-148@from-internal-0000007f;2", "__CWIGNORE=") in new stack
    -- Executing [s@macro-dial-one:44] Set("Local/FMPR-148@from-internal-0000007f;2", "__KEEPCID=TRUE") in new stack
    -- Executing [s@macro-dial-one:45] GotoIf("Local/FMPR-148@from-internal-0000007f;2", "0?usegoto,1") in new stack
    -- Executing [s@macro-dial-one:46] GotoIf("Local/FMPR-148@from-internal-0000007f;2", "1?godial") in new stack
    -- Goto (macro-dial-one,s,51)
    -- Executing [s@macro-dial-one:51] Macro("Local/FMPR-148@from-internal-0000007f;2", "dialout-one-predial-hook,") in new stack
    -- Executing [s@macro-dialout-one-predial-hook:1] MacroExit("Local/FMPR-148@from-internal-0000007f;2", "") in new stack
    -- Executing [s@macro-dial-one:52] ExecIf("Local/FMPR-148@from-internal-0000007f;2", "0?Set(D_OPTIONS=HhtrM(auto-blkvm)I)") in new stack
    -- Executing [s@macro-dial-one:53] ExecIf("Local/FMPR-148@from-internal-0000007f;2", "0?Set(CWRING=r(callwaiting)):Set(CWRING=)") in new stack
    -- Executing [s@macro-dial-one:54] NoOp("Local/FMPR-148@from-internal-0000007f;2", "") in new stack
    -- Executing [s@macro-dial-one:55] ExecIf("Local/FMPR-148@from-internal-0000007f;2", "0?Set(D_OPTIONS=HhTtrM(auto-blkvm)g)") in new stack
    -- Executing [s@macro-dial-one:56] Dial("Local/FMPR-148@from-internal-0000007f;2", "SCCP/148&SIP/99148,22,HhTtrM(auto-blkvm)b(func-apply-sipheaders^s^1)") in new stack
[2021-10-21 13:06:42] WARNING[24786][C-0000002d]: app_dial.c:2589 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent)
    -- SCCP/148-000000B8 Internal Gosub(func-apply-sipheaders,s,1) start
    -- Executing [s@func-apply-sipheaders:1] ExecIf("SCCP/148-000000B8", "0?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)") in new stack
    -- Executing [s@func-apply-sipheaders:2] NoOp("SCCP/148-000000B8", "Applying SIP Headers to channel SCCP/148-000000B8") in new stack
    -- Executing [s@func-apply-sipheaders:3] Set("SCCP/148-000000B8", "TECH=SCCP") in new stack
    -- Executing [s@func-apply-sipheaders:4] Set("SCCP/148-000000B8", "SIPHEADERKEYS=") in new stack
    -- Executing [s@func-apply-sipheaders:5] While("SCCP/148-000000B8", "0") in new stack
    -- Jumping to priority 13
    -- Executing [s@func-apply-sipheaders:14] Return("SCCP/148-000000B8", "") in new stack
  == Spawn extension (from-internal, FMPR-148, 1) exited non-zero on 'SCCP/148-000000B8'
    -- SCCP/148-000000B8 Internal Gosub(func-apply-sipheaders,s,1) complete GOSUB_RETVAL=
    -- Called SCCP/148
    -- SCCP/148-000000B8 is ringing
    -- Local/FMPR-148@from-internal-0000007f;1 is ringing
    -- Connected line update to SCCP/147-000000B7 prevented.
    -- Local/FMPR-148@from-internal-0000007f;1 is ringing
    -- Executing [FMGL-142@from-internal:6] GotoIf("Local/FMGL-142@from-internal-00000080;2", "1?start") in new stack
    -- Goto (from-internal,FMGL-142,4)
    -- Executing [FMGL-142@from-internal:4] GotoIf("Local/FMGL-142@from-internal-00000080;2", "0?dodnd") in new stack
    -- Executing [FMGL-142@from-internal:5] Wait("Local/FMGL-142@from-internal-00000080;2", "1") in new stack
  == Spawn extension (macro-dial, s, 25) exited non-zero on 'SCCP/147-000000B7' in macro 'dial'
  == Spawn extension (followme-sub, 148, 41) exited non-zero on 'SCCP/147-000000B7'
  == Spawn extension (from-internal, FMGL-142, 5) exited non-zero on 'Local/FMGL-142@from-internal-00000080;2'
    -- Executing [h@from-internal:1] Macro("Local/FMGL-142@from-internal-00000080;2", "hangupcall") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("Local/FMGL-142@from-internal-00000080;2", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [s@macro-hangupcall:3] ExecIf("Local/FMGL-142@from-internal-00000080;2", "0?Set(CDR(recordingfile)=)") in new stack
  == Spawn extension (macro-dial-one, s, 56) exited non-zero on 'Local/FMPR-148@from-internal-0000007f;2' in macro 'dial-one'
  == Spawn extension (macro-simple-dial, s, 6) exited non-zero on 'Local/FMPR-148@from-internal-0000007f;2' in macro 'simple-dial'
  == Spawn extension (from-internal, FMPR-148, 5) exited non-zero on 'Local/FMPR-148@from-internal-0000007f;2'
    -- Executing [h@from-internal:1] Macro("Local/FMPR-148@from-internal-0000007f;2", "hangupcall") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("Local/FMPR-148@from-internal-0000007f;2", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [s@macro-hangupcall:4] NoOp("Local/FMGL-142@from-internal-00000080;2", " montior file= ") in new stack
    -- Executing [s@macro-hangupcall:5] GotoIf("Local/FMGL-142@from-internal-00000080;2", "1?skipagi") in new stack
    -- Goto (macro-hangupcall,s,7)
    -- Executing [s@macro-hangupcall:7] Hangup("Local/FMGL-142@from-internal-00000080;2", "") in new stack
  == Spawn extension (macro-hangupcall, s, 7) exited non-zero on 'Local/FMGL-142@from-internal-00000080;2' in macro 'hangupcall'
  == Spawn extension (from-internal, h, 1) exited non-zero on 'Local/FMGL-142@from-internal-00000080;2'
    -- Executing [s@macro-hangupcall:3] ExecIf("Local/FMPR-148@from-internal-0000007f;2", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [s@macro-hangupcall:4] NoOp("Local/FMPR-148@from-internal-0000007f;2", "SCCP/148-000000B8 montior file= ") in new stack
    -- Executing [s@macro-hangupcall:5] GotoIf("Local/FMPR-148@from-internal-0000007f;2", "1?skipagi") in new stack
    -- Goto (macro-hangupcall,s,7)
    -- Executing [s@macro-hangupcall:7] Hangup("Local/FMPR-148@from-internal-0000007f;2", "") in new stack
  == Spawn extension (macro-hangupcall, s, 7) exited non-zero on 'Local/FMPR-148@from-internal-0000007f;2' in macro 'hangupcall'
  == Spawn extension (from-internal, h, 1) exited non-zero on 'Local/FMPR-148@from-internal-0000007f;2'
asterix*CLI> exit
dkgroot commented 2 years ago

Chan-sccp does not know about internal cid's or outbound cid's, it has no knowledge of such worldly things. From the log above, the CID is being set during dialplan interaction, ie: FreePBX is setting/overriding the cid information during the call. This means the issue you raised is more FreePBX / sccp_manager related. Sounds like i am passing the buck and in this case i think that is valid.

@steve-lad : There are to moments where the cid needs to be set. During device/line registration (ie: chan-sccp realtime db). And during dialplan interaction, ie FreePBX dialplan handling. Only the latter can deal with INBOUND, INTERNAL and OUTBOUND, because FreePBX/Dialplan know where an entered phonenumber/extension is/might be, and ought to take the appropriate action based on that knowledge.

Moving the ticket to sccp_manager repo

cagriaksu commented 1 year ago

This problem also happens when you don't enter anything on Outbound Caller ID. When you try to make an internal call with an extension like this, only the Extension Name appears on the called party, so if it is a missed call, they can't dial back because no number is shown on the screen, just the name.

hboetes commented 1 year ago

We're no longer using sccp phones, so I can't be of any further assistance.