Hi Daniel, Hi Klaus,<br><br>after hours of searching I think we found the problem. This is what our route that actually sends out the packets looks like:<br><br>route[2] {<br><br>        xlog(&quot;........................................... START OF ROUTE 2....................................\n&quot;);<br>

        xlog(&quot;AVP LEG_ID has Value $(avp(s:leg_id))\n&quot;);<br><br>        $(avp(s:dsttype)) = 0;<br>        if ($rd =~ &quot;pstnout&quot;) { $(avp(s:dsttype)) = 2; }<br>        if ($rd =~ &quot;media&quot;) { $(avp(s:dsttype)) = 1; }<br>

        if (isflagset(0)) {<br>                $(avp(s:dsttype)) = 3;<br>                t_on_reply(&quot;4&quot;);<br><br>                $uac_req(method)=&quot;PDDTRACKING&quot;;<br>                $uac_req(ruri)=&quot;<a href="http://sip:store@172.20.21.3:5160">sip:store@172.20.21.3:5160</a>&quot;;<br>

                $uac_req(furi)=&quot;<a href="mailto:sip%3Akamailio@sipgate.net">sip:kamailio@sipgate.net</a>&quot;;<br>                $uac_req(hdrs)=&quot;Content-Type: text/timetracking-csv\r\n&quot;;<br>                pv_printf(&quot;$uac_req(body)&quot;, &quot;$ci,$fU,$tU,$TV(Sn),$rm,$rd&quot;);<br>

                uac_req_send();<br><br>        }<br>        if ((!defined ($(avp(s:tariffannouncement))) || !($(avp(s:tariffannouncement)) == &quot;true&quot;)) &amp;&amp; method==&quot;INVITE&quot; &amp;&amp; defined $(avp(s:cid)) &amp;&amp; !($(avp(s:cid)) == &quot;&quot;)) {<br>

                $uac_req(method)=&quot;TIMETRACKING&quot;;<br>                $uac_req(ruri)=&quot;<a href="http://sip:store@172.20.21.3:5160">sip:store@172.20.21.3:5160</a>&quot;;<br>                $uac_req(furi)=&quot;<a href="mailto:sip%3Akamailio@sipgate.net">sip:kamailio@sipgate.net</a>&quot;;<br>

                $uac_req(hdrs)=&quot;Content-Type: text/timetracking-csv\r\n&quot;;<br>                pv_printf(&quot;$uac_req(body)&quot;, &quot;$(avp(s:cid)),$ci,$fU,$tU,$TV(Sn),$(avp(s:dsttype)),$rm,$rd&quot;);<br>                uac_req_send();<br>

        }<br><br>        xlog(&quot;........................................... AFTER UAC REQUEST ....................................\n&quot;);<br>        xlog(&quot;AVP LEG_ID has Value $(avp(s:leg_id))\n&quot;);<br><br>

        t_on_reply(&quot;ABC&quot;);<br>        if (!t_relay()) {<br><br>                xlog(&quot;L_ERR&quot;, &quot;route(2): error to &lt;$tu&gt; from &lt;$fu&gt;\n&quot;);<br><br>                if (method==&quot;INVITE&quot; || method==&quot;ACK&quot;) {<br>

                        unforce_rtp_proxy();<br>                }<br><br>                sl_reply_error();<br>                return;<br>        };<br>        return;<br>}<br><br>I probably need to explain that a little. We have another kamailio process just for accounting. We do it separately for being independent of the database in our &quot;routing Kamailio&quot;, because there would be the chance of blocked processes, if the database is too slow, if we did it in the routing Kamailio.<br>

<br>We try to to measure Post Dial Delay when sending calls out to the carrier, and we monitor the time differences for one call each time Kamaiio is passed. That&#39;s all the other process does. So we send handcrafted SIP packages with the needed information with uac_req_send(). And it looks like the AVPs get lost at that point.<br>

<br>That&#39;s what the log says:<br><br>Jul 28 16:41:35 hagi /usr/sbin/kamailio[17684]: ERROR: &lt;script&gt;: ........................................... START OF ROUTE 2....................................<br>Jul 28 16:41:35 hagi /usr/sbin/kamailio[17684]: ERROR: &lt;script&gt;: AVP LEG_ID has Value 9962182<br>

Jul 28 16:41:35 hagi /usr/sbin/kamailio[17684]: ERROR: &lt;script&gt;: ........................................... AFTER UAC REQUEST ....................................<br>Jul 28 16:41:35 hagi /usr/sbin/kamailio[17684]: ERROR: &lt;script&gt;: AVP LEG_ID has Value &lt;null&gt;<br>

Jul 28 16:41:35 hagi /usr/sbin/kamailio[17681]: NOTICE: &lt;script&gt;: REPLY START<br>Jul 28 16:41:35 hagi /usr/sbin/kamailio[17681]: NOTICE: &lt;script&gt;: reply: 100 Trying - F=<a href="mailto:sip%3Aanonymous@sipgate.de">sip:anonymous@sipgate.de</a> T=<a href="mailto:sip%3A0211XXXXXXXX@sipgate.de">sip:0211XXXXXXXX@sipgate.de</a> SRCIP=<a href="http://217.116.120.220:5060">217.116.120.220:5060</a><br>

