So just by changing the transport to tls, seems to break endpoint matching.
Probably need to take this up with Twilio, since following their suggestions doesnāt seem to work in practice for me. Sharing here in case someone has seen the same.
I did a few test calls and gathered the trace output for amusement. All ppi scrubbed I hopeā¦
This test is just an extension to extension call to gather a baseline:
[Aug 31 18:26:09] NOTICE[4681]: res_pjsip_geolocation.c:194 handle_incoming_request: PJSIP/355-00000000: Endpoint has no geoloc_incoming_call_profile. Done.
-- Executing [155@from-internal:1] NoOp("PJSIP/355-00000000", "Call for main desk") in new stack
-- Executing [155@from-internal:2] Dial("PJSIP/355-00000000", "PJSIP/155,20") in new stack
-- Called PJSIP/155
== Using SIP RTP Audio TOS bits 184
== Using SIP RTP Audio TOS bits 184 in TCLASS field.
== Using SIP RTP Audio CoS mark 5
[Aug 31 18:26:09] NOTICE[4681]: res_pjsip_geolocation.c:497 handle_outgoing_request: PJSIP/155-00000001: Endpoint has no geoloc_outgoing_call_profile. Skipping.
[Aug 31 18:26:09] WARNING[4681]: res_pjsip_pubsub.c:3394 pubsub_on_rx_publish_request: No registered publish handler for event presence from 355
-- PJSIP/155-00000001 is ringing
== Spawn extension (from-internal, 155, 2) exited non-zero on 'PJSIP/355-00000000'
[Aug 31 18:26:11] WARNING[4681]: res_pjsip_pubsub.c:3394 pubsub_on_rx_publish_request: No registered publish handler for event presence from 355
[Aug 31 18:27:06] WARNING[4682]: res_pjsip_pubsub.c:3394 pubsub_on_rx_publish_request: No registered publish handler for event presence from 355
== Using SIP RTP Audio TOS bits 184
== Using SIP RTP Audio TOS bits 184 in TCLASS field.
== Using SIP RTP Audio CoS mark 5
[Aug 31 18:27:06] NOTICE[4681]: res_pjsip_geolocation.c:194 handle_incoming_request: PJSIP/355-00000002: Endpoint has no geoloc_incoming_call_profile. Done.
-- Executing [155@from-internal:1] NoOp("PJSIP/355-00000002", "Call for main desk") in new stack
-- Executing [155@from-internal:2] Dial("PJSIP/355-00000002", "PJSIP/155,20") in new stack
-- Called PJSIP/155
== Using SIP RTP Audio TOS bits 184
== Using SIP RTP Audio TOS bits 184 in TCLASS field.
== Using SIP RTP Audio CoS mark 5
[Aug 31 18:27:06] NOTICE[4681]: res_pjsip_geolocation.c:497 handle_outgoing_request: PJSIP/155-00000003: Endpoint has no geoloc_outgoing_call_profile. Skipping.
-- PJSIP/155-00000003 is ringing
-- PJSIP/155-00000003 answered PJSIP/355-00000002
-- Channel PJSIP/155-00000003 joined 'simple_bridge' basic-bridge <508ab5e3-bc99-42b1-ae9d-886a7412cfdd>
-- Channel PJSIP/355-00000002 joined 'simple_bridge' basic-bridge <508ab5e3-bc99-42b1-ae9d-886a7412cfdd>
[Aug 31 18:27:09] NOTICE[4682]: res_pjsip_geolocation.c:497 handle_outgoing_request: PJSIP/155-00000003: Endpoint has no geoloc_outgoing_call_profile. Skipping.
[Aug 31 18:27:09] NOTICE[4681]: res_pjsip_geolocation.c:497 handle_outgoing_request: PJSIP/355-00000002: Endpoint has no geoloc_outgoing_call_profile. Skipping.
-- Channel PJSIP/155-00000003 left 'native_rtp' basic-bridge <508ab5e3-bc99-42b1-ae9d-886a7412cfdd>
-- Channel PJSIP/355-00000002 left 'native_rtp' basic-bridge <508ab5e3-bc99-42b1-ae9d-886a7412cfdd>
[Aug 31 18:27:13] NOTICE[4682]: res_pjsip_geolocation.c:497 handle_outgoing_request: PJSIP/355-00000002: Endpoint has no geoloc_outgoing_call_profile. Skipping.
== Spawn extension (from-internal, 155, 2) exited non-zero on 'PJSIP/355-00000002'
[Aug 31 18:27:13] WARNING[4681]: res_pjsip_pubsub.c:3394 pubsub_on_rx_publish_request: No registered publish handler for event presence from 355
All seems to work fine.
This test is from itsp, using the udp transport:
[Aug 31 18:27:59] NOTICE[4681]: res_pjsip_geolocation.c:194 handle_incoming_request: PJSIP/twilio-na-us-00000004: Endpoint has no geoloc_incoming_call_profile. Done.
-- Executing [+14155551212@from-pstn:1] Dial("PJSIP/twilio-na-us-00000004", "PJSIP/355") in new stack
-- Called PJSIP/355
== Using SIP RTP Audio TOS bits 184
== Using SIP RTP Audio TOS bits 184 in TCLASS field.
== Using SIP RTP Audio CoS mark 5
[Aug 31 18:27:59] NOTICE[4681]: res_pjsip_geolocation.c:497 handle_outgoing_request: PJSIP/355-00000005: Endpoint has no geoloc_outgoing_call_profile. Skipping.
-- PJSIP/355-00000005 is making progress passing it to PJSIP/twilio-na-us-00000004
-- PJSIP/355-00000005 answered PJSIP/twilio-na-us-00000004
-- Channel PJSIP/355-00000005 joined 'simple_bridge' basic-bridge <8f7943c0-d388-404f-9f89-48b6bdbcdd54>
-- Channel PJSIP/twilio-na-us-00000004 joined 'simple_bridge' basic-bridge <8f7943c0-d388-404f-9f89-48b6bdbcdd54>
[Aug 31 18:28:03] WARNING[4681]: res_pjsip_pubsub.c:3394 pubsub_on_rx_publish_request: No registered publish handler for event presence from 355
-- Channel PJSIP/355-00000005 left 'native_rtp' basic-bridge <8f7943c0-d388-404f-9f89-48b6bdbcdd54>
-- Channel PJSIP/twilio-na-us-00000004 left 'native_rtp' basic-bridge <8f7943c0-d388-404f-9f89-48b6bdbcdd54>
== Spawn extension (from-pstn, +14155551212, 1) exited non-zero on 'PJSIP/twilio-na-us-00000004'
[Aug 31 18:28:36] WARNING[4681]: res_pjsip_pubsub.c:3394 pubsub_on_rx_publish_request: No registered publish handler for event presence from 355
Test call from itsp using the tls transport
[Aug 31 18:33:31] NOTICE[4784]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'INVITE' from '<sip:hello@voice-example.pstn.twilio.com>' failed for '54.172.60.3:52374' (callid: f8e74ffdb8c660b7c2ad316a3c5b6902@0.0.0.0) - No matching endpoint found
Following this guide: https://assets.cdn.prod.twilio.com/documents/TwilioElasticSIPTrunking-AsteriskPBX-Configuration-Guide-Version2-1-FINAL-09012018.pdf
Iām curious if changing the dialplan to the different āfrom '<sip:hello@voice-example.pstn.ā will then match my endpoint defined in the dialplan.
Dialplan for reference:
[from-pstn]
exten => _+1NXXXXXXXXX,1,Dial(PJSIP/355)