[SR-Users] Strange behavior when rewriting "To" header from failure_route (kamailio - 3.0.2)

Klaus Darilion klaus.mailinglists at pernau.at
Tue Jun 8 12:55:41 CEST 2010



Am 08.06.2010 11:51, schrieb Kosilov Fedor:

> So the code now supposed to delete "To: <sip:ncm0000b at domain.com>"
> and to append "To: <sip:ncm0000a at domain.com>"

yes.

> But with ngrep i can see:
> To: <sip:ncm0000b at domain.com>.Date:
> Tue, 08 Jun 2010 09:40:10 GMT.
>
> With timestamp, which seems to me to be unusual.

The timestamp is the next header. Thus, somehow the CRLF gets lost 
between To header and Date header?
>
> So maybe it's impossible to rewrite "To" header from failure_route for
> some reason... (For example according to RFC)

AFAIK it should be possible.

I just tested with kamailio 3.0 and it works fine.

Try something simpler, e.g:
   append_hf("To: sip:ncm0000a at domain.com\r\n");

regards
Klaus

>
> Actually my phones ring, and everything works fine, I am just interested
> with this behavior of Kamailio.
>
> Thanks again for your reply.
>
> Sincerely yours,
> Kosilov Fedor.
>
>
> 2010/6/8 Klaus Darilion <klaus.mailinglists at pernau.at
> <mailto:klaus.mailinglists at pernau.at>>
>
>       remove_hf("To");
>       append_hf("To:
>     <sip:$dbr(alias_name=>[0,0])@$dbr(alias_domain=>[0,0])>\r\n");
>
>



More information about the sr-users mailing list