Hello, can you give an example of incoming header and how you want to be after modification?
It is not clear for me what end result you want/expect. Cheers, Daniel On 14/03/15 06:41, Slava Bendersky wrote: > Hello Everyone, > Here updated version. Trying remove Record-Route after the coma. > My log shows > > Mar 14 01:25:21 canlvprx01 /usr/sbin/kamailio[751]: INFO: <script>: > [SUBSCRIBE], Inbound connection from <Client Public IP> > Mar 14 01:25:21 canlvprx01 /usr/sbin/kamailio[751]: ERROR: <script>: > <null> > Mar 14 01:25:21 canlvprx01 /usr/sbin/kamailio[751]: INFO: <script>: > [SUBSCRIBE], Route for removal: '<null>' > > route snippet. > > route[ROUTE_HDR_ORG] { > # Getting record routes > if(is_present_hf("Route")) { > xlog("L_INFO", "[$rm], Inbound connection from <$si>\n"); > if(is_method("SUBSCRIBE")) { > if(is_ip_rfc1918($si)) { > xlog("$sel(@hf_value.Record_Route[-1])"); > xlog("L_INFO", "[$rm], Route for > removal: '$sel(@hf_value.Record_Route[-1])'\n"); > remove_hf_value("Record-Route[-1]"); > } else { > xlog("$sel(@hf_value.Record_Route[1])"); > xlog("L_INFO", "[$rm], Route for > removal: '$sel(@hf_value.Record_Route[1])'\n"); > remove_hf_value("Record-Route[1]"); > } > } > } > return; > } > > > Slava, > ------------------------------------------------------------------------ > *From: *"Slava Bendersky" <volga...@networklab.ca> > *To: *"sr-users" <sr-users@lists.sip-router.org> > *Sent: *Friday, March 13, 2015 1:00:44 PM > *Subject: *[SR-Users] remove_hf_value > > Hello Everyone, > I am trying adjust Record-Route, but can't match headers value > > And I am call route(ROUTE_HDR_ORG); right after route(WITHINDLG); > > route[ROUTE_HDR_ORG] { > # Getting record routes > if(is_present_hf("Record-Route")) { > if(is_method("SUBSCRIBE")) { > xlog("$sel(@hf_value.Record_Route[1])"); > xlog("L_INFO", "[$rm], Route for removal: > '$sel(@hf_value.Record_Route[1])'\n"); > remove_hf_value("Record-Route[1]"); > } > } > return; > } > > Any help Thank you, > Slava. > > _______________________________________________ > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list > sr-users@lists.sip-router.org > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users > > > _______________________________________________ > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list > sr-users@lists.sip-router.org > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Daniel-Constantin Mierla http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio World Conference, May 27-29, 2015 Berlin, Germany - http://www.kamailioworld.com
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users