Help with custom application

Hello all.

At first sorry for my bad english.
Can anyone help me to build custom context? My case is - I have 2 sip trunks with SIP providers, I need to do following - Call to SIP trunk A (for example from my mobile phone) hear the IVR (or announcement?) that says me to input PIN, after that
input international destination number and connect to it via SIP trunk B. Is this possible?

Any help will be appreciated.

However, make sure to use a good PIN as this would be considered a bit of a security risk.

Thank you for your fast replay. It was very helpful for me.
Best regards.