Search code examples
asterisktelephony

asterisk get credit card info


I`m trying to build a script that will capture the credit card info like card number,cvc and expiration date using asterisk 11.x and asterisk-java library for AMI/AGI integration.

Right now I am able to build a script that will acquire that info if it is called via dialplan but i have a different scenario:
1. A call enters a queue.
2. An agent from the specific queue answer the call
3. The caller wants to input the card details
4. After the caller has entered the card details is redirected back to agent to continue the call.

My specific problem is related to step 3 as I do not know how to route the caller to my AGI and then back to the same agent. (eventually the agents has to be still involved in (some) call to guarantee that when the caller returns from agi it is still available)
Any idea how can I achieve that ? I know that this is a common practice so I think that there has to be a way.


Solution

  • When the call is delivered to the agent, use a macro to set a custom channel variable with the agent ID or extension in it.

    Then, when your credit-card authentication function is done, read the variable and use an AGI command to transfer the call back to the agent.

    Further Reading

    Note if this solution solves your problem, please 'accept' it to make it easier for others with the same issue to find it. thanks!