Add 0 to CallerID on incoming calls

Hello,

i know this is a few times discussed hower i read everything i could find.
Nothing helps.

I trie to add a leading 0 on incoming calls from a trunk.
I add context=from-trunk-custom to the trunk under the incoming field but everything is ignored.
I am not sure about the fields:

Trunk Name sipconnect.sipgate.de

allow=alaw&ulaw&g729&gsm&slinear
canredirect=no
canreinvite=no
disallow=all
host=sipconnect.sipgate.de
fromdomain=sipconnect.sipgate.de
insecure=very
username=8XXXXXX0
defaultuser=8XXXXXX0
fromuser=8XXXXXX0
secret=XXXXXXX
type=peer
nat=yes

Incoming Settings

USER Context 8XXXXXX0
USER Details
context=from-trunk-custom

I’m totally lost please help me.

regards

Rene

This is something I have used to add a 9 to CID, put it in /etc/asterisk/extensions_custom.conf and make the context on your trunk from-prepend-nine.

[from-prepend-nine]

exten => _X.,1,Set(CALLERID(number)=9${CALLERID(number)})
exten => _X.,Goto(from-pstn-toheader,${EXTEN},1)

;End of [from-prepend-nine]

Hi i allready did this.

i renamend it now to

context=from-trunk-addzero

extensions_custom.conf

[from-trunk-addzero]

exten => s,1,NOOP(“Entered fixedcid”)
exten => s,2,Set(CALLERID(num)=0${CALLERID(num)})
exten => s,n,Goto(from-trunk,${EXTEN},1)

But the problem is that this context is not used only from-trunk is used…

