If condition for callerid


#1

Hi All,

I need to 2 conditilon
if callerid is yyyyyyy gotoSub()
if callerid is xxxxxxx gotuSob()

Extension config;

[ext-did-0001]
include => ext-did-0001-custom
exten => fax,1,Goto(${CUT(FAX_DEST,^,1)},${CUT(FAX_DEST,^,2)},${CUT(FAX_DEST,^,3)})
exten => s,1,ExecIf($["${FROM_DID}" = “”]?Set(__FROM_DID=${EXTEN}))
exten => s,n,Gosub(app-blacklist-check,s,1())
exten => s,n,Set(CDR(did)=${FROM_DID})

exten => s,n,ExecIf($[ “${CALLERID(name)}” = “xxxx” ] ?GoSub(NUMBERS1,cell${RAND(1,4)},1)
exten => s,n,ExecIf($[ “${CALLERID(name)}” = “yyyy” ]?GoSub(NUMBERS2,cell${RAND(1,4)},1)

exten => s,n,Set(CHANNEL(musicclass)=default)
exten => s,n,Set(__MOHCLASS=default)
exten => s,n,Set(__CALLINGPRES_SV=${CALLERPRES()})
exten => s,n,Set(CALLERPRES()=allowed_not_screened)
exten => s,n(dest-ext),Goto(ext-trunk,2,1)


#2

Its work with that configs :slight_smile:

Thanks