<p></p>
<h3>Description</h3>
<p>Examples of <a href="https://tools.ietf.org/html/rfc7840#section-7" rel="nofollow">RFC7840</a> contains this response:</p>
<div class="highlight highlight-text-xml"><pre>   <<span class="pl-ent">locationResponse</span> <span class="pl-e">xmlns</span>=<span class="pl-s"><span class="pl-pds">"</span>urn:ietf:params:xml:ns:geopriv:held<span class="pl-pds">"</span></span>>
     <<span class="pl-ent">locationUriSet</span> <span class="pl-e">expires</span>=<span class="pl-s"><span class="pl-pds">"</span>2006-01-01T13:00:00.0Z<span class="pl-pds">"</span></span>>
       <<span class="pl-ent">locationURI</span>>
                   https://ls.example.com:9768/357yc6s64ceyoiuy5ax3o
           </<span class="pl-ent">locationURI</span>>
       <<span class="pl-ent">locationURI</span>>
                   sip:9769+357yc6s64ceyoiuy5ax3o@ls.example.com
       </<span class="pl-ent">locationURI</span>>
     </<span class="pl-ent">locationUriSet</span>>

     <<span class="pl-ent">routingInformation</span>
         <span class="pl-e">xmlns</span>=<span class="pl-s"><span class="pl-pds">"</span>urn:ietf:params:xml:ns:geopriv:held:ri<span class="pl-pds">"</span></span>>
       <<span class="pl-ent">service</span> <span class="pl-e">serviceUri</span>=<span class="pl-s"><span class="pl-pds">"</span>urn:service:sos<span class="pl-pds">"</span></span>>
         <<span class="pl-ent">dest</span>>sip:112@example.com</<span class="pl-ent">dest</span>>
         <<span class="pl-ent">dest</span>>sips:112@example.com</<span class="pl-ent">dest</span>>
         <<span class="pl-ent">dest</span>>xmpp:112@example.com</<span class="pl-ent">dest</span>>
       </<span class="pl-ent">service</span>>
     </<span class="pl-ent">routingInformation</span>>

   </<span class="pl-ent">locationResponse</span>></pre></div>
<p>When the <code>lost</code> module receives such a response, then generate this message</p>
<pre><code>http_client [functions.c:299]: curL_query_url(): Malformed URL used in http client (url: 
                                                                                         https://ls.example.com:9768/357yc6s64ceyoiuy5ax3o
                                                                                      )
lost [functions.c:325]: lost_held_function(): dereferencing location failed: 3
</code></pre>
<p>This error is fixed when if I strip spaces in a string of <code>locationURI</code> element.</p>
<h3>Troubleshooting</h3>
<h4>Reproduction</h4>
<p>Send xml eample from RFC as responce for <code>lost_held_query</code> function call.</p>
<h3>Possible Solutions</h3>
<p>Strip leading and trailing spaces of <code>locationURI</code> element.<br>
Maybe the required changes here<br>
<a href="https://github.com/kamailio/kamailio/blob/master/src/modules/lost/functions.c#L295-L301">https://github.com/kamailio/kamailio/blob/master/src/modules/lost/functions.c#L295-L301</a></p>
<h3>Additional Information</h3>
<ul>
<li><strong>Kamailio Version</strong> - output of <code>kamailio -v</code></li>
</ul>
<pre><code>[root@ip-100-86-47-115 ~]# kamailio -v
version: kamailio 5.5.0-dev3 (x86_64/linux) 0f572c
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 0f572c 
compiled on 04:01:25 Nov 29 2020 with gcc 8.3.1
</code></pre>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>
<pre><code>[root@ip-100-86-47-115 ~]# cat /etc/os-release 
NAME="CentOS Linux"
VERSION="8 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="8"
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2569">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZP447ZNC5BLGITZPSDSSO2I7ANCNFSM4UHW5LHQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZMLI4JSL74WDMRLMQDSSO2I7A5CNFSM4UHW5LH2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4LHKR3IQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2569",
"url": "https://github.com/kamailio/kamailio/issues/2569",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>