[asterisk-dev] chan_sip.c request URI parsing

Ryan Mitchell rjm at tcl.net
Wed Jul 12 15:19:19 MST 2006


In check_user_full() in chan_sip.c, does anyone know what the purpose of
the code that inserts a \0 at the first semi-colon found in the variable
'uri' ?

The issue I'm working on is I think is the same as in Mantis 7208.  (In
my specific case I'm working on an XO compatibility issue that has to do
with XO's Sonus switch that puts SS7 bits and pieces in *both* the user
and host portions of the request URI).

check_user_full() takes both char *uri, and struct sip_request *req;
req->rlPart2 is the same pointer as uri, so mangling uri is going to
mangle rlPart2 in the req.  (I'm tracking this through the code for the
case of a new INVITE).

If check_user_full() operated on a copy of the request URI, I believe
this would solve the problem described in Mantis issue 7208.  My first
workaround has been to modify check_user_full() to not blindly terminate
uri at the first semi-colon it finds, but I think check_user_full() may
want a specific looking uri to later do digest computations via
check_auth().

thanks,
Ryan




More information about the asterisk-dev mailing list