<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 09.07.2024 14:18, Carsten Bock
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CADw-rRx4cNJL2jasaxbtEoWdaKqpCiKmkLZn8OvX=asacyCFEQ@mail.gmail.com">
<div>The definition itself seems to be fine: If I rename the
"Server-Assignment-Type" to "SAT" and
"User-Data-Already-Available" to "UDA-Available", OpenSIPS
starts. However, if I follow the examples (e.g. module docs for
aaa_diameter and here <a
href="https://www.opensips.org/Documentation/Tutorials-Diameter-Client-Server"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://www.opensips.org/Documentation/Tutorials-Diameter-Client-Server</a>),
I fail to send the Diameter-Request:<br>
<br>
</div>
<div>11:10:14 ERROR ERROR: Invalid parameter '(((avp) &&
(((struct msg_avp_chain *)(avp))->type == MSG_AVP) &&
(((struct avp *)(avp))->avp_eyec == (0x11355467))) &&
pdata)', 22<br>
</div>
<div><br>
</div>
<div>Am I missing something? Can someone share some example code
for sending a SAR request? Is the documentation missing
something?</div>
</blockquote>
<p><font face="monospace">Hello Carsten,</font></p>
<p><font face="monospace">It is great to hear you are having fun
with the module! With regards to freeDiameter library errors
(which are taken straight up from
/usr/include/asm-generic/errno-base.h, btw), I've typically seen
two codes being returned by the library:</font></p>
<p><font face="monospace">#define EINVAL 22 /* Invalid
argument */ -- most frequent<br>
#define EEXIST 17 /* File exists */<br>
</font></p>
<p><font face="monospace">Now, with <b>17</b> (already exists),
this is returned if you are trying to register a *duplicate* AVP
as string name, but with different properties (maybe diff type?
diff code? etc.). As a general rule, the library won't
complain if we define a perfectly (?) identical AVP twice - it
will simply move on and return <b>0 </b>(success).</font></p>
<p><font face="monospace">In your case, I suspect that the <b>22</b>
(invalid arg) is still connected to AVP duplication somehow, but
the library returns <b>22</b> from some other part of the
error-handling code, as a small mistake. Especially since
you're saying <i>it works</i> once you fix the name to
something else.</font></p>
<p><font face="monospace">To begin the troubleshooting, which
dictionaries / fd extensions are you loading right now? Because
if you're loading the <b>dict_dcca_3gpp.fdx</b> module, this
one should already contain both of your AVPs (hence explaining
your errors!), check their definitions here on the <i>libfreeDiameter</i>
GitHub:</font><font face="monospace"><br>
</font></p>
<p><font face="monospace"><a moz-do-not-send="true"
href="https://github.com/freeDiameter/freeDiameter/blob/master/extensions/dict_dcca_3gpp/add_avps.c#L6999">Server-Assignment-Type</a>
and <a moz-do-not-send="true"
href="https://github.com/freeDiameter/freeDiameter/blob/master/extensions/dict_dcca_3gpp/add_avps.c#L7138">User-Data-Already-Available</a><br>
</font></p>
<p><font face="monospace">Best regards,<br>
</font></p>
<pre class="moz-signature" cols="72">--
Liviu Chircu
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/liviuchircu">www.twitter.com/liviuchircu</a> | <a class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a></pre>
</body>
</html>