I am trying to implement a decryption program in asterisk.
Basically, the carrier sends me the destination numbers (B-Numbers) as encrypted numbers. They have also sent a python script to be used to decrypt the numbers before sending to the gateway.
I have loaded the python script on the server and created a custom destination to pass the Call through the script to decrypt the B-number
before sending the call to the gateway
I have created a context and routed the inbound calls to the context. From the cli, the call ends when it gets to the context and the script never gets executed.
Context:
[outbound20]
exten => _X.,1,NoOp(Entering custom script context)
same => n,System(/usr/bin/python3 /custom/script.py ${CALLERID(num)})
same => n,Dial(PJSIP/Trunk-name/${EXTEN})
The python script is the /custom/script.py file and is loaded correctly on the server with the necessary permissions
This is the error I get below when i tried a test call : The context gets into new stack but script never gets executed and call ends
"outbound20,_X.,1") in new stack