hi all
I need to specify the DID that will be used if I add prefix code.
for exp: if I start my dialed nomber with *43, it will go through specific DID.
what is the method to do so?
where can I find the code
where can I find the code allowing to specify outbound cid?
will I be able to add argument with the DID ?
hi I cloned the
hi
I cloned the dialout-passthrough and added those lines as ARG6
(copied from userext-base)
;; individual external caller id
exten => s,n(calleridallowed),NoOp(CLIMYID=${CLIMYID})
exten => s,n,NoOp(MYID=${MYID})
exten => s,n,Set(CLI=${DB(TL/${CLIMYID}/callerid)})
exten => s,n,GotoIf($["${CLI}" != ""]?chkcallfwd)
exten => s,n,Set(CLI=${DB(TL/${MYID},${ARG6}/callerid)})
exten => s,n,GotoIf($["${CLI}" != ""]?chkcallfwd)
exten => s,n,Set(CLI=${DB(TL/TENANT/${tenant}/callerid)})
exten => s,n,NoOp(CLI=${CLI})
exten => s,n(chkcallfwd),NoOp(MYID=${MYID})
exten => s,n,NoOp(INCOMINGCLI=${INCOMINGCLI})
exten => s,n,NoOp(CALLFWD=${CALLFWD})
exten => s,n,GotoIf($["${CALLFWD}" = "" & "${FOLLOWME}" != "1"]?setcalleridasabove)
exten => s,n,Set(CDR(accountcode)=${tenant})
exten => s,n,NoOp(CFRETAINCLI=TL/${tenant}${TL_DASH}${ORIG_EXTEN}/CFRETAINCLI)
exten => s,n,GotoIf($["${DB(TL/${tenant}${TL_DASH}${ORIG_EXTEN}/CFRETAINCLI)}" = ""]?setcalleridasabove)
it changed the caller id to anonymous and not the one I set in the caller ID arg.
I think the code I copy from userext is too long, but I didn't know which lines to loose.
any idea?
because CLI is a madeup
because CLI is a madeup variable that has nothing to do with asterisk.. you need to set the callerid function with your dialplan and not mess with DB values .. otherwise you undermine the whole thing. a single Set command is all you need, just reasearch the function CALLERID
we tried to addexten =>
we tried to add
exten => s,n,Set(CALLERID(num)=${ARG6})
(after erasing the lines we added yesterday)
ARG6 is the sixth argument in the list (this is how we know the ARG no. ?)
anyway, its not working, it still show anonymous number.
in the CLI I saw that it send the ext. number as the CALLERID(num)=105
i would clone the pass-through scripts, they dont have code to set callerid. then in your cloned version, add the code allowing you to specify outbound callerid and you wont have to worry about later code pulling a different value from the ATDB