0
votes

At the moment i have such configuration mostly in Twilio environment.

Twilio asterisk configuration

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

1
I think if you just do sip:[email protected]?customParameter=test1 it will change it to an "X-customParameter" header. You should be able to see what is passed in your Twilio console logsAndy
Thank You for comment. In Twilio log console in request inspector i can see <?xml version="1.0" encoding="UTF-8"?> <Response> <Dial> <Sip>sip:[email protected]?customParameter=test1</Sip> </Dial> </Response> But i suppose my problem is rather relateto Astersix/twiML/transfer to sip trunk because i cannot connect even when i remove custom parameters :(Tomek Kalbarczyk
Call logs For number i want to forward to sip trunk 48123456789 (48601...is my mobile) 04:02:29 +02:00 2017-09-06 Incoming +48601089244 +48123456789 Phone Completed 5 secs No incoming/outgoing calls in log for 4812345555 number.Tomek Kalbarczyk

1 Answers

0
votes

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.