<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m trying to restore a SIP session dialogue context and  found dlg_get(callid, ftag, ttag) function for that.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">However, I cannot access the To tag. I noticed on the 180 RINGING there was already an self-generated included on this response, but I also could not access its value.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">When receiving the SIP INVITE request I used the dlg_manage() and the context was initially stored.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">if(is_known_dlg()) {</span><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">                xlog("Request $rm from $ci is in-dialog\n");<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">                xlog(">>From tag is $ft and To tag is $tt\n");<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">                # Needed to later restore the dialog
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">                $shv(ftag)=$ft;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">                $shv(ttag)=$tt;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">        }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">15(49100) ERROR: <script>: Request INVITE from 76589ZWQ5NzIyYjMzNDI1YjVjM2E5ZWU5NjhkYzEyNjE3MzQ is in-dialog</span><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">15(49100) exec: *** cfgtrace:request_route=[MATRIX] c=[/etc/kamailio/kamailio.cfg] l=1021 a=25 n=xlog<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">15(49100) DEBUG: pv [pv_core.c:376]: pv_get_xto_attr(): no Tag parameter<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">15(49100) ERROR: <script>: >>From tag is 8fd06474 and To tag is <null><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Since there was a self-generated one (after the 180 RINGING being sent), I rechecked the $tt and $dlg(to_tag) values and both still returned null values.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">15(49100) DEBUG: tm [t_lookup.c:1083]: t_check_msg(): DEBUG: t_check_msg: T already found!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">15(49100) DEBUG: <core> [tcp_main.c:2196]: tcpconn_send_put(): send from reader (49100 (15)), reusing fd<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">15(49100) DEBUG: <core> [tcp_main.c:2430]: tcpconn_do_send(): sending...<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">15(49100) DEBUG: <core> [tcp_main.c:2464]: tcpconn_do_send(): after real write: c= 0x7effdf7da860 n=396 fd=5<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">15(49100) DEBUG: <core> [tcp_main.c:2465]: tcpconn_do_send(): buf=<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">SIP/2.0 180 ringing<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">Via: SIP/2.0/TCP 192.168.1.5:58751;branch=z9hG4bK-524287-1---a64e0a42199ee419;rport=61134;received=85.138.200.8<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">To: <sip:1001@decasa.website>;tag=a6a1c5f60faecf035a1ae5b6e96e979a-f6a3<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">From: "1000"<sip:1000@decasa.website>;tag=8fd06474<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">Call-ID: 76589ZWQ5NzIyYjMzNDI1YjVjM2E5ZWU5NjhkYzEyNjE3MzQ<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">CSeq: 1 INVITE<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">Server: kamailio (4.3.0 (x86_64/linux))<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">Content-Length: 0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">..., shmem=0x7effdf7e1e00: SIP/2.0 180 ringingght(): DEBUG: reply sent out. buf=0x7effec023bf8: SIP/2.0 180 ringing<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">15(49100) DEBUG: tm [t_reply.c:657]: _reply_light(): DEBUG: _reply_light: finished<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">15(49100) DEBUG: sl [sl.c:272]: send_reply(): reply in stateful mode (tm)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">15(49100) exec: *** cfgtrace:request_route=[MATRIX] c=[/etc/kamailio/kamailio.cfg] l=1031 a=25 n=xlog<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">15(49100) DEBUG: dialog [dlg_hash.c:640]: dlg_lookup(): ref dlg 0x7effdf7e1bf0 with 1 -> 2<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">15(49100) DEBUG: dialog [dlg_hash.c:642]: dlg_lookup(): dialog id=5769 found on entry 128<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">15(49100) DEBUG: dialog [dlg_hash.c:858]: dlg_unref(): unref dlg 0x7effdf7e1bf0 with 1 -> 1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">15(49100) ERROR: <script>: Dialog To Tag: <null>                                                                                                   <==
</span><span style="font-family:"Times New Roman",serif">xlog("</span><span style="font-family:"Times New Roman",serif">Dialog To Tag:</span><span style="font-family:"Times New Roman",serif"> $dlg(to_tag)\n");</span><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">15(49100) exec: *** cfgtrace:request_route=[MATRIX] c=[/etc/kamailio/kamailio.cfg] l=1033 a=25 n=xlog<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">15(49100) DEBUG: pv [pv_core.c:376]: pv_get_xto_attr(): no Tag parameter<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">15(49100) ERROR: <script>: >>From2 tag is 8fd06474 and To tag is <null><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Many thanks,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><span style="font-size:9.0pt;font-family:"Verdana",sans-serif">Joao Alves</span></b><b><span style="font-size:9.0pt;font-family:"Verdana",sans-serif"><o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Verdana",sans-serif;color:black">Solution Architect, Unified Communications</span><span lang="EN-GB" style="font-size:7.5pt;font-family:"Verdana",sans-serif"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:7.5pt;font-family:"Verdana",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement,
you may review at http://www.amdocs.com/email_disclaimer.asp
</body>
</html>