<div dir="ltr">but I am doing&nbsp; on my existing configuration, i am rewriting the contact information and saving it once i received 200 ok, this is true that the registration time is not the same as I received in first register message.<br>
what i am trying to do is to hold all the contact info in AVP and then save the AVP into location&nbsp; once I received the 200 reply&nbsp; <br>here is the script i am using; it does work but I want to do it through AVPs<br>f (method==&quot;REGISTER&quot;) {<br>
<div class="gmail_quote">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; route(2);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>route[2] {<br>t_on_reply(&quot;2&quot;);<br>&nbsp;fix_nated_register();<br>&nbsp;&nbsp; force_rport();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; avp_write(&quot;$from/username&quot;,&quot;$avp(i:678)&quot;);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; subst(&#39;/^Contact:.*&lt;sip:(.*)@(.*)&gt;/Contact:&lt;sip:$avp(i:678)kamailio_ip@&gt;/ig&#39;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add_rcv_param();<br>t_relay(&quot;udp:my_registrar_ip:5060&quot;);<br><br>route[6] {<br>save_noreply(&quot;location&quot;);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit;<br>}<br><br>onreply_route[2] {<br>&nbsp; if(status==&quot;200&quot;) {<br>&nbsp;&nbsp; route(6);<br>&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br><br><br><br><br>&nbsp;PM, Klaus Darilion <span dir="ltr">&lt;<a href="mailto:klaus.mailinglists@pernau.at">klaus.mailinglists@pernau.at</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Path feature would solve this issue, but it requires that the main<br>
proxy/registrar supports Path too and unfortunately Asterisk does not<br>
support it.<br>
<br>
Conclusion: there is currently no way to implement the contact rewriting<br>
and saving in the reply route with Openser<br>
<br>
klaus<br>
<br>
Vadim Berezniker schrieb:<br>
<div><div></div><div class="Wj3C7c">&gt; I don&#39;t believe it would help in my case as I need it for a different<br>
&gt; purpose.<br>
&gt;<br>
&gt; Problem is you can&#39;t always share registration between PBXs. For example<br>
&gt; Asterisk doesn&#39;t support it.<br>
&gt; So if you want to reach a UA on a PBX where it&#39;s not registered, one<br>
&gt; possibility is to route the call through kamailio which knows where all<br>
&gt; the UAs are.<br>
&gt; I realize that&#39;s it&#39;s a limitation of the PBXs, but this is something<br>
&gt; that could certainly be addressed in kamailio until PBXs catch up.<br>
&gt;<br>
&gt; Of course you do not want to store the information until an OK is<br>
&gt; received for the registration.<br>
&gt; Also the expiration in the OK might be different in the OK than in the<br>
&gt; initial REGISTER.<br>
&gt; This is not possible right now because you can only use save() on the<br>
&gt; initial register, not on the successful reply.<br>
&gt;<br>
&gt; If there are better ways to do this, I&#39;m happy to learn.<br>
&gt; I know there are many things I do not know.<br>
&gt;<br>
&gt;<br>
&gt; -----Original Message-----<br>
&gt; From: Klaus Darilion [mailto:<a href="mailto:klaus.mailinglists@pernau.at">klaus.mailinglists@pernau.at</a>]<br>
&gt; Sent: Tuesday, August 26, 2008 7:54 AM<br>
&gt; To: Vadim Berezniker<br>
&gt; Cc: <a href="mailto:users@lists.kamailio.org">users@lists.kamailio.org</a><br>
&gt; Subject: Re: [Kamailio-Users] AVP to store user contact information<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Vadim Berezniker schrieb:<br>
&gt;&gt; I&#39;m actually interested in similar behavior.<br>
&gt;&gt;<br>
&gt;&gt; I believe I saw a thread on this topic before, but I haven&#39;t been able<br>
&gt;<br>
&gt;&gt; to locate it.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; One of the problems is that you can only use the save() registrar<br>
&gt;&gt; function from the request route.<br>
&gt;&gt;<br>
&gt;&gt; I wish to save the information after the registrar have accepted the<br>
&gt;&gt; registration.<br>
&gt;<br>
&gt; Can&#39;t you use the &quot;path&quot; feature?<br>
&gt;<br>
&gt; klaus<br>
&gt;<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.kamailio.org">Users@lists.kamailio.org</a><br>
<a href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br></div>