[SR-Users] Bad AVP Flags When Using avp_db_load()

Simpson Chua simpsonchua at yahoo.com
Tue Mar 13 19:22:32 CET 2012


Hi Daniel,

Thanks! I changed to use the $avp() syntax and that fixed it. The examples I followed was from an old wiki.

Simpson


________________________________
 From: "sr-users-request at lists.sip-router.org" <sr-users-request at lists.sip-router.org>
To: sr-users at lists.sip-router.org 
Sent: Tuesday, March 13, 2012 12:45 PM
Subject: sr-users Digest, Vol 82, Issue 41
 
Send sr-users mailing list submissions to
    sr-users at lists.sip-router.org

To subscribe or unsubscribe via the World Wide Web, visit
    http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
or, via email, send a message with subject or body 'help' to
    sr-users-request at lists.sip-router.org

You can reach the person managing the list at
    sr-users-owner at lists.sip-router.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of sr-users digest..."


Today's Topics:

   1. log not visible in stderr (Vineet Menon)
   2. Re: Compilation errors... (Krishna Kurapati)
   3. Bad AVP Flags When Using avp_db_load() (Simpson Chua)
   4. Re: log not visible in stderr (Daniel-Constantin Mierla)
   5. Re: Bad AVP Flags When Using avp_db_load()
      (Daniel-Constantin Mierla)


----------------------------------------------------------------------

Message: 1
Date: Tue, 13 Mar 2012 16:39:27 +0530
From: Vineet Menon <mvineetmenon at gmail.com>
Subject: [SR-Users] log not visible in stderr
To: sr-users at lists.sip-router.org
Message-ID:
    <CAD26Kg268dDfFK=UE4BSbyvSee33nvcybMD3ESEpNYtNXTnCeA at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi,

I am new to kamailio and want to install a simple registrar. Now, I have a
ubuntu machine in which I have installed kamailio 3.2.x. I have included
#!define WITH_DEBUG in configuration file, while the rest of the file is
same as default.

But I am not able to see any debug message.

Any help?

Regards,

Vineet Menon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20120313/a102ddfd/attachment-0001.htm>

------------------------------

Message: 2
Date: Tue, 13 Mar 2012 06:22:01 -0500
From: Krishna Kurapati <kkurapat at gmail.com>
Subject: Re: [SR-Users] Compilation errors...
To: miconda at gmail.com
Cc: "SIP Router - Kamailio \(OpenSER\) and SIP Express Router \(SER\)
    - Users    Mailing List" <sr-users at lists.sip-router.org>
Message-ID:
    <CAOzCjAd5s2qDFbtsg6=ZRyz0BeN0ssGzGK3n-ksLFBU-mt6hEw at mail.gmail.com>
Content-Type: text/plain; charset="windows-1252"

Thanks for the guidance. I excluded the module. I will migrate to using
xmlrpc module.

On Tue, Mar 13, 2012 at 3:23 AM, Daniel-Constantin Mierla <miconda at gmail.com
> wrote:

>  Hello,
>
>
> On 3/12/12 10:55 PM, Krishna Kurapati wrote:
>
> Hi,
>
>  git cloned main branch and tried to compile it on Cent OS 6.
>
>  The mi_xmlrpc module is failing to compile
>
>  make
> Makefile:46: You are using an unsupported libxmlrpc-c3 version  (1.16.24),
> compile at your own risk!
> Makefile:46: You are using an unsupported libxmlrpc-c3 version  (1.16.24),
> compile at your own risk!
>
>
> as the above log message says, you compile against an unsupported lib
> version.
>
> As a matter of fact, you should use xmlrpc module from modules/ folder
> instead of mi_xmlrpc which is going to be obsolete. With xmlrpc you can run
> any MI command via RPC command 'mi', with first parameter the MI command,
> and of course, any RPC command exported from modules.
>
> xmlrpc does not use an external library for transport layer, but the
> tcp/tls from the core.
>
> Cheers,
> Daniel
>
>  CC (gcc) [M mi_xmlrpc.so] abyss_conf.o
> CC (gcc) [M mi_xmlrpc.so] abyss_conn.o
> CC (gcc) [M mi_xmlrpc.so] abyss_data.o
>  abyss_data.c:219: error: expected ?)? before ?*? token
> abyss_data.c:236: error: expected ?)? before ?*? token
> abyss_data.c:249: error: expected ?)? before ?*? token
> abyss_data.c:287: error: expected ?)? before ?*? token
> abyss_data.c:299: error: expected ?)? before ?*? token
> abyss_data.c:312: error: expected ?)? before ?*? token
> abyss_data.c:326: error: expected ?)? before ?*? token
> abyss_data.c:332: error: expected ?)? before ?*? token
> make: *** [abyss_data.o] Error 1
>
>
>  I have installed following rpms:
>
>  xmlrpc-c-devel-1.16.24-1200.1840.el6_1.4.x86_64
> xmlrpc-c-client-1.16.24-1200.1840.el6_1.4.x86_64
> xmlrpc-c-client++-1.16.24-1200.1840.el6_1.4.x86_64
> xmlrpc-c-c++-1.16.24-1200.1840.el6_1.4.x86_64
> xmlrpc-c-1.16.24-1200.1840.el6_1.4.x86_64
>
>  Can someone help with this?
>
>  Thanks
> Krish
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users at lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierla
> Kamailio Advanced Training, April 23-26, 2012, Berlin, Germanyhttp://www.asipto.com/index.php/kamailio-advanced-training/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20120313/e2a09fc4/attachment-0001.htm>

