[Kamailio-Users] [sr-dev] [OT] SIP ALG Detector released

Iñaki Baz Castillo ibc at aliax.net
Mon Jun 15 20:04:13 CEST 2009


El Lunes, 15 de Junio de 2009, Klaus Darilion escribió:
>  How do you get the original request untouched (no ;received param and so)?
>
> $mb ?
>
> > Also, the reply should be "Content-Type: text/plain".
>
> {..
>   set_reply_body("$mb{s.base64}", "text/plain");
>   //                      \
>   //                       -> to be implemented
>   //
>   sl_send_reply("200","have fun");
>   exit;
> }

Hi Klaus, I remember now that it's not so easy:

If the server encodes *all* the original received request in Base64 and sets 
it in the response body, it becomes a very very long line (no \r\n) and some 
routers *doing SIP ALG* will fail when processing it, so the client doesn't 
get the response.
Confirmed with a Cisco router.

So waht I do in the server I've coded, is separate the request headers and the 
request body, encode each part in Base64 and send two responses: a 180 
containing the requests headers in the body (Base64) and a 500 containing the 
request SDP.

For this to implement in a Kamailio/SR module, it will be required a pv to get 
the received headers and other for the received body, is it possible?



-- 
Iñaki Baz Castillo <ibc at aliax.net>



More information about the Users mailing list