Again sorry, too much trial&error makes a lot of noise ... if (avp_subst("$(avp(contact))", "/;phone-context=q([01]\.[0-9]+)(.*>)?([^>]*)/\2\3;q=\1/i")) { # just to have it handy int that var(Q) $var(Q) = $(avp(contact){s.select,1,>}{param.value,q}); remove_hf("Contact"); append_hf("Contact: $(avp(contact))\r\n"); # must not add q= twice }
-> Same result: q=-1 in Database. -----Ursprüngliche Nachricht----- Von: users-boun...@lists.kamailio.org [mailto:users-boun...@lists.kamailio.org] Im Auftrag von NeoTel Lists Gesendet: Dienstag, 30. März 2010 18:56 An: Alex Balashov; users@lists.kamailio.org Betreff: Re: [Kamailio-Users] Registrar: Save modified contact / set the qvalue Sorry for being unclear: I meant: Modify the contact in the script, then do save(). E.g. $(avp(contact)) = $ct; # Those Patton can't send the q value ... Misuse their ;phone-context param if (avp_subst("$(avp(contact))", "/;phone-context=q([01]\.[0-9])(.*>)?([^>]*)/\2\3;q=\1/i")) { # just to have it handy int that var(Q) $var(Q) = $(avp(contact){s.select,1,>}{param.value,q}); remove_hf("Contact"); append_hf("Contact: $(avp(contact));q=$var(Q)r\n"); # subst() does the same, also not save()ed } ... setbflag(1); fix_nated_register(); save("contactimpl_nat", "0x02"); Br Walter -----Ursprüngliche Nachricht----- Von: users-boun...@lists.kamailio.org [mailto:users-boun...@lists.kamailio.org] Im Auftrag von Alex Balashov Gesendet: Dienstag, 30. März 2010 17:58 An: users@lists.kamailio.org Betreff: Re: [Kamailio-Users] Registrar: Save modified contact / set the q value On 03/30/2010 11:36 AM, NeoTel Lists wrote: > Hello Everybody! > Is there any way to save(domain, 0x02) the contact after it has been > changed somehow in Kamailio <= 1.5? If it were not possible, how would nathelper:fix_nated_contact() work? -- Alex Balashov - Principal Evariste Systems LLC Tel : +1 678-954-0670 Direct : +1 678-954-0671 Web : http://www.evaristesys.com/ _______________________________________________ Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users _______________________________________________ Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users _______________________________________________ Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users