# Asterisk is refusing to respond to INVITE on a Twilio Elastic SIP Trunk

**URL:** <https://community.asterisk.org/t/asterisk-is-refusing-to-respond-to-invite-on-a-twilio-elastic-sip-trunk/104707>\
**Category:** Asterisk SIP\
**Created:** [October 2, 2024, 8:37am UTC](https://community.asterisk.org/t/asterisk-is-refusing-to-respond-to-invite-on-a-twilio-elastic-sip-trunk/104707 "2024-10-02T08:37:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hohum](https://avatars.discourse-cdn.com/v4/letter/h/b4bc9f/32.png) [@hohum](https://community.asterisk.org/u/hohum)\
**Post date:** [October 2, 2024, 8:37am UTC](https://community.asterisk.org/t/asterisk-is-refusing-to-respond-to-invite-on-a-twilio-elastic-sip-trunk/104707/1 "2024-10-02T08:37:03Z")

</div>

Hello All,

I have a strange issue. My Asterisk server is REFUSING to answer an INVITE from a Twilio Elastic SIP Trunk. I’ve tried to boil my configuration down to something simple that should work, but it doesn’t. I know the OS is receiving the INVITE because I’ve attached a tshark dump showing that it’s hitting the server, but there’s nothing on the console to indicate what might be going wrong even with core set debug 5 and pjsip set logger on. The INVITE is simply being ignored by Asterisk.

Here’s as simple of a pjsip.conf as I can make:

```auto
[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0:5060

[twilio_identify]
type=identify
endpoint=twilio_endpoint
match=54.244.51.0/24 ; Match Twilio's IP range

[twilio_endpoint]
type=endpoint
context=from-twilio
disallow=all
allow=ulaw,alaw,gsm
direct_media=no
rtp_symmetric=yes
force_rport=yes
rewrite_contact=yes

```

And my extensions.conf:

```auto
[from-twilio]
exten => _+1NXXXXXXXXX,1,NoOp(Incoming call from Twilio to ${EXTEN})
exten => _+1NXXXXXXXXX,n,Answer()
exten => _+1NXXXXXXXXX,n,Playback(welcome-message) ; Play a welcome message to test
exten => _+1NXXXXXXXXX,n,Hangup()

```

Any help is appreciated.

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [October 2, 2024, 8:38am UTC](https://community.asterisk.org/t/asterisk-is-refusing-to-respond-to-invite-on-a-twilio-elastic-sip-trunk/104707/2 "2024-10-02T08:38:39Z")

</div>

What does “pjsip set logger on” actually show? Is the packet there?

---

<div class="post-metadata">

**Author:** ![martinnystrom](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@martinnystrom](https://community.asterisk.org/u/martinnystrom)\
**Post date:** [October 2, 2024, 2:01pm UTC](https://community.asterisk.org/t/asterisk-is-refusing-to-respond-to-invite-on-a-twilio-elastic-sip-trunk/104707/3 "2024-10-02T14:01:50Z")

</div>

You can also verify that Asterisk is actually listening on the 5060 port.

`netstat -peanut | grep 5060`

---

<div class="post-metadata">

**Author:** ![iraemus](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/iraemus/32/7115_2.png) [@iraemus](https://community.asterisk.org/u/iraemus)\
**Post date:** [October 2, 2024, 9:53pm UTC](https://community.asterisk.org/t/asterisk-is-refusing-to-respond-to-invite-on-a-twilio-elastic-sip-trunk/104707/4 "2024-10-02T21:53:54Z")

</div>

This thread shows how myself and others connected to Twilio.

> [@ASTERISK and TWILIO](https://community.asterisk.org/t/asterisk-and-twilio/100432):
>
> Hi, I am sorry if it is not the good place for this question. On asterisk I use 2 SIP phone numbers. 1 from OVH and 1 from TWILIO. in sip.conf I have: [general] ... register=\>OVHnumber:OVHpass@xxx.yy.sip.ovh register=\>TWILIOnum:TWILIOpass@zzz.sip.us1.twilio.com ... [OVHnumber] type=friend host=xxx.yy.sip.ovh context=incoming username=OVHnumber remotesecret=OVHpass [provider1] type=peer username=OVHnumber remotesecret=OVHpass nat=force\_rport,comedia host=OVHnumber:OVHpass@xxx.yy.sip.ovh:50…

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [November 1, 2024, 9:54pm UTC](https://community.asterisk.org/t/asterisk-is-refusing-to-respond-to-invite-on-a-twilio-elastic-sip-trunk/104707/5 "2024-11-01T21:54:17Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
