In the 2.3.x version opensips moved from $avp variables to $acc_extra. This is very bad, really very bad :)
|
Hi,
Can you elaborate on why is this so bad ? We migrated from $avps to $acc_extra to make the scripting easier and cleaner - so a better experience for the users. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com OpenSIPS Bootcamp 2017, Houston, US http://opensips.org/training/OpenSIPS_Bootcamp_2017.html On 06/06/2017 04:56 PM, Edwin wrote: > In the 2.3.x version opensips moved from $avp variables to $acc_extra. This > is very bad, really very bad :) > > > > > > -- > View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/acc-extra-fields-tp7607614.html > Sent from the OpenSIPS - Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > [hidden email] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users _______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users |
Hi Bogdan, I use $avp's in i.a. 'avp_db_query' and 'store_dlg_value', and created extra fields for channel, a_number, b_number, subscriber_id. The channel is defined in drouting (modparam("drouting", "gw_id_avp", '$avp(channel)')). First I tried to swap all the $avp for $acc_extra, but 'auth_db' didn't appreciate this : "auth_db:parse_aaa_avps: malformed or non AVP $acc_extra(subscriber_id) AVP definition". Thereafter I tried to fill the $acc_extra with $avp values ($acc_extra(subscriber_id) = $avp(subscriber_id) before and after do_routing. This resulted in an critical error: "CRITICAL:core:pv_value_destroy: #012>>> pkg_free() on non-pkg ptr 0x807491 - aborting!#012#012It seems you have hit a programming bug.#012" Then I wondered were to fill the $acc_extra(channel) variable, after do_routing? OK, I have to read some more documentation and do more testing, but my first impression is 'just keep it like it was, or at least also permit $avp's in the extra fields'. |
Hi Edwin,
First, can you send me a script snapshot (off list) that produces the CRITICAL message ? (and the "opensips -V") Now, how you should do it is: # put the $acc_extra(channel) content in "col_channel" DB column modparam("acc", "extra_fields", "db: channel->col_channel") if ( do_routing() ) { # populate the ACC variable with the DR output $acc_extra(channel) = $avp(channel); ...... } Have you read http://www.opensips.org/Documentation/Tutorials-Advanced-Accounting ? The old ACC approach (in using AVP) suffered from several problems due the nature of the AVPs (like multi-values, but cannot use NULL). Also, for many script writer was not clear when the actual value (from the AVP) is read by the ACC module (when the value is actually evaluated). So, we decided for a more rigorous and straight approach in terms of setting the ACC data. Nevertheless, feedback is welcome ;) Best regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com OpenSIPS Bootcamp 2017, Houston, US http://opensips.org/training/OpenSIPS_Bootcamp_2017.html On 06/06/2017 09:04 PM, Edwin wrote:
Hi Bogdan, I use $avp's in i.a. 'avp_db_query' and 'store_dlg_value', and created extra fields for channel, a_number, b_number, subscriber_id. The channel is defined in drouting (modparam("drouting", "gw_id_avp", '$avp(channel)')). First I tried to swap all the $avp for $acc_extra, but 'auth_db' didn't appreciate this : "auth_db:parse_aaa_avps: malformed or non AVP $acc_extra(subscriber_id) AVP definition". Thereafter I tried to fill the $acc_extra with $avp values ($acc_extra(subscriber_id) = $avp(subscriber_id) before and after do_routing. This resulted in an critical error: "CRITICAL:core:pv_value_destroy: #012>>> pkg_free() on non-pkg ptr 0x807491 - aborting!#012#012It seems you have hit a programming bug.#012" Then I wondered were to fill the $acc_extra(channel) variable, after do_routing? OK, I have to read some more documentation and do more testing, but my first impression is 'just keep it like it was, or at least also permit $avp's in the extra fields'. -- View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/acc-extra-fields-tp7607614p7607626.html Sent from the OpenSIPS - Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users _______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users |
I will do that. Besides, I think the problem was already described and resolved in bug 1123
https://github.com/OpenSIPS/opensips/issues/1123 |
Have you tried to update your 2.3 version and give it a try again ?
Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com OpenSIPS Bootcamp 2017, Houston, US http://opensips.org/training/OpenSIPS_Bootcamp_2017.html On 06/07/2017 03:47 PM, Edwin wrote: > I will do that. Besides, I think the problem was already described and > resolved in bug 1123 > > https://github.com/OpenSIPS/opensips/issues/1123 > > > > -- > View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/acc-extra-fields-tp7607614p7607641.html > Sent from the OpenSIPS - Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > [hidden email] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users _______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users |
I did, but there is no update available yet. I install from repro: deb http://apt.opensips.org jessie 2.3-releases
opensips 2.3.0-1 opensips-b2bua-module:amd64 2.3.0-1 opensips-mysql-module:amd64 2.3.0-1 |
Try Jessie + 2.3(stable) + nightly build
Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com OpenSIPS Bootcamp 2017, Houston, US http://opensips.org/training/OpenSIPS_Bootcamp_2017.html On 06/07/2017 04:18 PM, Edwin wrote: > I did, but there is no update available yet. I install from repro: deb > http://apt.opensips.org jessie 2.3-releases > > opensips 2.3.0-1 > opensips-b2bua-module:amd64 2.3.0-1 > opensips-mysql-module:amd64 2.3.0-1 > > > > > -- > View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/acc-extra-fields-tp7607614p7607644.html > Sent from the OpenSIPS - Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > [hidden email] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users _______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users |
The 'nightly build' gives me http 500 errors, which I will look into later.
$acc_extra(subscriber_id) = $avp(caller_uuid) + 0; does work, so I can continue testing. deb http://apt.opensips.org jessie 2.3-nightly apt-cache policy opensips opensips: Installed: 2.3.0-1 Candidate: 2.3.0-1 Version table: *** 2.3.0-1 0 100 /var/lib/dpkg/status 2.3.0~20170607~5ecf882-1 0 500 http://apt.opensips.org/ jessie/2.3-nightly amd64 Packages |
Are you sure ? I have systems installed via the 2.3 and 2.2 nightly
builds and the repo works great. Could you check again ? Best regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com OpenSIPS Bootcamp 2017, Houston, US http://opensips.org/training/OpenSIPS_Bootcamp_2017.html On 06/08/2017 01:42 PM, Edwin wrote: > The 'nightly build' gives me http 500 errors, which I will look into later. > > $acc_extra(subscriber_id) = $avp(caller_uuid) + 0; does work, so I can > continue testing. > > > > deb http://apt.opensips.org jessie 2.3-nightly > > apt-cache policy opensips > opensips: > Installed: 2.3.0-1 > Candidate: 2.3.0-1 > Version table: > *** 2.3.0-1 0 > 100 /var/lib/dpkg/status > 2.3.0~20170607~5ecf882-1 0 > 500 http://apt.opensips.org/ jessie/2.3-nightly amd64 Packages > > > > -- > View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/acc-extra-fields-tp7607614p7607662.html > Sent from the OpenSIPS - Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > [hidden email] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users _______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users |
i have tini trouble with opensips 2.3.2 . In old version 2.2.2 i have a
config modparam("acc", "db_extra", "from_uri=$fU; to_uri=$tU; src_uri=$si") to save $fU ,$tU , $si variable to columns from_uri , to_uri , src_uri in table acc ( i create 3 fields) but i don't now how can i do that in opensips 2.3.2? i read a EXTRA_FIELD and it's my config: modparam("acc", "extra_fields", "db: $fU->from_uri; $tU-> to_uri; $si->src_uri ") but it's not work, and i want to khow why it's not work? Thanks -- Sent from: http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html _______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users |
modparam("acc", "db_extra", "from_uri; to_uri; src_uri")
then inside script when those variables are available you do : for example : $acc_extra(from_uri) = $rU; $acc_extra(src_ip) = $si; On Tue, Nov 28, 2017 at 7:41 PM, vudn5 <[hidden email]> wrote: > i have tini trouble with opensips 2.3.2 . In old version 2.2.2 i have a > config > > modparam("acc", "db_extra", "from_uri=$fU; to_uri=$tU; src_uri=$si") > > to save $fU ,$tU , $si variable to columns from_uri , to_uri , src_uri in > table acc ( i create 3 fields) > > > > but i don't now how can i do that in opensips 2.3.2? i read a EXTRA_FIELD > and it's my config: > > modparam("acc", "extra_fields", "db: $fU->from_uri; $tU-> to_uri; > $si->src_uri ") > > but it's not work, and i want to khow why it's not work? > Thanks > > > > -- > Sent from: http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html > > _______________________________________________ > Users mailing list > [hidden email] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users _______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users |
Free forum by Nabble | Edit this page |