I have a freeSwitch implementation using Twilio's Elastic SIP trunking. For the most part this is working flawlessly. I can receive incoming call from a PSTN to my SIP trunk and onwards to my freeswitch PBX. I can also initiate calls on the termination trunk without issues.
I am having problems when my FollowMe feature tries to dial out through the Termination SIP trunk to call my cell phone.
I have used FS_CLI to monitor the communication out to Twilio, and can see the SIP Invite message - but Twilio does not respond back.
I have even compared (for the most part) the request between when I call out from my extension to a PSTN, and when freeSwitch attempts to call out with FollowMe. They look similar. I have provided the request below, and if anyone can see something thats weird, please let me know. This request just repeats itself and eventually gives up - no response from Twilio, and no log of it in either the Debugger or the Trunk logs. (I have XXXX'ed my numbers)
send 1506 bytes to udp/[54.172.60.1]:5060 at 16:47:51.442983:
------------------------------------------------------------------------
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP XX.XX.XX.XX;rport;branch=z9hG4bKe92m35UyNXe2a
Max-Forwards: 59
From: "+1XXXXXXXXX0" <sip:[email protected]>;tag=3UHvjrXHmUyXp
To: <sip:[email protected]>
Call-ID: a369c6b9-82af-1235-e490-0050561ee798
CSeq: 104375771 INVITE
Contact: <sip:[email protected]:5060;transport=udp;gw=a741d1e8-2e0a-4527-b18d-518edbe57d73>
User-Agent: FreeSWITCH
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 246
Diversion: <sip:[email protected]>;reason=unconditional
X-Twilio-AccountSid: XXXXXXXXXXX
X-Twilio-CallSid: CA05acdaaae18a720113ab2e78cbd1db63
X-accountcode: admin1.oxigenx.com
X-FS-Support: update_display,send_info
Remote-Party-ID: "+1XXXXXXXXX0" <sip:[email protected]>;party=calling;screen=yes;privacy=off
v=0
o=FreeSWITCH 1489394171 1489394172 IN IP4 XX.XX.XX.XX
s=FreeSWITCH
c=IN IP4 XX.XX.XX.XX
t=0 0
m=audio 29500 RTP/AVP 0 101 13
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=rtpmap:13 CN/8000
a=ptime:20
------------------------------------------------------------------------