<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=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:Helvetica;
panose-1:0 0 0 0 0 0 0 0 0 0;}
@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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:10.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
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="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Ah I hadn’t even thought of using the context in that way. That’s an excellent solution!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:black">Ben Newlin</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div id="mail-editor-reference-message-container">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Users <users-bounces@lists.opensips.org> on behalf of Mickael Hubert <mickael@winlux.fr><br>
<b>Date: </b>Tuesday, October 10, 2023 at 5:37 AM<br>
<b>To: </b>OpenSIPS users mailling list <users@lists.opensips.org><br>
<b>Subject: </b>Re: [OpenSIPS-Users] t_new_request and X-headers<o:p></o:p></span></p>
</div>
<div>
<div>
<div>
<div>
<table class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0" style="border-collapse:collapse;border:none">
<tbody>
<tr>
<td style="border:solid #B60000 1.0pt;background:white;padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:#B60000"> EXTERNAL EMAIL - Please use caution with links and attachments <o:p></o:p></span></b></p>
</td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Helvetica;color:black"><o:p> </o:p></span></p>
<div class="MsoNormal" align="center" style="text-align:center"><span style="font-size:11.0pt">
<hr size="0" width="100%" align="center">
</span></div>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt">Hi,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">it's perfect, thanks a lot !<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">I use json to catch and send my data to t_new_request<o:p></o:p></span></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#111418"><span style="font-size:10.5pt;font-family:"Courier New";color:#A8ADB3">t_new_request(</span><span style="font-size:10.5pt;font-family:"Courier New";color:#00A884">"INFO"</span><span style="font-size:10.5pt;font-family:"Courier New";color:#C3C6CB">,</span><span style="font-size:10.5pt;font-family:"Courier New";color:#00A884">"$tu"</span><span style="font-size:10.5pt;font-family:"Courier New";color:#C3C6CB">,</span><span style="font-size:10.5pt;font-family:"Courier New";color:#00A884">"$fu"</span><span style="font-size:10.5pt;font-family:"Courier New";color:#C3C6CB">,</span><span style="font-size:10.5pt;font-family:"Courier New";color:#00A884">"$tu"</span><span style="font-size:10.5pt;font-family:"Courier New";color:#C3C6CB">,</span><span style="font-size:10.5pt;font-family:"Courier New";color:#A8ADB3">
</span><span style="font-size:10.5pt;font-family:"Courier New";color:#C3C6CB">,</span><span style="font-size:10.5pt;font-family:"Courier New";color:#A8ADB3">
</span><span style="font-size:10.5pt;font-family:"Courier New";color:#00A884">"$json(data)"</span><span style="font-size:10.5pt;font-family:"Courier New";color:#A8ADB3">)</span><span style="font-size:10.5pt;font-family:"Courier New";color:#C3C6CB">;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#111418"><span style="font-size:10.5pt;font-family:"Courier New";color:#C3C6CB"><o:p> </o:p></span></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#111418"><span style="font-size:10.5pt;font-family:"Courier New";color:#A8ADB3">local_route {</span><span style="font-size:10.5pt;font-family:"Courier New";color:#C3C6CB"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#111418"><span style="font-size:10.5pt;font-family:"Courier New";color:#C7910C">if</span><span style="font-size:10.5pt;font-family:"Courier New";color:#A8ADB3"> (is_method(</span><span style="font-size:10.5pt;font-family:"Courier New";color:#00A884">"INFO"</span><span style="font-size:10.5pt;font-family:"Courier New";color:#A8ADB3">))
</span><span style="font-size:10.5pt;font-family:"Courier New";color:#C3C6CB"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#111418"><span style="font-size:10.5pt;font-family:"Courier New";color:#A8ADB3">{
</span><span style="font-size:10.5pt;font-family:"Courier New";color:#C3C6CB"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#111418"><span style="font-size:10.5pt;font-family:"Courier New";color:#A8ADB3">$json(data) :</span><span style="font-size:10.5pt;font-family:"Courier New";color:#C3C6CB">=</span><span style="font-size:10.5pt;font-family:"Courier New";color:#A8ADB3">
$avp(uac_ctx)</span><span style="font-size:10.5pt;font-family:"Courier New";color:#C3C6CB">;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#111418"><span style="font-size:10.5pt;font-family:"Courier New";color:#A8ADB3">#xlog(</span><span style="font-size:10.5pt;font-family:"Courier New";color:#00A884">"$json(data)</span><span style="font-size:10.5pt;font-family:"Courier New";color:#E35535">\n</span><span style="font-size:10.5pt;font-family:"Courier New";color:#00A884">"</span><span style="font-size:10.5pt;font-family:"Courier New";color:#A8ADB3">)</span><span style="font-size:10.5pt;font-family:"Courier New";color:#C3C6CB">;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#111418"><span style="font-size:10.5pt;font-family:"Courier New";color:#A8ADB3">append_hf(</span><span style="font-size:10.5pt;font-family:"Courier New";color:#00A884">"X-call-id: $json(data/X-call-id)</span><span style="font-size:10.5pt;font-family:"Courier New";color:#E35535">\r\n</span><span style="font-size:10.5pt;font-family:"Courier New";color:#00A884">"</span><span style="font-size:10.5pt;font-family:"Courier New";color:#A8ADB3">)</span><span style="font-size:10.5pt;font-family:"Courier New";color:#C3C6CB">;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#111418"><span style="font-size:10.5pt;font-family:"Courier New";color:#A8ADB3">append_hf(</span><span style="font-size:10.5pt;font-family:"Courier New";color:#00A884">"X-rtp-a: $json(data/X-rtp-a)</span><span style="font-size:10.5pt;font-family:"Courier New";color:#E35535">\r\n</span><span style="font-size:10.5pt;font-family:"Courier New";color:#00A884">"</span><span style="font-size:10.5pt;font-family:"Courier New";color:#A8ADB3">)</span><span style="font-size:10.5pt;font-family:"Courier New";color:#C3C6CB">;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#111418"><span style="font-size:10.5pt;font-family:"Courier New";color:#A8ADB3">append_hf(</span><span style="font-size:10.5pt;font-family:"Courier New";color:#00A884">"X-rtp-b: $json(data/X-rtp-b)</span><span style="font-size:10.5pt;font-family:"Courier New";color:#E35535">\r\n</span><span style="font-size:10.5pt;font-family:"Courier New";color:#00A884">"</span><span style="font-size:10.5pt;font-family:"Courier New";color:#A8ADB3">)</span><span style="font-size:10.5pt;font-family:"Courier New";color:#C3C6CB">;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#111418"><span style="font-size:10.5pt;font-family:"Courier New";color:#A8ADB3">}</span><span style="font-size:10.5pt;font-family:"Courier New";color:#C3C6CB"><o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="line-height:14.25pt;background:#111418"><span style="font-size:10.5pt;font-family:"Courier New";color:#C3C6CB"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#111418"><span style="font-size:10.5pt;font-family:"Courier New";color:#A8ADB3">}</span><span style="font-size:10.5pt;font-family:"Courier New";color:#C3C6CB"><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">Le lun. 9 oct. 2023 à 17:13, Ben Newlin <<a href="mailto:Ben.Newlin@genesys.com">Ben.Newlin@genesys.com</a>> a écrit :<o:p></o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">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.<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"><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><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;color:black">Ben Newlin</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
<div id="m_8758358486216739081mail-editor-reference-message-container">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;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</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
</div>
<div>
<div>
<div>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">
<tbody>
<tr>
<td style="border:solid #B60000 1.0pt;background:white;padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:12.0pt;color:#B60000"> EXTERNAL EMAIL - Please use caution with links and attachments </span></b><span style="font-size:11.0pt"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:9.0pt;font-family:Helvetica;color:black"> </span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<div class="MsoNormal" align="center" style="text-align:center"><span style="font-size:11.0pt">
<hr size="0" width="100%" align="center">
</span></div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">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.<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">Le lun. 9 oct. 2023 à 16:33, Johan De Clercq <<a href="mailto:Johan@democon.be" target="_blank">Johan@democon.be</a>> a écrit :<o:p></o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">avp_dbquery if I am not wrong. <o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">Op ma 9 okt 2023 om 16:31 schreef Johan De Clercq <<a href="mailto:Johan@democon.be" target="_blank">Johan@democon.be</a>>:<o:p></o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">write the info to a custom table and fetch it from there ? <o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">Op ma 9 okt 2023 om 16:03 schreef Mickael Hubert <<a href="mailto:mickael@winlux.fr" target="_blank">mickael@winlux.fr</a>>:<o:p></o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">Hi all,<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">I need to send an INFO message with X-headers from other dialog.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">I use t_new_request to send my request (apart from first dialog): OK<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">I use local_route to add fixed X-header: OK<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">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 ? <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">Thanks in advance<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">_______________________________________________<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><o:p></o:p></span></p>
</blockquote>
</div>
</blockquote>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt">_______________________________________________<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><o:p></o:p></span></p>
</blockquote>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt">_______________________________________________<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><o:p></o:p></span></p>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</body>
</html>