[SR-Users] How to determine size (number of elements) in xavp stack?

Daniel-Constantin Mierla miconda at gmail.com
Tue Nov 9 08:33:17 CET 2021


Hello,

I do not remember any function to count xavps at this moment, it can be
added of course if someone wants to make a pull request. Otherwise, the
options is looping with index through all xavps for the name you want. A
c function will have to do the same, internally there is no field
keeping the number of avp/xavp with same name.

Cheers,
Daniel

On 08.11.21 16:21, Benoît Panizzon wrote:
> Dear Community
>
> In my previous post I mentioned my problem with sql_xquery
>
> I fear I used this wrong.
>
> $dbr is probably only populated if sql_query is used. Anyway, it is
> always 0 in my testings, even if I clearly get a result.
>
> Now I would like to know how many results I have. How can I determine
> the size of an $xavp stack (or array)?
>
> Or is there another way to get the number of rows returned by a
> sql_xquery without looping an index through all rows?
>
> -- 
> Mit freundlichen Grüssen
>
> -Benoît Panizzon- @ HomeOffice und normal erreichbar
> -- 
> I m p r o W a r e   A G    -    Leiter Commerce Kunden
> ______________________________________________________
>
> Zurlindenstrasse 29             Tel  +41 61 826 93 00
> CH-4133 Pratteln                Fax  +41 61 826 93 01
> Schweiz                         Web  http://www.imp.ch
> ______________________________________________________
>
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users at lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Online
Nov 08-11, 2021 (Europe Timezone) - Feb 21-24, 2022 (America Timezone)
  * https://www.asipto.com/sw/kamailio-advanced-training-online/




More information about the sr-users mailing list