<div dir="ltr">Looks like a bug to me. Your first snippet shows the contact stored in the database uses the 'sips:' scheme, but sofia_contact is returning 'sip:'<div><br></div><div>In the code it looks like sofia_contact fetches the contact using select_from_profile which invokes contact_callback. In contact_callback it's hardcoded to use sip: plus the result of sofia_glue_strip_proto. That looks to me like it can never return a sips URI even though it's stored in the database.</div><div><br></div><div>I'd file a jira. </div><div><br></div><div>Steve</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 18 November 2016 at 10:08, Tim Smith <span dir="ltr"><<a href="mailto:randomdev4@gmail.com" target="_blank">randomdev4@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Debian GNU/Linux 8 (jessie)<br>
Linux my 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19)<br>
x86_64 GNU/Linux<br>
FreeSWITCH Version 1.6.12-20-b91a0a6~64bit (-20-b91a0a6 64bit)<br>
<br>
I have a Vtech handset with TLS/SRTP enabled registered with<br>
Freeswitch as below:<br>
<br>
<br>
Call-ID: a0000a0a000aa000<br>
User: <a href="mailto:2001@my.example.com">2001@my.example.com</a><br>
Contact: "my" <<a href="http://sips:2001@198.51.100.81:58348" rel="noreferrer" target="_blank">sips:2001@198.51.100.81:58348</a><wbr>><br>
Agent: Vtech Vesa VSP736A 2.0.3.2-0<br>
Status: Registered(TLS)(unknown) EXP(2016-11-18 10:56:57) EXPSECS(3646)<br>
Ping-Status: Reachable<br>
Ping-Time: 0.00<br>
Host: my<br>
IP: 198.51.100.81<br>
Port: 58348<br>
Auth-User: 2001<br>
Auth-Realm: <a href="http://my.example.com" rel="noreferrer" target="_blank">my.example.com</a><br>
MWI-Account: <a href="mailto:2001@my.example.com">2001@my.example.com</a><br>
<br>
<br>
sofia_contact is happy :<br>
<br>
freeswitch@my>sofia_contact internal/2001<br>
sofia/internal/<a href="http://sip:2001@198.51.100.81:58348" rel="noreferrer" target="_blank">sip:2001@198.<wbr>51.100.81:58348</a><br>
<br>
I have an inbound dial plan configured as follows:<br>
<br>
<include><br>
<extension name=“test_inbound"><br>
<condition field="destination_number" expression=“^(15550100)$"><br>
<action application="set" data="domain_name=$${domain}"/<wbr>><br>
<action application="bridge" data="${sofia_contact(<wbr>internal/2001)}"/><br>
</condition><br>
</extension><br>
</include><br>
<br>
The problem is Freeswitch is sending invites over SIP/RTP and not<br>
TLS/SRTP and so the calls never get through :<br>
<br>
INVITE <a href="http://sip:2001@198.51.100.81:58348" rel="noreferrer" target="_blank">sip:2001@198.51.100.81:58348</a> SIP/2.0<br>
Via: SIP/2.0/UDP 203.0.113.4;rport;branch=<wbr>z9hG4bKvHjgXXpFF77XK<br>
From: "Anonymous" <<a href="mailto:sip%3Aanonymous@203.0.113.4">sip:anonymous@203.0.113.4</a>>;<wbr>tag=rKmXQjZN8SFXp<br>
To: <<a href="http://sip:2001@198.51.100.81:58348" rel="noreferrer" target="_blank">sip:2001@198.51.100.81:58348</a>><br>
m=audio 32190 RTP/AVP 8 98 9 101<br>
a=rtpmap:8 PCMA/8000<br>
a=rtpmap:98 G726-32/8000<br>
a=rtpmap:9 G722/8000<br>
a=rtpmap:101 telephone-event/8000<br>
a=fmtp:101 0-16<br>
a=ptime:20<br>
<br>
______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a></blockquote></div><br></div>