<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.5450.4" name=GENERATOR></HEAD>
<BODY 
style="WORD-WRAP: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space">
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff 
size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=218095213-22082006><FONT face=Arial 
color=#0000ff size=2>Before to reply a 302, I need to change the contact header 
in order to specify the URI of the new callee.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=218095213-22082006><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=218095213-22082006><FONT face=Arial 
color=#0000ff size=2>For example A call B, but from the config file I know B 
wants to redirect calls to C. So I must specify the URI of user C in the contact 
header of the 302 message</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=218095213-22082006><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=218095213-22082006><FONT face=Arial 
color=#0000ff size=2>In your example, you change only the 
domain:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=218095213-22082006><FONT face=Arial 
color=#0000ff size=2>A call&nbsp;B@test.fr&nbsp;and you change the 
message&nbsp;to A call <A 
href="mailto:B@test.com">B@test.com</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=218095213-22082006><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=218095213-22082006><FONT face=Arial 
color=#0000ff size=2>Christophe</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=fr dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>De&nbsp;:</B> Greg Fausak 
[mailto:lgfausak@gmail.com] <BR><B>Envoyé&nbsp;:</B> mardi 22 août 2006 
15:44<BR><B>À&nbsp;:</B> Christophe Irles<BR><B>Cc&nbsp;:</B> 
OpenSER<BR><B>Objet&nbsp;:</B> Re: [Users] Create 302 message and modify contact 
header<BR></FONT><BR></DIV>
<DIV></DIV>I don't know if this is right, but:
<DIV><BR class=khtml-block-placeholder></DIV>
<DIV>if(is_method("INVITE"))</DIV>
<DIV>{</DIV>
<DIV>rewritehostport("test.com");</DIV>
<DIV>sl_send_reply("302", "Moved Temporarily");</DIV>
<DIV>}</DIV>
<DIV><BR class=khtml-block-placeholder></DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>seems to work 
for me.</DIV>
<DIV><BR class=khtml-block-placeholder></DIV>
<DIV>I'd try loading some branches if you want more than one</DIV>
<DIV>item in the contact header. Just guessing though, I'm usually</DIV>
<DIV>the recipient of a 302!</DIV>
<DIV><BR class=khtml-block-placeholder></DIV>
<DIV>-g</DIV>
<DIV><BR>
<DIV>
<DIV>On Aug 22, 2006, at 8:24 AM, Christophe Irles wrote:</DIV><BR 
class=Apple-interchange-newline>
<BLOCKQUOTE type="cite">
  <P><FONT face=Arial size=2>Hi,</FONT> </P>
  <P><FONT face=Arial size=2>I checked archive without any result... &gt;From an 
  openSER rule, I want to create a 302 message if a specific RURI is 
  used.</FONT></P>
  <P><FONT face=Arial size=2>First I need to change the contact header to 
  specify the URI of the new callee. </FONT></P>
  <P><FONT face=Arial size=2>I tried something like that:</FONT> <BR><FONT 
  face=Arial size=2>avp_printf("$avp(s:100)", "sip:<A 
  href="mailto:test@christophe.fr">test@christophe.fr</A>;target=$ruri;cause=486;");</FONT> 
  <BR><FONT face=Arial size=2>avp_pushto("$ct", "$avp(s:100)"); # =&gt; error 
  generated on this line</FONT> </P>
  <P><FONT face=Arial size=2>ERROR:avpops:fixup_pushto_avp: unsupported 
  destination "$ct"; expected $ru,$du,$br</FONT> </P>
  <P><FONT face=Arial size=2>So how can I modify the contact header ?</FONT> 
</P>
  <P><FONT face=Arial size=2>Just after the update on the contact header I 
  envisaged to use this function</FONT> <BR><FONT face=Arial 
  size=2>sl_send_reply(302, "Moved Temporarily")</FONT> </P>
  <P><FONT face=Arial size=2>Is it correct ? Is there a better way to 'create' 
  302 message in this case ? </FONT><BR><FONT face=Arial size=2>I check 
  UAC_REDIRECT module but I don't think I can use it in this case or perhaps I 
  missed something</FONT> </P>
  <P><FONT face=Arial size=2>Before to use a 302 message I succesfully tested to 
  create a new INVITE with the $ruri modified correctly. But I would like to 
  create a 302 message to prevent any problem of authentication.</FONT></P>
  <P><FONT face=Arial size=2>Thanks,</FONT> <BR><FONT face=Arial 
  size=2>Christophe</FONT> </P>
  <DIV style="MARGIN: 0px">_______________________________________________</DIV>
  <DIV style="MARGIN: 0px">Users mailing list</DIV>
  <DIV style="MARGIN: 0px"><A 
  href="mailto:Users@openser.org">Users@openser.org</A></DIV>
  <DIV style="MARGIN: 0px"><A 
  href="http://openser.org/cgi-bin/mailman/listinfo/users">http://openser.org/cgi-bin/mailman/listinfo/users</A></DIV></BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>