[SR-Users] In need of a simple, stateless 302 redirect for INVITE
Daniel Tryba
d.tryba at pocos.nl
Fri Dec 1 13:50:35 CET 2017
On Thu, Nov 30, 2017 at 09:39:24PM +0000, Robert wrote:
> I???ve re-read the intros & tutorials, and other reading material such
> as this
> http://kamailio.org/docs/ser-getting-started/SER-GettingStarted.pdf
> <http://kamailio.org/docs/ser-getting-started/SER-GettingStarted.pdf>
> but, this, even my best Google-fu has left me utterly stumped???
>
> The sl_send_reply documentation
> https://kamailio.org/docs/modules/5.2.x/modules/sl.html#sl_send_reply
> <https://kamailio.org/docs/modules/5.2.x/modules/sl.html#sl_send_reply>
> states ???If the code is in the range 300-399 (redirect reply), the
> current destination set is appended to the reply as Contact headers???
> but the Contact header is definitely not being set when I use this.
>
> Apologies in advance if eyes are rolling and this is really obvious,
> or (and?) that my lack of SIP knowledge is shining through - any tips
> or guidance would be appreciated. I certainly feel overwhelmed by the
> number of modules and the interplay between them.
The next line in the documentation mentions this:
"The destination set contains the request URI (R-URI), if it is modified
compared to the received one, plus the branches added to the request
(e.g., after an append_branch() or lookup("location")). "
All you need to do is manipulatie $ru or its parts:
$rU="auser";
$rd="domain.example.org";
send_reply("302", "Redirect");
exit;
Though I'm using send_reply and not sl_send_reply, tm/sl stats point out
all 3xx messages are handled by sl.
More information about the sr-users
mailing list