------------------------------

Message: 3
Date: Tue, 13 Mar 2012 09:05:09 -0700 (PDT)
From: Simpson Chua <simpsonchua at yahoo.com>
Subject: [SR-Users] Bad AVP Flags When Using avp_db_load()
To: "sr-users at lists.sip-router.org" <sr-users at lists.sip-router.org>
Message-ID:
    <1331654709.41676.YahooMailNeo at web46011.mail.sp1.yahoo.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi,

I'm trying to use avp_db_load to check for some IPs but I'm getting bad avp flags errors. As far as I understand, the syntax is correct.?

TableName: labservers
uuid ? username ? ?domain ? ? ?attribute ? ? ? ? ?value ? ? ? ? ? ?type
"" ? ? ?"" ? ? ??"domain1" ? ?"lab1" ? ? ?"192.168.55.1" ? ? ? ?0?
"" ? ? ?"" ? ? ??"domain1" ? ?"lab1" ? ? ?"192.168.55.2" ? ? ? ?0?
"" ? ? ?"" ? ?"domain2" ? ?"lab2" ? ? ?"192.168.55.3" ? ? ? ?0?
"" ? ? ?"" ? ?"domain2" ? ?"lab2" ? ? ?"192.168.55.4" ? ? ? ?0?

if ((avp_db_load("$ruri/domain","s:lab1/labservers") && avp_check("s:lab1", "eq/$Ri/gi"))) {
# Do something

}


Mar 13 10:55:24 ubuntu /usr/local/sbin/kamailio[12012]: DEBUG: <core> [rvalue.c:2857]: RV fixing type 3
Mar 13 10:55:24 ubuntu /usr/local/sbin/kamailio[12012]: DEBUG: <core> [rvalue.c:2857]: RV fixing type 2
Mar 13 10:55:24 ubuntu /usr/local/sbin/kamailio[12012]: DEBUG: <core> [rvalue.c:2865]: RV is str: "REGISTER"
Mar 13 10:55:24 ubuntu /usr/local/sbin/kamailio[12012]: DEBUG: <core> [route.c:506]: right EXP optimized: op10(O51, _ST22_) => op10(O51, _ST1_)
Mar 13 10:55:24 ubuntu /usr/local/sbin/kamailio[12012]: DEBUG: <core> [rvalue.c:2857]: RV fixing type 4
Mar 13 10:55:24 ubuntu /usr/local/sbin/kamailio[12012]: DEBUG: <core> [route.c:929]: fixing avp_db_load()
Mar 13 10:55:24 ubuntu /usr/local/sbin/kamailio[12012]: ERROR: avpops [avpops_parse.c:129]: error - bad avp flags
Mar 13 10:55:24 ubuntu /usr/local/sbin/kamailio[12012]: ERROR: avpops [avpops.c:299]: parse failed
Mar 13 10:55:24 ubuntu /usr/local/sbin/kamailio[12012]: ERROR: <core> [route.c:1216]: fixing failed (code=-1) at cfg:/usr/local/etc/kamailio//kamailio.cfg:71

Line 71 is the "if" statement above. Could someone see could be the issue?

Thanks,
Simpson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20120313/d84d561e/attachment-0001.htm>

------------------------------

Message: 4
Date: Tue, 13 Mar 2012 18:42:41 +0100
From: Daniel-Constantin Mierla <miconda at gmail.com>
Subject: Re: [SR-Users] log not visible in stderr
To: "SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -
    Users    Mailing List" <sr-users at lists.sip-router.org>
Message-ID: <4F5F8711.5080204 at gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hello,

