At the moment i have such configuration mostly in Twilio environment.
The sip trunk seems to be properly configured between Twilio and Asterisk - origination sip URI like sip:77.79.xxx.yyy - i have number associated with this trunk 48123455555
When i call directly 48123455555 i am connected with Asterisk extension.
What i want to achieve is to forward calls incoming to my others numbers in Twilio to 48123455555 so calls would be answered on external asterisks, but i need to send custom parameters in sip header.
I've tried to set up twiMLbean on my numbers (48123456789 48123456788 48123456787)
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Dial>
<Sip>sip:[email protected]?X-customParameter=test1;</Sip>
</Dial>
</Response>
Unfortunately i am disconnected.
Any suggestion how this TwiML bin should looks like to forward calls from PSTN to asterisk using this sip trunk?
TIA Tomek
Solution proposed by Twilio support is to buy one number witch will be associated with SIP trunk, and another number which will be a target for redirection from mobile phone. Then it is possible to set up any ivr logic on second number and Dial to number connected to SIP trunk
Twilio landline - sip trunk set-up
One thing to consider is cost of solution as for low amount of calls/minutes it may be cheaper to do direct transfer to your target landline number in specific country.