From dding@aastra.com Fri Mar 11 16:52:39 2011 From: Derrick Ding To: sr-users@lists.kamailio.org Subject: [SR-Users] How to save a variable in a request and use it in next reply Date: Fri, 11 Mar 2011 10:52:33 -0500 Message-ID: <3287DF9FB5BD7C46BA2AE06F5C0BF9E8026507BB@CONMAIL02.aastra.com> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1030039903==" --===============1030039903== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, All Thanks for all your reply. I use Kamailio 3.0.2. Now I know contact header is= : $ct I have some problem when I want to modify the header.=20 Eg. =20 Register: UA---->OpenSer----->SIP proxy Contact in Register request is: ---------------------------------------------- REGISTER SIP:10.30.105.30:5060 SIP/2.0 Contact: "M1080" ;+sip.instance=3D"";expires=3D1800;reg-id=3D0 ----------------------------------------------- However, when SIPproxy reply the 200 OK, contact changed because it doesn't s= upport sip.instance and reg-id: ----------------------------------------------- SIP/2.0 200 OK Contact: ;expires=3D1800; ----------------------------------------------- My question is when forward 200 OK to UA, how the OpenSer use the original co= ntact to replace the contact in the 200 OK from Sip Proxy. I read textops, but I still don't have an idea for this issue. Your reply is appreciated! Derrick -----Original Message----- From: Carsten Bock [mailto:carsten(a)ng-voice.com]=20 Sent: Friday, March 11, 2011 9:22 AM To: Derrick Ding Cc: Asgaroth; Alex Balashov; sr-users(a)lists.sip-router.org Subject: Re: [SR-Users] pseudo variables available in on_reply route(where ca= n I find all variables stand for) Hi, see: http://www.kamailio.org/dokuwiki/doku.php -> Pseudovariables Carsten 2011/3/11 Derrick Ding : > Hi, All > > I started using Kamailio this week. > > Could any one tell me where I can find all variables(eg, $ru, $du, $rd, > $rp, etc) stand for. > > Thanks a lot! > > Derrick > > > > -----Original Message----- > From: sr-users-bounces(a)lists.sip-router.org > [mailto:sr-users-bounces(a)lists.sip-router.org] On Behalf Of Asgaroth > Sent: Thursday, March 10, 2011 10:04 PM > To: Alex Balashov > Cc: sr-users(a)lists.sip-router.org > Subject: Re: [SR-Users] pseudo variables available in on_reply route > > Hi Alex, > > On 11/03/2011 02:37, Alex Balashov wrote: >> Are you actually talking about the destination set, or the domain part >> of the request uri? =C2=A0If the latter, check out $rd and $rp. > > I'm looking for the domain part of the destination uri. I have the > following reply route defined: > > onreply_route[REPLY_ONE] { > =C2=A0 =C2=A0 =C2=A0 =C2=A0xlog("REPLY_ONE : $rm : R-URI=3D$ru\n"); > =C2=A0 =C2=A0 =C2=A0 =C2=A0xlog("REPLY_ONE : $rm : D-URI=3D$du\n"); > =C2=A0 =C2=A0 =C2=A0 =C2=A0xlog("REPLY_ONE : $rm : Request Domain=3D$rd\n"); > =C2=A0 =C2=A0 =C2=A0 =C2=A0xlog("REPLY_ONE : $rm : Request Port=3D$rp\n"); > =C2=A0 =C2=A0 =C2=A0 =C2=A0xlog("REPLY_ONE : $rm : Destination Domain=3D$dd= \n"); > } > > The output I get from the above is as follows: > > [17344]: ERROR: