<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
just refreshed myself with the code -- for some reason the response
code is kept internally with an offset of 10000 (e.g., reply code
200 is stored as 10200). At this time I couldn't remember why I
decided this way, maybe because it is stored in a field used also
for requests method type, to avoid overlapping value.<br>
<br>
Anyhow, there should be a fix pushed in the master branch to return
the value from msrp message. Let me know if works.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<div class="moz-cite-prefix">On 2/7/13 5:16 PM, Peter Dunkley wrote:<br>
</div>
<blockquote
cite="mid:1360253786.11941.1.camel@pd-notebook-linux.croc.internal"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="GENERATOR" content="GtkHTML/4.6.2">
It's just MSRP responses (I've only gotten the client stack to
generate 200 OKs).<br>
<br>
Regards,<br>
<br>
Peter<br>
<br>
On Thu, 2013-02-07 at 16:38 +0100, Daniel-Constantin Mierla wrote:<br>
<blockquote type="CITE"> Hello,<br>
<br>
I will look over it very soon, just didn't get time yet.<br>
<br>
Is it for all messages, or just for some particular ones?<br>
<br>
Cheers,<br>
Daniel<br>
<br>
</blockquote>
<blockquote type="CITE"> On 2/7/13 11:46 AM, Peter Dunkley wrote:<br>
<br>
</blockquote>
<blockquote type="CITE">
<blockquote type="CITE"> Hi,<br>
<br>
Has anyone got any ideas about this, because it has me very
confused.<br>
<br>
Peter<br>
<br>
On Wed, 2013-02-06 at 16:28 +0000, Peter Dunkley wrote:<br>
<blockquote type="CITE"> Possible - but the inside the MSRP
function the pv_get_intstrval() function is used, so in both
the examples from my email I would expect $msrp(code) to
resolve to an integer with a value of 200.<br>
<br>
Regards,<br>
<br>
Peter<br>
<br>
On Wed, 2013-02-06 at 14:09 -0200, Edson - Lists wrote:
<blockquote type="CITE">
<pre>Just a guess....
hex('\n') => 0x0a or '10'
So, 10200 = concat('10','200')... don't know why... but that's a hint...
Edson.
Em 06/02/2013 14:03, Peter Dunkley escreveu:
<font color="#737373">></font>
<font color="#737373">> I am having strange behaviour with $msrp(code).</font>
<font color="#737373">></font>
<font color="#737373">> The following config. fragment:</font>
<font color="#737373">></font>
<font color="#737373">> if (msrp_is_reply()) {</font>
<font color="#737373">> xlog("Code: $msrp(code)\n");</font>
<font color="#737373">> if ($msrp(code) < 300) {</font>
<font color="#737373">> xlog("Received OK MSRP reply\n");</font>
<font color="#737373">> } else {</font>
<font color="#737373">> xlog("Received failure MSRP reply\n");</font>
<font color="#737373">> }</font>
<font color="#737373">></font>
<font color="#737373">></font>
<font color="#737373">> Produces the following output:</font>
<font color="#737373">></font>
<font color="#737373">> Feb 6 15:55:02 blade14 /usr/sbin/kamailio[3831]: ERROR: <script>: Code: 200</font>
<font color="#737373">> Feb 6 15:55:02 blade14 /usr/sbin/kamailio[3831]: ERROR: <script>: Received failure MSRP reply</font>
<font color="#737373">></font>
<font color="#737373">></font>
<font color="#737373">> Which I can't explain as 200 is clearly less than 300.</font>
<font color="#737373">></font>
<font color="#737373">> It gets even stranger when I change the config. to this:</font>
<font color="#737373">></font>
<font color="#737373">> if (msrp_is_reply()) {</font>
<font color="#737373">> $var(tmp) = $msrp(code)</font>
<font color="#737373">> xlog("Code: $var(tmp)\n");</font>
<font color="#737373">> if ($var(tmp) < 300) {</font>
<font color="#737373">> xlog("Received OK MSRP reply\n");</font>
<font color="#737373">> } else {</font>
<font color="#737373">> xlog("Received failure MSRP reply\n");</font>
<font color="#737373">> }</font>
<font color="#737373">></font>
<font color="#737373">></font>
<font color="#737373">> And this is the output:</font>
<font color="#737373">></font>
<font color="#737373">> Feb 6 15:56:17 blade14 /usr/sbin/kamailio[3831]: ERROR: <script>: Code: 10200</font>
<font color="#737373">> Feb 6 15:56:17 blade14 /usr/sbin/kamailio[3831]: ERROR: <script>: Received failure MSRP reply</font>
<font color="#737373">></font>
<font color="#737373">></font>
<font color="#737373">> The MSRP response here was a 200 OK. So where did the 10200 come from?</font>
<font color="#737373">></font>
<font color="#737373">></font>
<font color="#737373">> Regards,</font>
<font color="#737373">></font>
<font color="#737373">> Peter</font>
<font color="#737373">></font>
<font color="#737373">> --</font>
<font color="#737373">> Peter Dunkley</font>
<font color="#737373">> Technical Director</font>
<font color="#737373">> Crocodile RCS Ltd</font>
<font color="#737373">></font>
<font color="#737373">></font>
<font color="#737373">></font>
<font color="#737373">> _______________________________________________</font>
<font color="#737373">> sr-dev mailing list</font>
<font color="#737373">> <a moz-do-not-send="true" href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a></font>
<font color="#737373">> <a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a></font>
<font color="#737373">></font>
</pre>
</blockquote>
<br>
<table cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>
<pre>_______________________________________________
sr-dev mailing list
<a moz-do-not-send="true" href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a>
<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
</td>
</tr>
</tbody>
</table>
</blockquote>
<table cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>
<pre>--
Peter Dunkley
Technical Director
Crocodile RCS Ltd
</pre>
</td>
</tr>
</tbody>
</table>
<br>
<br>
<br>
<pre>_______________________________________________
sr-dev mailing list
<a moz-do-not-send="true" href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a>
<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
</blockquote>
<br>
<pre>--
Daniel-Constantin Mierla - <a moz-do-not-send="true" href="http://www.asipto.com">http://www.asipto.com</a>
<a moz-do-not-send="true" href="http://twitter.com/#%21/miconda">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio World Conference, April 16-17, 2013, Berlin
- <a moz-do-not-send="true" href="http://conference.kamailio.com">http://conference.kamailio.com</a> -
_______________________________________________
sr-dev mailing list
<a moz-do-not-send="true" href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a>
<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
</blockquote>
<br>
<table cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>
<pre>--
Peter Dunkley
Technical Director
Crocodile RCS Ltd
</pre>
</td>
</tr>
</tbody>
</table>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio World Conference, April 16-17, 2013, Berlin
- <a class="moz-txt-link-freetext" href="http://conference.kamailio.com">http://conference.kamailio.com</a> -</pre>
</body>
</html>