Jul 28 16:41:35 hagi /usr/sbin/kamailio[17681]: NOTICE: &lt;script&gt;: Now in named reply route...............................................<br>Jul 28 16:41:35 hagi /usr/sbin/kamailio[17681]: ERROR: &lt;script&gt;: AVP LEG_ID has Value &lt;null&gt;<br>

<br><br>If I disable the UAC part of route[2], I get the following output:<br><br>Jul 28 16:25:20 hagi /usr/sbin/kamailio[17404]: ERROR: &lt;script&gt;: ........................................... START OF ROUTE 2....................................<br>

Jul 28 16:25:20 hagi /usr/sbin/kamailio[17404]: ERROR: &lt;script&gt;: AVP LEG_ID has Value 5770077<br>Jul 28 16:25:20 hagi /usr/sbin/kamailio[17404]: ERROR: &lt;script&gt;: ........................................... AFTER UAC REQUEST ....................................<br>

Jul 28 16:25:20 hagi /usr/sbin/kamailio[17404]: ERROR: &lt;script&gt;: AVP LEG_ID has Value 5770077<br>Jul 28 16:25:20 hagi /usr/sbin/kamailio[17403]: NOTICE: &lt;script&gt;: REPLY START<br>Jul 28 16:25:20 hagi /usr/sbin/kamailio[17403]: NOTICE: &lt;script&gt;: reply: 100 Trying - F=<a href="mailto:sip%3Aanonymous@sipgate.de">sip:anonymous@sipgate.de</a> T=<a href="mailto:sip%3A0211XXXXXXXXX@sipgate.de">sip:0211XXXXXXXXX@sipgate.de</a> SRCIP=<a href="http://217.116.120.220:5060">217.116.120.220:5060</a><br>

Jul 28 16:25:20 hagi /usr/sbin/kamailio[17403]: NOTICE: &lt;script&gt;: Now in named reply route...............................................<br>Jul 28 16:25:20 hagi /usr/sbin/kamailio[17403]: ERROR: &lt;script&gt;: AVP LEG_ID has Value 5770077<br>

<br><br>The behavior was different in Kamailio 1.5, and I think using the uac module shouldn&#39;t destroy AVPs.<br><br><br>Am I missing something?<br><br>Best regards,<br>Sebastian<br><br>P.S.: Of course, the named onreply_route is executed AFTER the standard onreply_route. I misinterpreted my logs last week.<br>

<br><br><div class="gmail_quote">On Fri, Jul 15, 2011 at 2:32 PM, Daniel-Constantin Mierla <span dir="ltr">&lt;<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi Sebastian,<div><div></div><div class="h5"><br>
<br>
On 7/15/11 11:42 AM, Sebastian Damm wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
On Fri, Jul 15, 2011 at 9:02 AM, Klaus Darilion<br>
&lt;<a href="mailto:klaus.mailinglists@pernau.at" target="_blank">klaus.mailinglists@pernau.at</a>&gt;  wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The named reply routes are only executed if t_on_reply() was called for<br>
the request. This reply route will be executed after the default<br>
reply-route. It is triggered by tm module.<br>
</blockquote>
I just inserted a new reply_route, which just prints out some<br>
variables (and does avp_print). From what I see in the logs now, the<br>
named route is executed before the default reply_route. And there are<br>
no AVPs in the named route. Actually, I don&#39;t even need the AVPs in<br>
the replies, I need them to be there, when the 200 OK comes in or in<br>
failure route when the call is cancelled. In both cases the AVPs are<br>
&lt;null&gt;  if i directly address them.<br>
<br>
Any more ideas?<br>
</blockquote></div></div>
I am a bit confused about what you explain above, with &quot;named route is executed before the default reply_route&quot;. Can you send like the structure of the config for this case? I mean the routes involved and the calls of t_on_reply(). Is it like for example:<br>


<br>
route {<br>
...<br>
   $avp(xyz) = 1;<br>
   t_on_reply(&quot;ABC&quot;);<br>
   t_relay();<br>
   exit;<br>
}<br>
<br>
onreply_route[ABC] {<br>
   ...<br>
   xlog(&quot;avp(xyz) is $avp(xyz)\n&quot;);<br>
   ...<br>
}<br>
<br>
Cheers,<div><div></div><div class="h5"><br>
Daniel<br>
<br>
-- <br>
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><br>
Kamailio Advanced Training, Oct 10-13, Berlin: <a href="http://asipto.com/u/kat" target="_blank">http://asipto.com/u/kat</a><br>
<a href="http://linkedin.com/in/miconda" target="_blank">http://linkedin.com/in/miconda</a> -- <a href="http://twitter.com/miconda" target="_blank">http://twitter.com/miconda</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Dipl.-Inf.<br>Sebastian Damm - VoIP-Engineer - <a href="mailto:damm@sipgate.de">damm@sipgate.de</a><br><br>sipgate GmbH - Gladbacher Str. 74 - 40219 Düsseldorf<br>

HRB Düsseldorf 39841 - Geschäftsführer: Thilo Salmon, Tim Mois<br>Steuernummer: 106/5724/7147, Umsatzsteuer-ID: DE219349391<br><br><a href="http://www.sipgate.de">www.sipgate.de</a> - <a href="http://www.sipgate.at">www.sipgate.at</a> - <a href="http://www.sipgate.co.uk">www.sipgate.co.uk</a><br>