Help with Twilio SIP Trunk on FusionPBX 4.5

Status
Not open for further replies.

agile

New Member
Oct 21, 2020
27
2
3
42
Hi Guys I am struggling to setup Twilio trunk configuration on fusionpbx any help will be greatly appreciated.

I have setup Gateway as following
Gateway: Twilio

Username; usernamefortwilio
Password: passwdfortwilio

From User: left empty
From Domain: left empty

Proxy: something.pstn.twilio.com
Realm: left empty
Expire Seconds: 800
Register: True
Retry Seconds: 30

Context: public
Hostname: left empty

Enabled: False
Description: left empty

Any idea what I did wrong?
I can share screenshots of inbound and outbound too.

Appreciate if anyone can give some guidance.
 

UCtech

Member
Jan 9, 2019
34
6
8
If you haven't already you'll need to set up the inbound Twilio gateways from these IP addresses:
There are 4 east coast and 4 west coast. Calls can come through any of them, so you need to set them all up (and/or International as well). Twilio has great redundancy but this requires a bit more work to set up. As for each field:
Gateway: Descriptive Name -- might want to name each IP gateway with something that helps you to identify/differentiate each, like TwilOregon1
User Name & Password: Depends on how you set up your Twilio -- if you use no auth but your IP's then put bogus info in each field (I think Fusion will not let you leave them blank). Otherwise, put the auth that Twilio gave you in the Trunk settings.
Proxy: IP address from the link above corresponding to which Twilio link you are setting up.
Register: False if not using auth, True if yes, depending on your Twilio settings
Enabled: True
That's all for inbound normally.

Outbound Gateway setup:
Same as above except for the Proxy. Use DomainNameThatTwilioProvides.pstn.twilio.com

Hope that helps
 
  • Like
Reactions: agile

agile

New Member
Oct 21, 2020
27
2
3
42
Thanks for your help guys. Finally, I got this to work I will post all the screenshots to make it easy for others soon.
 

zero48

New Member
Mar 26, 2021
10
2
3
57
Thanks for your help guys. Finally, I got this to work I will post all the screenshots to make it easy for others soon.
Hello, Can you post the screenshoots I would like to add a Twilio to my fusionpbx... thanks in advance
 

agile

New Member
Oct 21, 2020
27
2
3
42
Hello, Can you post the screenshoots I would like to add a Twilio to my fusionpbx... thanks in advance
Here you go a couple of points
keep an eye on the Twilio debug if you get any errors
Twilio will not allow you to send outbound calls if you do not have the number from them or present the number to them with the Outbound Caller ID Number
always for outbound add +1 for (USA)
I have attached screenshots for you to understand how I did it.
 

Attachments

  • twilio trunk Gateway setup.PNG
    twilio trunk Gateway setup.PNG
    27.3 KB · Views: 97
  • inbound Twilio.PNG
    inbound Twilio.PNG
    9.6 KB · Views: 93
  • outbound.PNG
    outbound.PNG
    27.4 KB · Views: 78
Last edited:
  • Like
Reactions: FuncVOIP and zero48

Scubadave112

Member
Jan 24, 2020
122
19
18
36
you guys have any trouble with this using internal profile? I don't understand cause I added all the Twilio IPs to the ACL and even plugged them into my fail2ban white list for good measure...

For some reason the weirdest thing happen... a call comes in and it drops after one second then Twilio sends the call right back to my server and it works just fine and it only does this about 1 out of 10 incoming calls. I can't find any pattern at all to identify the cause of this. It seems like when I put the origination url in Twilio in as sip:xxx.xxx.xxx.xxx:5080 (so it uses external profile) there is no issues.

not a big deal but I'm just puzzled as to why sometimes it works via 5060 (internal) and other times it doesn't
 
Status
Not open for further replies.