<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";}
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:"Calibri","sans-serif";
        color:#1F497D;}
.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'>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: sip:sipp@[local_ip]:[local_port];q=0.1;rate=0.002 </b>and <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'>$var(rate)=$sel(contact.params["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'>xlog("CONTACT URI PARAMS: $var(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'><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'>/usr/sbin/kamailio[25909]: ERROR: <script>: CONTACT URI PARAMS: 0.002<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'>Next, you can try to log $var(rate) with acc like this: acc_log_request(“RATE: $var(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'><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'>-----</span><span 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'>Igor Pavlov<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 style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span 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> Thursday, June 27, 2013 9:55 PM<br><b>To:</b> kamailio<br><b>Subject:</b> [SR-Users] Consuming 300 Multiple Choices<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><div><div><div><div><div><div><div><p class=MsoNormal>Greetings,<o:p></o:p></p></div><p class=MsoNormal style='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();<br><br><o:p></o:p></p></div><p class=MsoNormal style='margin-bottom:12.0pt'>In my failure_route[2] I am just doing:<o:p></o:p></p></div><p class=MsoNormal>t_next_contacts();<o:p></o:p></p></div><p class=MsoNormal style='margin-bottom:12.0pt'>t_on_failure("2");<br>t_relay();<o:p></o:p></p></div><p class=MsoNormal style='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: <</span><a href="sip:9546496708@X.X.X.X;npdi"><span lang=EN-US>sip:9546496708@X.X.X.X;npdi</span></a><span lang=EN-US>>;q=0.001;rate=0.002000<br>Contact: <</span><a href="sip:9546496708@X.X.X.X;npdi"><span lang=EN-US>sip:9546496708@X.X.X.X;npdi</span></a><span lang=EN-US>>;q=0.002;rate=0.009850<br>Contact: <</span><a href="sip:9546496708@X.X.X.X;npdi"><span lang=EN-US>sip:9546496708@X.X.X.X;npdi</span></a><span lang=EN-US>>;q=0.003;rate=0.009850<br>Contact: <</span><a href="sip:9546496708@X.X.X.X;npdi"><span lang=EN-US>sip:9546496708@X.X.X.X;npdi</span></a><span lang=EN-US>>;q=0.004;rate=0.009850<br>Contact: <</span><a href="sip:9546496708@X.X.X.X;npdi"><span lang=EN-US>sip:9546496708@X.X.X.X;npdi</span></a><span lang=EN-US>>;q=0.005;rate=0.009850<br>Contact: <</span><a href="sip:9546496708@X.X.X.X;npdi"><span lang=EN-US>sip:9546496708@X.X.X.X;npdi</span></a><span lang=EN-US>>;q=0.006;rate=0.009850<br>To: <</span><a href="sip:19546496708@X.X.X.X"><span lang=EN-US>sip:19546496708@X.X.X.X</span></a><span lang=EN-US>><br>From: "7203355925" <</span><a href="sip:7203355925@X.X.X.X"><span lang=EN-US>sip:7203355925@X.X.X.X</span></a><span lang=EN-US>>;tag=as5927da08<br>Call-ID: </span><a href="mailto:3eb09e772e32e18c1fe926230802818c@X.X.X.X"><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='margin-bottom:12.0pt'>How would I grab that attribute and log it using acc?<o:p></o:p></p></div><p class=MsoNormal>Thanks,<br>Geoff<o:p></o:p></p></div></div></body></html>