<div dir="ltr"><div>Hi,</div><div>it's perfect, thanks a lot !</div><div><br></div><div>I use json to catch and send my data to <span style="font-size:14.6667px">t_new_request</span></div><div><div style="color:rgb(195,198,203);background-color:rgb(17,20,24);font-family:"Droid Sans Mono","monospace",monospace;font-size:14px;line-height:19px;white-space:pre"><div><span style="color:rgb(168,173,179)">t_new_request(</span><span style="color:rgb(0,168,132)">"INFO"</span>,<span style="color:rgb(0,168,132)">"$tu"</span>,<span style="color:rgb(0,168,132)">"$fu"</span>,<span style="color:rgb(0,168,132)">"$tu"</span>,<span style="color:rgb(168,173,179)"> </span>,<span style="color:rgb(168,173,179)"> </span><span style="color:rgb(0,168,132)">"$json(data)"</span><span style="color:rgb(168,173,179)">)</span>;</div><div><br></div><div><div style="line-height:19px"><div><span style="color:rgb(168,173,179)">local_route {</span></div><div><span style="color:rgb(168,173,179)"> </span><span style="color:rgb(199,145,12)">if</span><span style="color:rgb(168,173,179)"> (is_method(</span><span style="color:rgb(0,168,132)">"INFO"</span><span style="color:rgb(168,173,179)">)) </span></div><div><span style="color:rgb(168,173,179)"> { </span></div><div><span style="color:rgb(168,173,179)"> $json(data) :</span>=<span style="color:rgb(168,173,179)"> $avp(uac_ctx)</span>;</div><div><span style="color:rgb(168,173,179)"> #xlog(</span><span style="color:rgb(0,168,132)">"$json(data)</span><span style="color:rgb(227,85,53)">\n</span><span style="color:rgb(0,168,132)">"</span><span style="color:rgb(168,173,179)">)</span>;</div><div><span style="color:rgb(168,173,179)"> append_hf(</span><span style="color:rgb(0,168,132)">"X-call-id: $json(data/X-call-id)</span><span style="color:rgb(227,85,53)">\r\n</span><span style="color:rgb(0,168,132)">"</span><span style="color:rgb(168,173,179)">)</span>;</div><div><span style="color:rgb(168,173,179)"> append_hf(</span><span style="color:rgb(0,168,132)">"X-rtp-a: $json(data/X-rtp-a)</span><span style="color:rgb(227,85,53)">\r\n</span><span style="color:rgb(0,168,132)">"</span><span style="color:rgb(168,173,179)">)</span>;</div><div><span style="color:rgb(168,173,179)"> append_hf(</span><span style="color:rgb(0,168,132)">"X-rtp-b: $json(data/X-rtp-b)</span><span style="color:rgb(227,85,53)">\r\n</span><span style="color:rgb(0,168,132)">"</span><span style="color:rgb(168,173,179)">)</span>;</div><div><span style="color:rgb(168,173,179)"> }</span></div><br><div><span style="color:rgb(168,173,179)">}</span></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le lun. 9 oct. 2023 à 17:13, Ben Newlin <<a href="mailto:Ben.Newlin@genesys.com">Ben.Newlin@genesys.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-6016952962644483959">
<div lang="EN-US" style="overflow-wrap: break-word;">
<div class="m_8758358486216739081WordSection1">
<p class="MsoNormal"><span style="font-size:11pt">Do you have the Call-ID from the first leg when you create the second leg with t_new_request? If os, you can use the ctx parameter from that function to make it visible in the new transaction.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><a href="https://opensips.org/docs/modules/3.4.x/tm.html#func_t_new_request" target="_blank">https://opensips.org/docs/modules/3.4.x/tm.html#func_t_new_request</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:black">Ben Newlin</span><span style="font-size:11pt"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<div id="m_8758358486216739081mail-editor-reference-message-container">
<div>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(181,196,223);padding:3pt 0in 0in">
<p class="MsoNormal" style="margin-bottom:12pt"><b><span style="font-size:12pt;color:black">From:
</span></b><span style="font-size:12pt;color:black">Users <<a href="mailto:users-bounces@lists.opensips.org" target="_blank">users-bounces@lists.opensips.org</a>> on behalf of Mickael Hubert <<a href="mailto:mickael@winlux.fr" target="_blank">mickael@winlux.fr</a>><br>
<b>Date: </b>Monday, October 9, 2023 at 11:00 AM<br>
<b>To: </b>OpenSIPS users mailling list <<a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a>><br>
<b>Subject: </b>Re: [OpenSIPS-Users] t_new_request and X-headers<u></u><u></u></span></p>
</div>
<div>
<div>
<div>
<table border="1" cellspacing="0" cellpadding="0" style="border-collapse:collapse;border:none">
<tbody>
<tr>
<td style="border:1pt solid rgb(182,0,0);background:white;padding:0.75pt">
<p class="MsoNormal"><b><span style="font-size:12pt;color:rgb(182,0,0)"> EXTERNAL EMAIL - Please use caution with links and attachments <u></u><u></u></span></b></p>
</td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal"><span style="font-size:9pt;font-family:Helvetica;color:black"><u></u> <u></u></span></p>
<div class="MsoNormal" align="center" style="text-align:center"><span style="font-size:11pt">
<hr size="0" width="100%" align="center">
</span></div>
</div>
<p class="MsoNormal"><span style="font-size:11pt">Thanks for your help, I already tested avp, but the main issue now is, how can I catch call_id (or other id) from my second request (created by t_new_request) to get my variables from the first leg.<u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
</div>
</div>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11pt">Le lun. 9 oct. 2023 à 16:33, Johan De Clercq <<a href="mailto:Johan@democon.be" target="_blank">Johan@democon.be</a>> a écrit :<u></u><u></u></span></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal"><span style="font-size:11pt">avp_dbquery if I am not wrong. <u></u><u></u></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11pt">Op ma 9 okt 2023 om 16:31 schreef Johan De Clercq <<a href="mailto:Johan@democon.be" target="_blank">Johan@democon.be</a>>:<u></u><u></u></span></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal"><span style="font-size:11pt">write the info to a custom table and fetch it from there ? <u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
</div>
</div>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11pt">Op ma 9 okt 2023 om 16:03 schreef Mickael Hubert <<a href="mailto:mickael@winlux.fr" target="_blank">mickael@winlux.fr</a>>:<u></u><u></u></span></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal"><span style="font-size:11pt">Hi all,<u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span style="font-size:11pt">I need to send an INFO message with X-headers from other dialog.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11pt">I use t_new_request to send my request (apart from first dialog): OK<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11pt">I use local_route to add fixed X-header: OK<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11pt">But I want to copy some information from the first dialog to the new dialog (created by t_new_request). How can I do that please ? <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11pt">Thanks in advance<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><span style="font-size:11pt">_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><u></u><u></u></span></p>
</blockquote>
</div>
</blockquote>
</div>
<p class="MsoNormal"><span style="font-size:11pt">_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><u></u><u></u></span></p>
</blockquote>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</div></blockquote></div></div>