From miconda@gmail.com Wed Feb 1 12:09:41 2012 From: Daniel-Constantin Mierla To: sr-users@lists.kamailio.org Subject: Re: [SR-Users] save a Q850 cause reason from a reply Date: Wed, 01 Feb 2012 12:09:32 +0100 Message-ID: <4F291D6C.9070503@gmail.com> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0810888709==" --===============0810888709== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello, in failure route you have access to the request, not the reply -- I=20 understand the Reason header is in reply from the content of the discussion. Either set an onreply_route and get the Reason header there, like=20 storing it in the avp, or use $T_rpl($hdr(Reason)) in failure route --=20 first option is faster if meets your needs of what to do with the avp. Cheers, Daniel On 1/31/12 6:24 PM, Uri Shacked wrote: > Hi guys..... > the header searching and saving the Q850 code didn't work. > here is what i wrote in the cfg, in the failure route: > /# manage failure routing cases > failure_route[MANAGE_FAILURE] { > xlog("L_CRIT", "failure \n"); > if($avp(CAR)=3D=3D"CALLOUT"){ > xlog("L_CRIT", "failure in callout \n"); > ##if(is_present_hf("Reason")) { > xlog("L_CRIT", "failure in reason\n"); > $avp(Q850)=3D$(hdr(Reason){param.value,cause}{s.int }); > xlog("L_CRIT", "failure in reason $avp(Q850)\n"); > ##}/ > here is the log print...... > / 3(3433) CRITICAL: