Can anybody help me? I am just learning Asterisk and have the following code in extensions.conf, which i believe is meant to update a table and block a number, when a user presses the 5 key on their phone.
However it’s not working and I can’t work it out. Is there anywhere else in Asterisk I should be checking? I can’t see any reference to the number 5 key, but I am assured that is how it worked before.
exten => s,1,Noop(${MASTER_CHANNEL(USER_ID)} ,, ${MASTER_CHANNEL(CALLERID)} ,, ${MASTER_CHANNEL(IS_CONTACT_EXIST)} ,, ${MASTER_CHANNEL(CONTACT_ID)})
exten => s,2,GotoIf($["${MASTER_CHANNEL(IS_CONTACT_EXIST)}" = "1"]?update,1:insert,1)
exten => update,1,Set(ODBC_PB_UPDATE_CONTACT(${MASTER_CHANNEL(CONTACT_ID)},1)=add)
exten => update,n,playback(pbxsystem-phone-has-been-blocked)
exten => update,n,hangup
exten => insert,1,Set(ODBC_PB_INSERT_CONTACT(${MASTER_CHANNEL(USER_ID)},${MASTER_CHANNEL(CALLERID)},1)=add)
exten => insert,n,playback(pbxsystem-phone-has-been-blocked)
exten => insert,n,hangup
;exten => active,1,GotoIf($["${ARG4}" = "${ARG1}"]?play,1)
;exten => play,1,playback(${ARG2:0: ${MATH(${LEN(${ARG2})}-4,i)}})