[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [[email protected]:1] Set(“SIP/sipconnect.sipgate.de-00000602”, “GROUP()=OUT_3”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [[email protected]:2] Goto(“SIP/sipconnect.sipgate.de-00000602”, “from-trunk,4040XXXXXXX,1”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Goto (from-trunk,4040XXXXXXX,1)
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [4040XXXXXXX@from-trunk:1] Set(“SIP/sipconnect.sipgate.de-00000602”, “__FROM_DID=4040XXXXXXX”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [4040XXXXXXX@from-trunk:2] Set(“SIP/sipconnect.sipgate.de-00000602”, “CHANNEL(language)=de”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [4040XXXXXXX@from-trunk:3] Gosub(“SIP/sipconnect.sipgate.de-00000602”, “app-blacklist-check,s,1()”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@app-blacklist-check:1] GotoIf(“SIP/sipconnect.sipgate.de-00000602”, “0?blacklisted”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@app-blacklist-check:2] Set(“SIP/sipconnect.sipgate.de-00000602”, “CALLED_BLACKLIST=1”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@app-blacklist-check:3] Return(“SIP/sipconnect.sipgate.de-00000602”, “”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [4040XXXXXXX@from-trunk:4] Set(“SIP/sipconnect.sipgate.de-00000602”, “CDR(did)=4040XXXXXXX”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [4040XXXXXXX@from-trunk:5] ExecIf(“SIP/sipconnect.sipgate.de-00000602”, “0 ?Set(CALLERID(name)=0211XXXXXXX)”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [4040XXXXXXX@from-trunk:6] Set(“SIP/sipconnect.sipgate.de-00000602”, “__CALLINGPRES_SV=allowed_not_screened”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [4040XXXXXXX@from-trunk:7] Set(“SIP/sipconnect.sipgate.de-00000602”, “CALLERPRES()=allowed_not_screened”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [4040XXXXXXX@from-trunk:8] Goto(“SIP/sipconnect.sipgate.de-00000602”, “from-did-direct,17,1”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Goto (from-did-direct,17,1)
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [17@from-did-direct:1] GotoIf(“SIP/sipconnect.sipgate.de-00000602”, “0?ext-local,17,1”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [17@from-did-direct:2] Macro(“SIP/sipconnect.sipgate.de-00000602”, “user-callerid,”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@macro-user-callerid:1] Set(“SIP/sipconnect.sipgate.de-00000602”, “AMPUSER=0211XXXXXXX”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@macro-user-callerid:2] GotoIf(“SIP/sipconnect.sipgate.de-00000602”, “0?report”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@macro-user-callerid:3] ExecIf(“SIP/sipconnect.sipgate.de-00000602”, “1?Set(REALCALLERIDNUM=0211XXXXXXX)”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@macro-user-callerid:4] Set(“SIP/sipconnect.sipgate.de-00000602”, “AMPUSER=”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@macro-user-callerid:5] Set(“SIP/sipconnect.sipgate.de-00000602”, “AMPUSERCIDNAME=”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@macro-user-callerid:6] GotoIf(“SIP/sipconnect.sipgate.de-00000602”, “1?report”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Goto (macro-user-callerid,s,13)
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@macro-user-callerid:13] GotoIf(“SIP/sipconnect.sipgate.de-00000602”, “0?continue”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@macro-user-callerid:14] Set(“SIP/sipconnect.sipgate.de-00000602”, “__TTL=64”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@macro-user-callerid:15] GotoIf(“SIP/sipconnect.sipgate.de-00000602”, “1?continue”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Goto (macro-user-callerid,s,26)
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@macro-user-callerid:26] Set(“SIP/sipconnect.sipgate.de-00000602”, “CALLERID(number)=0211XXXXXXX”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@macro-user-callerid:27] Set(“SIP/sipconnect.sipgate.de-00000602”, “CALLERID(name)=0211XXXXXXX”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@macro-user-callerid:28] Set(“SIP/sipconnect.sipgate.de-00000602”, “CHANNEL(language)=de”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [17@from-did-direct:3] Set(“SIP/sipconnect.sipgate.de-00000602”, “DIAL_OPTIONS=trI”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [17@from-did-direct:4] Set(“SIP/sipconnect.sipgate.de-00000602”, “CONNECTEDLINE(num)=17”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [17@from-did-direct:5] Set(“SIP/sipconnect.sipgate.de-00000602”, “CONNECTEDLINE(name,i)=Rene Graetz Home”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [17@from-did-direct:6] Set(“SIP/sipconnect.sipgate.de-00000602”, “FM_DIALSTATUS=NOT_INUSE”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [17@from-did-direct:7] Set(“SIP/sipconnect.sipgate.de-00000602”, “__EXTTOCALL=17”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [17@from-did-direct:8] Set(“SIP/sipconnect.sipgate.de-00000602”, “__PICKUPMARK=17”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [17@from-did-direct:9] Macro(“SIP/sipconnect.sipgate.de-00000602”, “blkvm-setifempty,”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@macro-blkvm-setifempty:1] GotoIf(“SIP/sipconnect.sipgate.de-00000602”, “1?init”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Goto (macro-blkvm-setifempty,s,4)
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@macro-blkvm-setifempty:4] Set(“SIP/sipconnect.sipgate.de-00000602”, “__BLKVM_CHANNEL=SIP/sipconnect.sipgate.de-00000602”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@macro-blkvm-setifempty:5] Set(“SIP/sipconnect.sipgate.de-00000602”, “SHARED(BLKVM,SIP/sipconnect.sipgate.de-00000602)=TRUE”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@macro-blkvm-setifempty:6] Set(“SIP/sipconnect.sipgate.de-00000602”, “GOSUB_RETVAL=TRUE”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@macro-blkvm-setifempty:7] MacroExit(“SIP/sipconnect.sipgate.de-00000602”, “”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [17@from-did-direct:10] GotoIf(“SIP/sipconnect.sipgate.de-00000602”, “1?skipov”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Goto (from-did-direct,17,13)
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [17@from-did-direct:13] Set(“SIP/sipconnect.sipgate.de-00000602”, “RRNODEST=”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [17@from-did-direct:14] Set(“SIP/sipconnect.sipgate.de-00000602”, “__NODEST=17”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [17@from-did-direct:15] GosubIf(“SIP/sipconnect.sipgate.de-00000602”, “0?sub-fmsetcid,s,1()”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [17@from-did-direct:16] Set(“SIP/sipconnect.sipgate.de-00000602”, “RecordMethod=Group”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [17@from-did-direct:17] Gosub(“SIP/sipconnect.sipgate.de-00000602”, “sub-record-check,s,1(exten,17,)”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@sub-record-check:1] GotoIf(“SIP/sipconnect.sipgate.de-00000602”, “1?check”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Goto (sub-record-check,s,6)
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@sub-record-check:6] Set(“SIP/sipconnect.sipgate.de-00000602”, “__MON_FMT=wav”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@sub-record-check:7] GotoIf(“SIP/sipconnect.sipgate.de-00000602”, “1?next”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Goto (sub-record-check,s,10)
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@sub-record-check:10] ExecIf(“SIP/sipconnect.sipgate.de-00000602”, “0?Return()”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@sub-record-check:11] GotoIf(“SIP/sipconnect.sipgate.de-00000602”, “0?exten,1”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@sub-record-check:12] Set(“SIP/sipconnect.sipgate.de-00000602”, “__REC_STATUS=INITIALIZED”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@sub-record-check:13] ExecIf(“SIP/sipconnect.sipgate.de-00000602”, “0?Set(__REC_POLICY_MODE=)”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@sub-record-check:14] Set(“SIP/sipconnect.sipgate.de-00000602”, “NOW=1345705568”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@sub-record-check:15] Set(“SIP/sipconnect.sipgate.de-00000602”, “__DAY=23”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@sub-record-check:16] Set(“SIP/sipconnect.sipgate.de-00000602”, “__MONTH=08”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@sub-record-check:17] Set(“SIP/sipconnect.sipgate.de-00000602”, “__YEAR=2012”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@sub-record-check:18] Set(“SIP/sipconnect.sipgate.de-00000602”, “__TIMESTR=20120823-090608”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@sub-record-check:19] Set(“SIP/sipconnect.sipgate.de-00000602”, “__FROMEXTEN=0211XXXXXXX”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@sub-record-check:20] Set(“SIP/sipconnect.sipgate.de-00000602”, “__CALLFILENAME=exten-17-0211XXXXXXX-20120823-090608-1345705568.1802”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@sub-record-check:21] Goto(“SIP/sipconnect.sipgate.de-00000602”, “exten,1”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Goto (sub-record-check,exten,1)
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [exten@sub-record-check:1] GotoIf(“SIP/sipconnect.sipgate.de-00000602”, “0?callee”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [exten@sub-record-check:2] Set(“SIP/sipconnect.sipgate.de-00000602”, “__REC_POLICY_MODE=dontcare”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [exten@sub-record-check:3] GotoIf(“SIP/sipconnect.sipgate.de-00000602”, “1?caller”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Goto (sub-record-check,exten,10)
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [exten@sub-record-check:10] Set(“SIP/sipconnect.sipgate.de-00000602”, “REC_POLICY_MODE=”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [exten@sub-record-check:11] GosubIf(“SIP/sipconnect.sipgate.de-00000602”, “0?record,1(exten,17,0211XXXXXXX)”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [exten@sub-record-check:12] Return(“SIP/sipconnect.sipgate.de-00000602”, “”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [17@from-did-direct:18] Set(“SIP/sipconnect.sipgate.de-00000602”, “RingGroupMethod=ringallv2”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [17@from-did-direct:19] Set(“SIP/sipconnect.sipgate.de-00000602”, “_FMGRP=17”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [17@from-did-direct:20] GotoIf(“SIP/sipconnect.sipgate.de-00000602”, “0?doconfirm”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [17@from-did-direct:21] Macro(“SIP/sipconnect.sipgate.de-00000602”, “dial,27,trI,17-16”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@macro-dial:1] GotoIf(“SIP/sipconnect.sipgate.de-00000602”, “1?dial”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Goto (macro-dial,s,3)
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@macro-dial:3] AGI(“SIP/sipconnect.sipgate.de-00000602”, “dialparties.agi”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] res_agi.c: – Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi
[2012-08-23 09:06:08] VERBOSE[22078] res_agi.c: dialparties.agi: Starting New Dialparties.agi
[2012-08-23 09:06:08] VERBOSE[22078] res_agi.c: dialparties.agi: Caller ID name is ‘0211XXXXXXX’ number is ‘0211XXXXXXX’
[2012-08-23 09:06:08] VERBOSE[22078] res_agi.c: dialparties.agi: Methodology of ring is ‘ringallv2’
[2012-08-23 09:06:08] VERBOSE[22078] res_agi.c: – dialparties.agi: Added extension 17 to extension map
[2012-08-23 09:06:08] VERBOSE[22078] res_agi.c: – dialparties.agi: Added extension 16 to extension map
[2012-08-23 09:06:08] VERBOSE[22078] res_agi.c: – dialparties.agi: Extension 17 cf is disabled
[2012-08-23 09:06:08] VERBOSE[22078] res_agi.c: – dialparties.agi: Extension 16 cf is disabled
[2012-08-23 09:06:08] VERBOSE[22078] res_agi.c: – dialparties.agi: Extension 17 do not disturb is disabled
[2012-08-23 09:06:08] VERBOSE[22078] res_agi.c: – dialparties.agi: Extension 16 do not disturb is disabled
[2012-08-23 09:06:08] VERBOSE[22078] res_agi.c: – dialparties.agi: dbset CALLTRACE/17 to 0211XXXXXXX
[2012-08-23 09:06:08] VERBOSE[22078] res_agi.c: – dialparties.agi: dbset CALLTRACE/16 to 0211XXXXXXX
[2012-08-23 09:06:08] VERBOSE[22078] res_agi.c: – dialparties.agi: Filtered ARG3: 17-16
[2012-08-23 09:06:08] VERBOSE[22078] res_agi.c: – <SIP/sipconnect.sipgate.de-00000602>AGI Script dialparties.agi completed, returning 0
[2012-08-23 09:06:08] VERBOSE[22078] pbx.c: – Executing [s@macro-dial:7] Dial(“SIP/sipconnect.sipgate.de-00000602”, “Local/FMPR-17@from-internal&Local/FMGL-16@from-internal,27,trIM(auto-blkvm)”) in new stack
[2012-08-23 09:06:08] VERBOSE[22078] app_dial.c: – Called Local/FMPR-17@from-internal
[2012-08-23 09:06:08] VERBOSE[22078] app_dial.c: – Called Local/FMGL-16@from-internal
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [FMPR-17@from-internal:1] NoCDR(“Local/FMPR-17@from-internal-3e80;2”, “”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [FMPR-17@from-internal:2] Set(“Local/FMPR-17@from-internal-3e80;2”, “RingGroupMethod=”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [FMPR-17@from-internal:3] Set(“Local/FMPR-17@from-internal-3e80;2”, “USE_CONFIRMATION=”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [FMPR-17@from-internal:4] Set(“Local/FMPR-17@from-internal-3e80;2”, “RINGGROUP_INDEX=”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [FMPR-17@from-internal:5] Macro(“Local/FMPR-17@from-internal-3e80;2”, “simple-dial,17,27”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [s@macro-simple-dial:1] Set(“Local/FMPR-17@from-internal-3e80;2”, “__EXTTOCALL=17”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [s@macro-simple-dial:2] Set(“Local/FMPR-17@from-internal-3e80;2”, “RT=27”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [s@macro-simple-dial:3] Set(“Local/FMPR-17@from-internal-3e80;2”, “CFUEXT=”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [s@macro-simple-dial:4] Set(“Local/FMPR-17@from-internal-3e80;2”, “CFBEXT=”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [s@macro-simple-dial:5] Set(“Local/FMPR-17@from-internal-3e80;2”, “CWI_TMP=”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [s@macro-simple-dial:6] Macro(“Local/FMPR-17@from-internal-3e80;2”, “dial-one,27,tr,17”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [s@macro-dial-one:1] Set(“Local/FMPR-17@from-internal-3e80;2”, “DEXTEN=17”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [s@macro-dial-one:2] Set(“Local/FMPR-17@from-internal-3e80;2”, “DIALSTATUS_CW=”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [s@macro-dial-one:3] GosubIf(“Local/FMPR-17@from-internal-3e80;2”, “0?screen,1()”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [s@macro-dial-one:4] GosubIf(“Local/FMPR-17@from-internal-3e80;2”, “0?cf,1()”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [s@macro-dial-one:5] GotoIf(“Local/FMPR-17@from-internal-3e80;2”, “1?skip1”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Goto (macro-dial-one,s,8)
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [s@macro-dial-one:8] GotoIf(“Local/FMPR-17@from-internal-3e80;2”, “0?nodial”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [s@macro-dial-one:9] GotoIf(“Local/FMPR-17@from-internal-3e80;2”, “0?continue”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [s@macro-dial-one:10] Set(“Local/FMPR-17@from-internal-3e80;2”, “EXTHASCW=ENABLED”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [s@macro-dial-one:11] GotoIf(“Local/FMPR-17@from-internal-3e80;2”, “0?next1:cwinusebusy”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Goto (macro-dial-one,s,23)
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [s@macro-dial-one:23] GotoIf(“Local/FMPR-17@from-internal-3e80;2”, “1?next3:continue”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Goto (macro-dial-one,s,24)
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [s@macro-dial-one:24] ExecIf(“Local/FMPR-17@from-internal-3e80;2”, “0?Set(DIALSTATUS_CW=BUSY)”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [s@macro-dial-one:25] GotoIf(“Local/FMPR-17@from-internal-3e80;2”, “0?nodial”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [s@macro-dial-one:26] GosubIf(“Local/FMPR-17@from-internal-3e80;2”, “1?dstring,1():dlocal,1()”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [dstring@macro-dial-one:1] Set(“Local/FMPR-17@from-internal-3e80;2”, “DSTRING=”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [dstring@macro-dial-one:2] Set(“Local/FMPR-17@from-internal-3e80;2”, “DEVICES=17”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [dstring@macro-dial-one:3] ExecIf(“Local/FMPR-17@from-internal-3e80;2”, “0?Return()”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [dstring@macro-dial-one:4] ExecIf(“Local/FMPR-17@from-internal-3e80;2”, “0?Set(DEVICES=7)”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [dstring@macro-dial-one:5] Set(“Local/FMPR-17@from-internal-3e80;2”, “LOOPCNT=1”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [dstring@macro-dial-one:6] Set(“Local/FMPR-17@from-internal-3e80;2”, “ITER=1”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [dstring@macro-dial-one:7] Set(“Local/FMPR-17@from-internal-3e80;2”, “THISDIAL=SIP/17”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [dstring@macro-dial-one:8] GosubIf(“Local/FMPR-17@from-internal-3e80;2”, “1?zap2dahdi,1()”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [zap2dahdi@macro-dial-one:1] ExecIf(“Local/FMPR-17@from-internal-3e80;2”, “0?Return()”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [zap2dahdi@macro-dial-one:2] Set(“Local/FMPR-17@from-internal-3e80;2”, “NEWDIAL=”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [zap2dahdi@macro-dial-one:3] Set(“Local/FMPR-17@from-internal-3e80;2”, “LOOPCNT2=1”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [zap2dahdi@macro-dial-one:4] Set(“Local/FMPR-17@from-internal-3e80;2”, “ITER2=1”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [zap2dahdi@macro-dial-one:5] Set(“Local/FMPR-17@from-internal-3e80;2”, “THISPART2=SIP/17”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [zap2dahdi@macro-dial-one:6] ExecIf(“Local/FMPR-17@from-internal-3e80;2”, “0?Set(THISPART2=DAHDI/17)”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [zap2dahdi@macro-dial-one:7] Set(“Local/FMPR-17@from-internal-3e80;2”, “NEWDIAL=SIP/17&”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [zap2dahdi@macro-dial-one:8] Set(“Local/FMPR-17@from-internal-3e80;2”, “ITER2=2”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [zap2dahdi@macro-dial-one:9] GotoIf(“Local/FMPR-17@from-internal-3e80;2”, “0?begin2”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [zap2dahdi@macro-dial-one:10] Set(“Local/FMPR-17@from-internal-3e80;2”, “THISDIAL=SIP/17”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [zap2dahdi@macro-dial-one:11] Return(“Local/FMPR-17@from-internal-3e80;2”, “”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [dstring@macro-dial-one:9] Set(“Local/FMPR-17@from-internal-3e80;2”, “DSTRING=SIP/17&”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [dstring@macro-dial-one:10] Set(“Local/FMPR-17@from-internal-3e80;2”, “ITER=2”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [dstring@macro-dial-one:11] GotoIf(“Local/FMPR-17@from-internal-3e80;2”, “0?begin”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [dstring@macro-dial-one:12] Set(“Local/FMPR-17@from-internal-3e80;2”, “DSTRING=SIP/17”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [dstring@macro-dial-one:13] Return(“Local/FMPR-17@from-internal-3e80;2”, “”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [s@macro-dial-one:27] GotoIf(“Local/FMPR-17@from-internal-3e80;2”, “0?nodial”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [s@macro-dial-one:28] GotoIf(“Local/FMPR-17@from-internal-3e80;2”, “0?skiptrace”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [s@macro-dial-one:29] GosubIf(“Local/FMPR-17@from-internal-3e80;2”, “1?ctset,1():ctclear,1()”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [ctset@macro-dial-one:1] Set(“Local/FMPR-17@from-internal-3e80;2”, “DB(CALLTRACE/17)=0211XXXXXXX”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [ctset@macro-dial-one:2] Return(“Local/FMPR-17@from-internal-3e80;2”, “”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [s@macro-dial-one:30] Set(“Local/FMPR-17@from-internal-3e80;2”, “D_OPTIONS=trM(auto-blkvm)”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [s@macro-dial-one:31] ExecIf(“Local/FMPR-17@from-internal-3e80;2”, “0?SIPAddHeader(Alert-Info: )”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [s@macro-dial-one:32] ExecIf(“Local/FMPR-17@from-internal-3e80;2”, “0?SIPAddHeader()”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [s@macro-dial-one:33] ExecIf(“Local/FMPR-17@from-internal-3e80;2”, “0?Set(CHANNEL(musicclass)=)”) in new stack
[2012-08-23 09:06:08] VERBOSE[22080] pbx.c: – Executing [s@macro-dial-one:34] GosubIf("Local/FMPR-17@from-i

Btw the Module set Callerid is installed but is also not working.

Try putting context=from-trunk-addzero in the peer settings of your trunk

if i do so this happens:

[2012-08-23 12:58:28] VERBOSE[30082] config.c: == Parsing ‘/etc/asterisk/sip_notify.conf’: [2012-08-23 12:58:28] VERBOSE[30082] config.c: == Found
[2012-08-23 12:58:28] VERBOSE[30082] config.c: == Parsing ‘/etc/asterisk/sip_notify_custom.conf’: [2012-08-23 12:58:28] VERBOSE[30082] config.c: == Found
[2012-08-23 12:58:28] VERBOSE[30082] config.c: == Parsing ‘/etc/asterisk/sip_notify_additional.conf’: [2012-08-23 12:58:28] VERBOSE[30082] config.c: == Found
[2012-08-23 12:58:28] WARNING[30082] chan_sip.c: Host ‘204.236.220.22:49504’ does not implement ‘NOTIFY’
[2012-08-23 12:58:36] VERBOSE[30082] netsock2.c: == Using SIP RTP TOS bits 184
[2012-08-23 12:58:36] VERBOSE[30082] netsock2.c: == Using SIP RTP CoS mark 5
[2012-08-23 12:58:36] NOTICE[30082] chan_sip.c: Call from ‘8XXXXXX0’ (217.10.68.150:5060) to extension ‘49XXXXXX7’ rejected because extension not found in context ‘from-trunk-addzero’.

Okay got it!

exten => _X.,1,NOOP(“Entered fixedcid”)
exten => _X.,2,Set(CALLERID(num)=0${CALLERID(num)})
exten => _X.,3,Set(CALLERID(name)=${CALLERID(num)})
exten => _X.,Goto(from-trunk,${EXTEN},1)
include => from-pstn

IT WORKS … context have to entered in the peer settings also…

Hello,

it does ncot Work.
If i Dial

123456 - 11 it works
but
123456 - 0 dont work

pbx.c: – Auto fallthrough, channel ‘SIP/sipconnect.sipgate.de-00000006’ status is ‘UNKNOWN’

Any ideas?

It seems to me that you may need to look closely at your sip trunk setup - every provider needs something slightly different and there is a good deal of trial and error involved. Personally I never have anything in the user box. I put everything in the peer box. That seems to work much better. There is plenty of information out there on trunk set up, you just need to sift through it and experiment.