<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hello,<br>
<br>
The encode and decode transformations work on strings, not on their
integer values.<br>
So do not expect to have 19 encoded to hexa to be 13.<br>
<br>
For example, 3 encoded to hexa is 33, because '3' is 51 in ascii,
thus converted to hexa it is 33 = 16*3+3 = 51.<br>
<br>
Regards,<br>
<pre class="moz-signature" cols="72">Vlad Paiu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a> </pre>
<br>
On 06/26/2012 08:19 PM, Ali Pey wrote:
<blockquote
cite="mid:CA+q4kR+JbiXGkaivJnW8snF9isj6De+QgFrY5ACATjdWi0=A9g@mail.gmail.com"
type="cite">Hi There,
<div><br>
</div>
<div>Is there a way to convert an avp variable to hex?</div>
<div><br>
</div>
<div>I've tried the following but it's not working.</div>
<div><br>
</div>
<div>$(avp(id){s.encode.hexa})</div>
<div><br>
</div>
<div>For instance if avp(id) is 11, it returns 3131, if it's 3, it
returns 33.</div>
<div><br>
</div>
<div>Am I doing something wrong? </div>
<div>Is there a better way?</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Ali Pey</div>
<div><br>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
</body>
</html>