<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Verdana",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=FR link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Indeed, RR could do the job. But it will not be easy to get the value after. It could be possible with regex I guess.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>I will look at htable too. It's looks to be easier than dialog.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>For AVPOPS, why not. I'm just afraid with the delay.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Many thanks for all these suggestions.<br><br>Regards,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Igor.<o:p></o:p></span></p><p class=MsoNormal><a name="_MailEndCompose"><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></a></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>De :</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> sr-users [mailto:sr-users-bounces@lists.sip-router.org] <b>De la part de</b> Alex Balashov<br><b>Envoyé :</b> lundi 16 février 2015 19:05<br><b>À :</b> Muhammad Shahzad<br><b>Objet :</b> Re: [SR-Users] Syntax issue?<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal style='background:white'><span style='font-family:"Calibri",sans-serif;color:#1F497D'>Why not an RR parameter? It's probably the most reliable way to store some dialog-persistent data, since it doesn't depend on any in-memory/runtime state to be kept by the proxy itself, instead using the SIP messaging itself as a persistence layer. The only trouble with this approach is that it relies on correct RR behaviour by both endpoints and of course neither hides the value from the endpoints not prevents them from manipulating it.<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Calibri",sans-serif;color:#1F497D'>If the latter aspects are a concern, $dlg vars are probably the way to go. If you don't want to use the dialog module, use an 'htable' with Call-ID + From-tag as key.<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Calibri",sans-serif;color:#1F497D'>--<br>Sent from my BlackBerry. Please excuse errors and brevity.<o:p></o:p></span></p></div><table class=MsoNormalTable border=0 cellpadding=0 width="100%" style='width:100.0%;background:white;border-spacing:0px'><tr><td style='padding:.75pt .75pt .75pt .75pt;font-size:initial;text-align:initial'><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><div><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif'>From: </span></b><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif'>Muhammad Shahzad<o:p></o:p></span></p></div><div><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif'>Sent: </span></b><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif'>Monday, February 16, 2015 12:55 PM<o:p></o:p></span></p></div><div><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif'>To: </span></b><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif'>Kamailio (SER) - Users Mailing List<o:p></o:p></span></p></div><div><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif'>Reply To: </span></b><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif'>Kamailio (SER) - Users Mailing List<o:p></o:p></span></p></div><div><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif'>Subject: </span></b><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif'>Re: [SR-Users] Syntax issue?<o:p></o:p></span></p></div></div></td></tr></table><p class=MsoNormal><o:p> </o:p></p><div id="_originalContent"><div><div><p class=MsoNormal style='margin-bottom:12.0pt'>Well, you can also put them in some storage backend e.g. MySQL, PGSQL using AVPOPS or memory caches such as Redis etc.<o:p></o:p></p></div><p class=MsoNormal>Another way is to set it as record-route parameter using RR module. (not recommended)<br><br><a href="http://kamailio.org/docs/modules/4.2.x/modules/rr.html#add-rr-param-id">http://kamailio.org/docs/modules/4.2.x/modules/rr.html#add-rr-param-id</a><o:p></o:p></p><div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Thank you.<o:p></o:p></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p></div></div></div><div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>On Mon, Feb 16, 2015 at 6:42 PM, Igor Potjevlesch <<a href="mailto:igor.potjevlesch@gmail.com" target="_blank">igor.potjevlesch@gmail.com</a>> wrote:<o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D'>Additionally, there's no other way than implementing dialog module to keep a variable between the beginning and the end of a call?</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D'>Regards,</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D'>Igor.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><a name="14b937c0a31c6db6__MailEndCompose"><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D'> </span></a><o:p></o:p></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>De :</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> Igor Potjevlesch [mailto:<a href="mailto:igor.potjevlesch@gmail.com" target="_blank">igor.potjevlesch@gmail.com</a>] <br><b>Envoyé :</b> lundi 16 février 2015 18:36<br><b>À :</b> 'Kamailio (SER) - Users Mailing List'<br><b>Objet :</b> RE: [SR-Users] Syntax issue?</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D'>Thank you guys, I will try this.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D'>I misunderstood the notion of "transaction". I was thinking that it was the whole call-flow.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D'>Regards,</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D'>Igor.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>De :</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> sr-users [<a href="mailto:sr-users-bounces@lists.sip-router.org" target="_blank">mailto:sr-users-bounces@lists.sip-router.org</a>] <b>De la part de</b> Muhammad Shahzad<br><b>Envoyé :</b> lundi 16 février 2015 18:27<br><b>À :</b> Kamailio (SER) - Users Mailing List<br><b>Objet :</b> Re: [SR-Users] Syntax issue?</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'>As far as i know AVPs are transaction specific only. So they will be deleted as soon as transaction is over, i.e. 200 OK for INVITE is received for example. They will not be available in in-dialog transactions such as ACK, or BYE etc. What you need is to set dialog variable instead, see more info here,<br><br><a href="http://kamailio.org/docs/modules/4.2.x/modules/dialog.html#idp4202736" target="_blank">http://kamailio.org/docs/modules/4.2.x/modules/dialog.html#idp4202736</a><o:p></o:p></p></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Thank you.<o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'> <o:p></o:p></p></div></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>On Mon, Feb 16, 2015 at 6:08 PM, Igor Potjevlesch <<a href="mailto:igor.potjevlesch@gmail.com" target="_blank">igor.potjevlesch@gmail.com</a>> wrote:<o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>Hello,</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>I'm looking for a way to track a call by using basic AVP like this:</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>Into a route that treats INVITE:</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>$avp(s:state)="call_start";</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>Then, if I test this AVP into WITHINDLG route:</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>if($avp(s:state)!="call_start") ; the test fails.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>Did I miss something?</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>The goal is to update this AVP during the life of the transaction.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>Regards,</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#888888'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#888888'>Igor.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#888888'> </span><o:p></o:p></p></div></div><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><br>_______________________________________________<br>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br><a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br><a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><o:p></o:p></p></blockquote></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div></div></div></div></div><p class=MsoNormal style='margin-bottom:12.0pt'><br>_______________________________________________<br>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br><a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br><a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><o:p></o:p></p></blockquote></div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal><br><br><o:p></o:p></p></div></div></body></html>