<div dir="ltr">but I am doing 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 once I received the 200 reply <br>here is the script i am using; it does work but I want to do it through AVPs<br>f (method=="REGISTER") {<br>
<div class="gmail_quote"> route(2);<br> exit;<br> }<br>route[2] {<br>t_on_reply("2");<br> fix_nated_register();<br> force_rport();<br> avp_write("$from/username","$avp(i:678)");<br>
subst('/^Contact:.*<sip:(.*)@(.*)>/Contact:<sip:$avp(i:678)kamailio_ip@>/ig');<br> add_rcv_param();<br>t_relay("udp:my_registrar_ip:5060");<br><br>route[6] {<br>save_noreply("location");<br>
exit;<br>}<br><br>onreply_route[2] {<br> if(status=="200") {<br> route(6);<br> }<br><br> <br><br><br><br><br> PM, Klaus Darilion <span dir="ltr"><<a href="mailto:klaus.mailinglists@pernau.at">klaus.mailinglists@pernau.at</a>></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">> I don't believe it would help in my case as I need it for a different<br>
> purpose.<br>
><br>
> Problem is you can't always share registration between PBXs. For example<br>
> Asterisk doesn't support it.<br>
> So if you want to reach a UA on a PBX where it's not registered, one<br>
> possibility is to route the call through kamailio which knows where all<br>
> the UAs are.<br>
> I realize that's it's a limitation of the PBXs, but this is something<br>
> that could certainly be addressed in kamailio until PBXs catch up.<br>
><br>
> Of course you do not want to store the information until an OK is<br>
> received for the registration.<br>
> Also the expiration in the OK might be different in the OK than in the<br>
> initial REGISTER.<br>
> This is not possible right now because you can only use save() on the<br>
> initial register, not on the successful reply.<br>
><br>
> If there are better ways to do this, I'm happy to learn.<br>
> I know there are many things I do not know.<br>
><br>
><br>
> -----Original Message-----<br>
> From: Klaus Darilion [mailto:<a href="mailto:klaus.mailinglists@pernau.at">klaus.mailinglists@pernau.at</a>]<br>
> Sent: Tuesday, August 26, 2008 7:54 AM<br>
> To: Vadim Berezniker<br>
> Cc: <a href="mailto:users@lists.kamailio.org">users@lists.kamailio.org</a><br>
> Subject: Re: [Kamailio-Users] AVP to store user contact information<br>
><br>
><br>
><br>
> Vadim Berezniker schrieb:<br>
>> I'm actually interested in similar behavior.<br>
>><br>
>> I believe I saw a thread on this topic before, but I haven't been able<br>
><br>
>> to locate it.<br>
>><br>
>><br>
>><br>
>> One of the problems is that you can only use the save() registrar<br>
>> function from the request route.<br>
>><br>
>> I wish to save the information after the registrar have accepted the<br>
>> registration.<br>
><br>
> Can't you use the "path" feature?<br>
><br>
> klaus<br>
><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>