Hi all,
someone built code in asterisk and I’m trying to setup a line in the script that will bypass the pin code if the peer is a fax machine, specifically ext 2006
The line is :
[sub_leastcost_maybepin]
exten => _613NXXXXXX,1,Return
exten => _819NXXXXXX,1,Return
exten => _1800NXXXXXX,1,Return
exten => _1888NXXXXXX,1,Return
exten => _1877NXXXXXX,1,Return
exten => _1866NXXXXXX,1,Return
exten => _1855NXXXXXX,1,Return
; Below is to not request pin code if peer is 2006 IS Fax Machine
exten => _X.,1,GosubIf($["${SIPCHANINFO(peername)}" != “IS Fax”]?sub_pincode,s,1)
exten => _X.,1,GosubIf($["${SIPCHANINFO(peerip)}" != ‘172.20.32.32’]?sub_pincode,s,1)
; exten => _X.,1,Gosub(sub_pincode,s,1)
exten => _X.,n,Return
; Called with ${EXTEN:1} (i.e. no leading 8 or 9)
The lines that are bolded is what Im playing with but everything I have tried does not work. I want to bypass the pincode and dialout if the peer matches.
Can someone help?