On 3/13/12 12:09 PM, Vineet Menon wrote:
> Hi,
>
> I am new to kamailio and want to install a simple registrar. Now, I 
> have a ubuntu machine in which I have installed kamailio 3.2.x. I have 
> included #!define WITH_DEBUG in configuration file, while the rest of 
> the file is same as default.
>
> But I am not able to see any debug message.
>
> Any help?
how do you start kamailio? Can you try to start it from command line 
with parameters '-E -ddd'?

Cheers,
Daniel


-- 
Daniel-Constantin Mierla
Kamailio Advanced Training, April 23-26, 2012, Berlin, Germany
http://www.asipto.com/index.php/kamailio-advanced-training/




------------------------------

Message: 5
Date: Tue, 13 Mar 2012 18:45:37 +0100
From: Daniel-Constantin Mierla <miconda at gmail.com>
Subject: Re: [SR-Users] Bad AVP Flags When Using avp_db_load()
To: Simpson Chua <simpsonchua at yahoo.com>,     "SIP Router - Kamailio
    (OpenSER) and SIP Express Router (SER) - Users    Mailing List"
    <sr-users at lists.sip-router.org>
Message-ID: <4F5F87C1.2090604 at gmail.com>
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"

Hello,

On 3/13/12 5:05 PM, Simpson Chua wrote:
> Hi,
>
> I'm trying to use avp_db_load to check for some IPs but I'm getting 
> bad avp flags errors. As far as I understand, the syntax is correct.
>
> TableName: labservers
> uuid   username    domain      attribute          value            type
> ""      ""  "domain1"    "lab1"      "192.168.55.1"        0
> ""      ""  "domain1"    "lab1"      "192.168.55.2"        0
> ""      ""  "domain2"    "lab2"      "192.168.55.3"        0
> ""      ""  "domain2"    "lab2"      "192.168.55.4"        0
>
> if ((avp_db_load("$ruri/domain","s:lab1/labservers") && 
> avp_check("s:lab1", "eq/$Ri/gi"))) {
> # Do something
> }
>
> Mar 13 10:55:24 ubuntu /usr/local/sbin/kamailio[12012]: DEBUG: <core> 
> [rvalue.c:2857]: RV fixing type 3
> Mar 13 10:55:24 ubuntu /usr/local/sbin/kamailio[12012]: DEBUG: <core> 
> [rvalue.c:2857]: RV fixing type 2
> Mar 13 10:55:24 ubuntu /usr/local/sbin/kamailio[12012]: DEBUG: <core> 
> [rvalue.c:2865]: RV is str: "REGISTER"
> Mar 13 10:55:24 ubuntu /usr/local/sbin/kamailio[12012]: DEBUG: <core> 
> [route.c:506]: right EXP optimized: op10(O51, _ST22_) => op10(O51, _ST1_)
> Mar 13 10:55:24 ubuntu /usr/local/sbin/kamailio[12012]: DEBUG: <core> 
> [rvalue.c:2857]: RV fixing type 4
> Mar 13 10:55:24 ubuntu /usr/local/sbin/kamailio[12012]: DEBUG: <core> 
> [route.c:929]: fixing avp_db_load()
> Mar 13 10:55:24 ubuntu /usr/local/sbin/kamailio[12012]: ERROR: avpops 
> [avpops_parse.c:129]: error - bad avp flags
> Mar 13 10:55:24 ubuntu /usr/local/sbin/kamailio[12012]: ERROR: avpops 
> [avpops.c:299]: parse failed
> Mar 13 10:55:24 ubuntu /usr/local/sbin/kamailio[12012]: ERROR: <core> 
> [route.c:1216]: fixing failed (code=-1) at 
> cfg:/usr/local/etc/kamailio//kamailio.cfg:71
>
> Line 71 is the "if" statement above. Could someone see could be the issue?
first problem is that you use a very old avp name syntax for 
avp_db_load() -- for many version the avp names have to be provided as 
full avp specs. So instead of "s:lab1" you have to use $avp(s:lab1) (you 
can even omit the 's:' if you run 3.x.

Try with these changes and if you get other errors, paste the messages 
back to an email to the list.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
Kamailio Advanced Training, April 23-26, 2012, Berlin, Germany
http://www.asipto.com/index.php/kamailio-advanced-training/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20120313/4d37f5c8/attachment.htm>

------------------------------

_______________________________________________
sr-users mailing list
sr-users at lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


End of sr-users Digest, Vol 82, Issue 41
****************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20120313/7e838aa0/attachment-0001.htm>


More information about the sr-users mailing list