0

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:+48123455555@77.79.xxx.yyy?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

Jithin Kuriakose
  • 317
  • 5
  • 22
  • I think if you just do `sip:+48123455555@77.79.xxx.yyy?customParameter=test1` it will change it to an "X-customParameter" header. You should be able to see what is passed in your Twilio console logs – Andy Sep 06 '17 at 13:53
  • Thank You for comment. In Twilio log console in request inspector i can see sip:+4812345555@77.79.xxx.yyy?customParameter=test1 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 Sep 06 '17 at 14:03
  • What about in https://www.twilio.com/console/voice/logs/calls – Andy Sep 06 '17 at 14:21
  • 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 Sep 06 '17 at 14:33

1 Answers1

0

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.