[Users] Create 302 message and modify contact header

Greg Fausak lgfausak at gmail.com
Tue Aug 22 15:44:20 CEST 2006


I don't know if this is right, but:

         if(is_method("INVITE"))
         {
                 rewritehostport("test.com");
                 sl_send_reply("302", "Moved Temporarily");
         }

	seems to work for me.

I'd try loading some branches if you want more than one
item in the contact header.  Just guessing though, I'm usually
the recipient of a 302!

-g

On Aug 22, 2006, at 8:24 AM, Christophe Irles wrote:

> Hi,
>
> I checked archive without any result... >From an openSER rule, I  
> want to create a 302 message if a specific RURI is used.
>
> First I need to change the contact header to specify the URI of the  
> new callee.
>
> I tried something like that:
> avp_printf("$avp(s:100)", "sip:test at christophe.fr;target= 
> $ruri;cause=486;");
> avp_pushto("$ct", "$avp(s:100)"); # => error generated on this line
>
> ERROR:avpops:fixup_pushto_avp: unsupported  destination "$ct";  
> expected $ru,$du,$br
>
> So how can I modify the contact header ?
>
> Just after the update on the contact header I envisaged to use this  
> function
> sl_send_reply(302, "Moved Temporarily")
>
> Is it  correct ? Is there a better way to 'create' 302 message in  
> this case ?
> I check UAC_REDIRECT module but I don't think I can use it in this  
> case or perhaps I missed something
>
> 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.
>
> Thanks,
> Christophe
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/users/attachments/20060822/7650bc30/attachment.htm 


More information about the Users mailing list