I think you can accomplish this by using both of these together<br /><br />http://www.opensips.org/Resources/DocsCoreVar18#toc93<br />$hdr(WWW-Authenticate) <br /><br />http://www.opensips.org/Resources/DocsCoreTran18#toc6<br />s.select<br /><br /><br /><br /><br /><br />On , Marwan El-Sadek <marwan_sadek@hotmail.com> wrote:<br />> <br />> <br />> <br />> <br />> Hello,<br />> <br />> I'm trying to extract the Realm value from the WWW-Authenticate header of the 401 unauthorized reply, however, I can't find a pseudo-variable for it, so I tried the following:<br />> <br />> $var(temp)=$(hdr(WWW-Authenticate){param.value,Realm});<br />> <br />> I also tried it with Digest Realm, Digest and "Digest Realm".<br />> <br />> The received value in 401 is:<br />> <br />> WWW-Authenticate: Digest realm="XXXX",nonce="5e36af",qop="auth"<br />> <br />> I'm getting the following error: parse_params: invalid character, ; expected, found r<br />> <br />> So think the problems happens because there is a space in the parameter name.<br />> <br />> Does anyone know how can I do this?<br />> <br />> Thanks,<br />> Marwan<br />> <br />> <br />> <br />>