SOLVED Setting up Twilio on FusionPBX

Status
Not open for further replies.

phonesimon

Member
Apr 21, 2017
87
16
8
44
You are obfuscating your logs too much. Makes it hard to see what's going on. Leave the IP addresses in.

You are certainly reaching twilio, because you are getting an initial response from them:

recv 379 bytes from udp/[54.172.60.1]:5060 at 16:05:58.590510:
------------------------------------------------------------------------
SIP/2.0 100 Giving a try
Via: SIP/2.0/UDP 100.100.100.100:5080;received=100.100.100.100;rport=5080;branch=z9hG4bK2Q5c9pycaSpmS
From: "asdf" <sip:someguy@gmail.com@vursify.pstn.twilio.com>;tag=mDy3SpvNKrvyD
To: <sip:1234567891@vursify.pstn.twilio.com>
Call-ID: 95ca3ee0-a30d-1236-eab1-56000168b138
CSeq: 120228914 INVITE
Server: Twilio Gateway
Content-Length: 0

The reason I'm asking about your IP is maybe you are sending them a contact header that doesn't get back to your PBX. The Via header I just quoted doesn't tell me whether you are obfuscating a NAT address or a public address. I assume it's public since Twilio puts it in the received= tag but who knows since you changed it all around... Last thought, do you have port 5080 open?
 
  • Like
Reactions: DigitalDaz

i3ioi-iazard

Member
Mar 14, 2018
52
0
6
36
The Address was indeed a public IP and port 5080 is open.

You are obfuscating your logs too much. Makes it hard to see what's going on. Leave the IP addresses in.

You are certainly reaching twilio, because you are getting an initial response from them:



The reason I'm asking about your IP is maybe you are sending them a contact header that doesn't get back to your PBX. The Via header I just quoted doesn't tell me whether you are obfuscating a NAT address or a public address. I assume it's public since Twilio puts it in the received= tag but who knows since you changed it all around... Last thought, do you have port 5080 open?
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,070
577
113
Ask Twilio, the problem looks to be ate their end as you are getting a timeout from them.
 

i3ioi-iazard

Member
Mar 14, 2018
52
0
6
36
Twilio is saying there's nothing for them to look at since SIP signalling isnt making it up to them. They want me to send Wireshark info for them to look further into it.

Anyone know of a working SIP trunk provider similar to Twilio with similar pricing? I am only using Twilio as I was told its one of the cheapest for rates.

Ask Twilio, the problem looks to be ate their end as you are getting a timeout from them.
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,070
577
113
Thats crap:

recv 379 bytes from udp/[54.172.60.1]:5060 at 16:05:58.590510:
------------------------------------------------------------------------
SIP/2.0 100 Giving a try
Via: SIP/2.0/UDP 100.100.100.100:5080;received=100.100.100.100;rport=5080;branch=z9hG4bK2Q5c9pycaSpmS
From: "asdf" <sip:someguy@gmail.com@vursify.pstn.twilio.com>;tag=mDy3SpvNKrvyD
To: <sip:1234567891@vursify.pstn.twilio.com>
Call-ID: 95ca3ee0-a30d-1236-eab1-56000168b138
CSeq: 120228914 INVITE
Server: Twilio Gateway
Content-Length: 0

That comes from twilio gateway
 
  • Like
Reactions: phonesimon

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,070
577
113
As does this:

recv 424 bytes from udp/[54.172.60.1]:5060 at 16:06:06.891917:
------------------------------------------------------------------------
SIP/2.0 408 Request Timeout
Via: SIP/2.0/UDP 100.100.100.100:5080;received=100.100.100.100;rport=5080;branch=z9hG4bK2Q5c9pycaSpmS
From: "asdf" <sip:someguy@gmail.com@vursify.pstn.twilio.com>;tag=mDy3SpvNKrvyD
To: <sip:1234567891@vursify.pstn.twilio.com>;tag=048bc9a6984fdbcd1de39c7c218aea19-3a73
Call-ID: 95ca3ee0-a30d-1236-eab1-56000168b138
CSeq: 120228914 INVITE
Server: Twilio Gateway
Content-Length: 0
 

i3ioi-iazard

Member
Mar 14, 2018
52
0
6
36
This was resolved. Under Outbound Caller ID Number it needed to have the +1XXXXXXX. Once that was added, it worked well!

The problem I am now having is i can only call the number with 1(123)4567. If I call with +1(123)4567 the call fails the same as if i call (123)4567. The brackets are the area code. Logs indicate the call being rejected.

My dialplan that works by dialing with 1(123)4567 is attached.
 

Attachments

  • dialplan.JPG
    dialplan.JPG
    81.1 KB · Views: 72

i3ioi-iazard

Member
Mar 14, 2018
52
0
6
36
Looks like I have sorted everything out. I also gave another SIP trunk provider out and they took all of 2 minutes to configure incoming and outgoing calls.

Thanks everyone for their help!
 

Andrew Perry

New Member
Mar 27, 2017
6
0
1
52
I am trying to do this same setup - would you be able to share your config?

Looks like I have sorted everything out. I also gave another SIP trunk provider out and they took all of 2 minutes to configure incoming and outgoing calls.

Thanks everyone for their help!
 

John

Member
Jan 23, 2017
97
8
8
You make register to NO. Twilio gateway should not be registered. It should be NOREG
 

agile

New Member
Oct 21, 2020
27
2
3
42
Hi, I am trying to setup Twilio trunk. Can you please share the screenshots for Gateway setup, outbound and inbound it will be very helpful.
I have registered the Twilio IP address for incoming calls yet it's not accepting the calls. The Gateway is setup as NOREG
 
Last edited:
Status
Not open for further replies.