<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=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 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";}
h3
        {mso-style-priority:9;
        mso-style-link:"\0417\0430\0433\043E\043B\043E\0432\043E\043A 3 \0417\043D\0430\043A";
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:13.5pt;
        font-family:"Times New Roman","serif";
        font-weight:bold;}
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;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"\0422\0435\043A\0441\0442 \0432\044B\043D\043E\0441\043A\0438 \0417\043D\0430\043A";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.a
        {mso-style-name:"\0422\0435\043A\0441\0442 \0432\044B\043D\043E\0441\043A\0438 \0417\043D\0430\043A";
        mso-style-priority:99;
        mso-style-link:"\0422\0435\043A\0441\0442 \0432\044B\043D\043E\0441\043A\0438";
        font-family:"Tahoma","sans-serif";
        mso-fareast-language:RU;}
span.3
        {mso-style-name:"\0417\0430\0433\043E\043B\043E\0432\043E\043A 3 \0417\043D\0430\043A";
        mso-style-priority:9;
        mso-style-link:"\0417\0430\0433\043E\043B\043E\0432\043E\043A 3";
        font-family:"Times New Roman","serif";
        mso-fareast-language:RU;
        font-weight:bold;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:2.0cm 42.5pt 2.0cm 3.0cm;}
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 lang=RU link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>This should work in 1.5:<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span lang=EN-US>$ct</span></b><span lang=EN-US> - reference to body of contact header <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>xlog("CONTCAT: rate=$(ct{param.value,rate})");<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>acc_log_request(“RATE: </span><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>$(ct{param.value,rate})</span><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>”);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] <b>On Behalf Of </b>Geoffrey Mina<br><b>Sent:</b> Friday, June 28, 2013 4:38 PM<br><b>To:</b> Kamailio (SER) - Users Mailing List<br><b>Subject:</b> Re: [SR-Users] Consuming 300 Multiple Choices<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><div><div><p class=MsoNormal style='margin-bottom:12.0pt'>I should have been more clear.  I am using Kamailio 1.5.  I would consider upgrading, but that isn't the ideal path here.<o:p></o:p></p></div><p class=MsoNormal>Any other idea for 1.5?<o:p></o:p></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p><div><p class=MsoNormal>On Fri, Jun 28, 2013 at 12:46 AM, I.Pavlov <<a href="mailto:ip@izhnet.ru" target="_blank">ip@izhnet.ru</a>> wrote:<o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi Geoff, to grab “rate”-attribute try to use “$sel(contact.params["rate"]);”-expression. For example, in my test with sipp, I used <b>Contact: <a href="sip:sipp@[local_ip]:[local_port];q=0.1;rate=0.002">sip:sipp@[local_ip]:[local_port];q=0.1;rate=0.002</a> </b>and </span><span lang=EN-US><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><span lang=EN-US><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>$var(rate)=$sel(contact.params["rate"]);</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>xlog("CONTACT URI PARAMS: $var(rate)");</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","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-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>/usr/sbin/kamailio[25909]: ERROR: <script>: CONTACT URI PARAMS: 0.002</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","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-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Next, you can try to log $var(rate) with acc like this: acc_log_request(“RATE: $var(rate)”);</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","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-US style='font-size:11.0pt;font-family:"Calibri","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-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Igor Pavlov</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","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:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> <a href="mailto:sr-users-bounces@lists.sip-router.org" target="_blank">sr-users-bounces@lists.sip-router.org</a> [mailto:<a href="mailto:sr-users-bounces@lists.sip-router.org" target="_blank">sr-users-bounces@lists.sip-router.org</a>] <b>On Behalf Of </b>Geoffrey Mina<br><b>Sent:</b> Thursday, June 27, 2013 9:55 PM<br><b>To:</b> kamailio<br><b>Subject:</b> [SR-Users] Consuming 300 Multiple Choices</span><o:p></o:p></p><div><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><div><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Greetings,<o:p></o:p></p></div><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'>I am looking for a way to get some extra information out of the Contact header when consuming a multiple choices response.  I am using uac_redirect to populate the branches.  <br><br>get_redirects("*");<br>t_load_contacts();<br>t_next_contacts();<br>        <br>t_on_failure("2");<br>t_relay();<o:p></o:p></p></div><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'>In my failure_route[2] I am just doing:<o:p></o:p></p></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>t_next_contacts();<o:p></o:p></p></div><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'>t_on_failure("2");<br>t_relay();<o:p></o:p></p></div><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'>In my Multiple Choices packet, I am getting some additional information that I would like to log using the acc module.  There is a "rate" attribute that defines how much the outbound leg is going to cost to terminate.  <span lang=EN-US>Here is how the packet looks:<br><br>SIP/2.0 300 Multiple Choices<br>Via: SIP/2.0/UDP X.X.X.X;branch=z9hG4bK6213.a6567804.0<br>Via: SIP/2.0/UDP X.X.X.X;branch=z9hG4bK6213.a6c73fe6.0<br>Via: SIP/2.0/UDP X.X.X.X:5060;received=X.X.X.X;branch=z9hG4bK61f266c4;rport=5060<br>Contact: <<a href="sip:9546496708@X.X.X.X;npdi">sip:9546496708@X.X.X.X;npdi</a>>;q=0.001;rate=0.002000<br>Contact: <<a href="sip:9546496708@X.X.X.X;npdi">sip:9546496708@X.X.X.X;npdi</a>>;q=0.002;rate=0.009850<br>Contact: <<a href="sip:9546496708@X.X.X.X;npdi">sip:9546496708@X.X.X.X;npdi</a>>;q=0.003;rate=0.009850<br>Contact: <<a href="sip:9546496708@X.X.X.X;npdi">sip:9546496708@X.X.X.X;npdi</a>>;q=0.004;rate=0.009850<br>Contact: <<a href="sip:9546496708@X.X.X.X;npdi">sip:9546496708@X.X.X.X;npdi</a>>;q=0.005;rate=0.009850<br>Contact: <<a href="sip:9546496708@X.X.X.X;npdi">sip:9546496708@X.X.X.X;npdi</a>>;q=0.006;rate=0.009850<br>To: <<a href="sip:19546496708@X.X.X.X">sip:19546496708@X.X.X.X</a>><br>From: "<a href="tel:7203355925" target="_blank">7203355925</a>" <<a href="sip:7203355925@X.X.X.X">sip:7203355925@X.X.X.X</a>>;tag=as5927da08<br>Call-ID: </span><a href="mailto:3eb09e772e32e18c1fe926230802818c@X.X.X.X" target="_blank"><span lang=EN-US>3eb09e772e32e18c1fe926230802818c@X.X.X.X</span></a><span lang=EN-US><br>CSeq: 102 INVITE<br>Server: Routing Server<br>Content-Length: 0<o:p></o:p></span></p></div><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'>How would I grab that attribute and log it using acc?<o:p></o:p></p></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Thanks,<br>Geoff<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></div><p class=MsoNormal><o:p> </o:p></p></div></div></body></html>