Re: [SR-Users] Monitoring Dispatcher

2018-06-06 Thread Alex Balashov
It sounds like the dialog module might be your best bet. 

On June 6, 2018 10:40:38 PM EDT, Tim Bowyer  wrote:
>Hi All,
>
>Currently trying to work out the best way to keep track of how many
>calls are being sent to any given dispatcher destination.
>I remember being able to do this years ago with the load balancer
>module in OpenSIPS: opensipsctl fifo lb_list.
>
>Dispatching algorithm '10' seems to be the best fit for my
>requirements, as I'm essentially wanting to send calls to a large
>quantity of FreeSwitch docker containers acting as fax receiving nodes.
>Equal weight, just filling them in some balanced fashion.
>
>Any hints or ideas would be much appreciated!
>
>Kind regards,
>
>Tim Bowyer


-- Alex

--
Sent via mobile, please forgive typos and brevity. 

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] hot switch debug mode

2018-06-06 Thread E. Schmidbauer
this seems to work for me:

*# info level*

kamcmd cfg.seti core debug 2


# logging off

kamcmd cfg.seti core debug 0


On Mon, Jun 4, 2018 at 4:49 PM, Sergey Safarov  wrote:

> Thank you Henning
> That's i looking for!
>
> Sergey
>
> пн, 4 июн. 2018 г. в 22:04, Henning Westerholt :
>
>> Am Montag, 4. Juni 2018, 15:26:39 CEST schrieb Sergey Safarov:
>>
>> > I experienced issue with kamailio after some time of uptime.
>>
>> > Could you suggest way to enable debug output (equivalent of -ddd options
>>
>> > for kamailio executable) for running daemon?
>>
>> >
>>
>> > May be using kamcmd?
>>
>>
>>
>> Hello Sergey,
>>
>>
>>
>> try this (should be the same values as in cfg):
>>
>>
>>
>> kamcmd> corex.debug 3
>>
>> {
>>
>> old: -1
>>
>> new: 3
>>
>> }
>>
>> kamcmd>
>>
>>
>>
>> Best regards,
>>
>>
>>
>> Henning
>>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] RFC: dispatcher refactoring to use xavp and options for attributes

2018-06-06 Thread Daniel-Constantin Mierla
Hello,


something like that, maybe the parameter value will be only the name of
the xavp, similar to xavp_cfg for registrar.


For attrs and extra columns, I was thinking of concatenating all of them
in 'attrs' field and have also separate those with a specific meaning
(like socket, weight, ...) -- this is more or less what is now with
avps, one having all in avp_attrs param and then some with dedicated avps.


Having all of them in a single string is useful when one wants to add
them to headers, etc. Parsing can be done with {param} transformation.
However, having them on a dedicated xavp sub-field, can be added in the
future.


Cheers,
Daniel

On 06.06.18 11:40, Luis Azedo wrote:
>
> Hi Daniel,
>
>
> love the idea!
>
>
> just to be sure i understand...,
>
>
> current params declaration
> modparam("dispatcher", "dst_avp", "$avp(ds_dst)")
> modparam("dispatcher", "attrs_avp", "$avp(ds_attrs)")
>
> new params declaration
> modparam("dispatcher", "dst_xavp", "$xavp(ds_dst)")
> ##modparam("dispatcher", "attrs_avp", "$avp(ds_attrs)")
>
> instead of using $avp(ds_dst) to get the uri we would
> use  $xavp(ds_dst=>uri) ?
> instead of parsing the $avp(ds_attrs) to get the required param we
> would use $xavp(ds_dst=>my_extra_column) ?
>
> Best
>
>
>
> 
> *From:* sr-users  on behalf of
> Daniel-Constantin Mierla 
> *Sent:* Wednesday, June 6, 2018 7:53:24 AM
> *To:* Kamailio (SER) - Devel Mailing List; Kamailio (SER) - Users
> Mailing List
> *Subject:* [SR-Users] RFC: dispatcher refactoring to use xavp and
> options for attributes
>  
> Hello,
>
> I am starting a discussion here about my plans to do a bit of
> refactoring to dispatcher module and gather some feedback if people
> think of other improvements.
>
> 1) First is about moving from using avps to xavps. It should simplify at
> least the config in terms of modparams, but also makes it more coherent
> in storing the details of destination record for serial forking.
>
> Practically, from a bunch of avp parameters, there will be one to set
> the root xavp name, and the old "avps" will be fields inside the xavp.
>
> 2) The second is about the attributes field. I am considering to add the
> option to load additional attributes from dedicated columns when using
> database. So besides the attrs column, one can specify via a mod param
> additional columns to be loaded and added to attributes, like:
>
> modparam("dispatcher", "xattrs", "weight,socket,maxload")
>
> The attributes string will be the value of "attrs" column concatenated
> with "weight=val1;socket=val2;maxload=val3" (the valX being the
> corresponding values in those columns).
>
> This should make easier the management of the database records. For the
> option with a text file, no changes will be done.
>
> 3) Anything else that one thinks would be good to add to dispatcher?
>
> Cheers,
> Daniel
>
> PS. I wrote to both sr-dev and sr-users, to get the attention of the two
> communities. However, you can reply only to sr-users (larger community)
> if you are not on sr-dev, because this discussion is about features of
> the module, not technical aspects of coding.
>
> -- 
> Daniel-Constantin Mierla -- www.asipto.com 
> www.twitter.com/miconda  --
> www.linkedin.com/in/miconda 
> Kamailio World Conference -- www.kamailioworld.com
> 
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> 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 World Conference -- www.kamailioworld.com

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] (N)DB_FIREBASE module?

2018-06-06 Thread Alex Balashov
Firebase is way too out there in Google + OAuth + HTTP land. That sort
of interface really should be done through a general-purpose programming
runtime with an HTTP connector.

On Wed, Jun 06, 2018 at 12:17:21PM +0200, Daniel-Constantin Mierla wrote:

> Hello,
> 
> no plans in my side for such module(s), maybe other developers can say
> if they have plans to work on such one. If you consider writing it
> yourself, of course, the contribution is welcome.
> 
> Otherwise, besides HTTP+JSON, one can use some embedded scripting
> language (e.g., lua, python, ruby, ...) to interact with firebase.
> 
> Cheers,
> Daniel
> 
> On 06.06.18 12:02, Pan Christensen wrote:
> >
> > Greetings all.
> >
> >  
> >
> >  
> >
> > We are currently developing web and mobile apps using firebase:
> > https://firebase.google.com/products/realtime-database/ . We have been
> > discussing the possibility of Kamailio querying this database.
> >
> >  
> >
> > I assume that it will be possible to query it using HTTP and JSON
> > modules, but it would probably be easier to use the DB API.
> >
> >  
> >
> > Any plans to develop such a module?
> >
> >  
> >
> >  
> >
> > With kind regards
> > *Pan B. Christensen*
> > Developer
> >
> > Phonect AS 
> > Brugata 19, PB 9156 Grønland, N-0133 Oslo, Norway
> > E-mail: pan.christen...@phonect.no 
> > Mobile: 41 88 88 00
> >
> >
> >  cid:image007.png@01D3A0E8.376921D0 
> >
> > facebook_2  LinkedIn_logo_initials
> > (1)
> > 
> >    
> >
> >  
> >
> 
> -- 
> Daniel-Constantin Mierla -- www.asipto.com
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio World Conference -- www.kamailioworld.com
> 

> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] JSON RPC Error: LUMP_RPL_BODY already added!

2018-06-06 Thread Asgaroth

Updating the event route to:

event_route[xhttp:request] {
    $var(xhttp_uri) = $(hu{s.tolower});

    xlog("L_INFO", "event_route[xhttp:request] : hu = '$hu' 
var(xhttp_uri) = '$var(xhttp_uri)'");


    if ( $var(xhttp_uri) =~ "^/rpc") {
    jsonrpc_dispatch();
    } else if ( $var(xhttp_uri) =~ "^/http_rpc") {
    dispatch_xhttp_rpc();
    } else {
    xhttp_reply("200", "OK", "text/html", "Wrong URL 
$hu");

    }
    return;
}

Fixed the issue, sorry for the noise :)

On 06/06/18 15:47, Asgaroth wrote:

Hi,

I performed the following:

# kamcmd dbg.trace on
# curl --header 'Content-Type: application/json' \
--data-binary '{\
"jsonrpc": "2.0", \
"method": "ul.lookup", \
"params": [ "location","u...@example.com"], \
"id": 3 }' http://registrar.example.com/rpc
# kamcmd dbg.trace off

And the following was presented in the log file

[5843]: ERROR: *** cfgtrace:request_route=[xhttp:request] 
c=[/etc/kamailio/routing_logic.cfg] l=301 a=63 n=assign
[5843]: ERROR: *** cfgtrace:request_route=[xhttp:request] 
c=[/etc/kamailio/routing_logic.cfg] l=305 a=16 n=if
[5843]: ERROR: *** cfgtrace:request_route=[xhttp:request] 
c=[/etc/kamailio/routing_logic.cfg] l=303 a=24 n=jsonrpc_dispatch
[5843]: ERROR: *** cfgtrace:request_route=[xhttp:request] 
c=[/etc/kamailio/routing_logic.cfg] l=305 a=63 n=assign
[5843]: ERROR: *** cfgtrace:request_route=[xhttp:request] 
c=[/etc/kamailio/routing_logic.cfg] l=313 a=16 n=if
[5843]: ERROR: *** cfgtrace:request_route=[xhttp:request] 
c=[/etc/kamailio/routing_logic.cfg] l=314 a=28 n=xhttp_reply
[5843]: ERROR:  [core/data_lump_rpl.c:83]: add_lump_rpl2(): 
LUMP_RPL_BODY already added!
[5843]: ERROR: xhttp [xhttp_mod.c:410]: xhttp_send_reply(): Error 
while adding reply lump


The relevent request route is as follows:

# Handling HTTP events
event_route[xhttp:request] {
    $var(xhttp_rpc_root) = $(hu{s.substr,0,4});
    if ($var(xhttp_rpc_root) == "/rpc") {
    jsonrpc_dispatch();
    }
    $var(xhttp_rpc_root) = $(hu{s.substr,0,9});
    if ($var(xhttp_rpc_root) == "/http_rpc") {
    dispatch_xhttp_rpc();
    }
    #$var(xhttp_rpc_root) = $(hu{s.substr,0,8});
    #if ($var(xhttp_rpc_root) == "/http_pi") {
    #    dispatch_xhttp_pi();
    #}
    xhttp_reply("200", "OK", "text/html",
    "Wrong URL $hu");
}

Just looking at the above event route, do I need to "exit" the if 
statements above, would the last xhttp_reply be causing this error?


Thanks


On 18/05/18 13:52, Daniel-Constantin Mierla wrote:

this sounds like the body for reply was already set. Can you enable
cfgtrace in debugger module and see what actions are executed in that
situation?




___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] JSON RPC Error: LUMP_RPL_BODY already added!

2018-06-06 Thread Asgaroth

Hi,

I performed the following:

# kamcmd dbg.trace on
# curl --header 'Content-Type: application/json' \
--data-binary '{\
"jsonrpc": "2.0", \
"method": "ul.lookup", \
"params": [ "location","u...@example.com"], \
"id": 3 }' http://registrar.example.com/rpc
# kamcmd dbg.trace off

And the following was presented in the log file

[5843]: ERROR: *** cfgtrace:request_route=[xhttp:request] 
c=[/etc/kamailio/routing_logic.cfg] l=301 a=63 n=assign
[5843]: ERROR: *** cfgtrace:request_route=[xhttp:request] 
c=[/etc/kamailio/routing_logic.cfg] l=305 a=16 n=if
[5843]: ERROR: *** cfgtrace:request_route=[xhttp:request] 
c=[/etc/kamailio/routing_logic.cfg] l=303 a=24 n=jsonrpc_dispatch
[5843]: ERROR: *** cfgtrace:request_route=[xhttp:request] 
c=[/etc/kamailio/routing_logic.cfg] l=305 a=63 n=assign
[5843]: ERROR: *** cfgtrace:request_route=[xhttp:request] 
c=[/etc/kamailio/routing_logic.cfg] l=313 a=16 n=if
[5843]: ERROR: *** cfgtrace:request_route=[xhttp:request] 
c=[/etc/kamailio/routing_logic.cfg] l=314 a=28 n=xhttp_reply
[5843]: ERROR:  [core/data_lump_rpl.c:83]: add_lump_rpl2(): 
LUMP_RPL_BODY already added!
[5843]: ERROR: xhttp [xhttp_mod.c:410]: xhttp_send_reply(): Error while 
adding reply lump


The relevent request route is as follows:

# Handling HTTP events
event_route[xhttp:request] {
    $var(xhttp_rpc_root) = $(hu{s.substr,0,4});
    if ($var(xhttp_rpc_root) == "/rpc") {
    jsonrpc_dispatch();
    }
    $var(xhttp_rpc_root) = $(hu{s.substr,0,9});
    if ($var(xhttp_rpc_root) == "/http_rpc") {
    dispatch_xhttp_rpc();
    }
    #$var(xhttp_rpc_root) = $(hu{s.substr,0,8});
    #if ($var(xhttp_rpc_root) == "/http_pi") {
    #    dispatch_xhttp_pi();
    #}
    xhttp_reply("200", "OK", "text/html",
    "Wrong URL $hu");
}

Just looking at the above event route, do I need to "exit" the if 
statements above, would the last xhttp_reply be causing this error?


Thanks


On 18/05/18 13:52, Daniel-Constantin Mierla wrote:

this sounds like the body for reply was already set. Can you enable
cfgtrace in debugger module and see what actions are executed in that
situation?


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Install IMS Modules over KAMAILIO 5.1

2018-06-06 Thread John M
First compile Kamailio 5.1 binaries and start the services with Kamailio
4.x IMS configuration files. You need to remove few of the deprecated
modules. Then compare the working configuration with 5.X IMS cfg files.

You can use OpenIMS HSS application. Configuration is straight forward.

Calls can be tested using Boghe IMS client.


Regards,
Uts

Hello,

not much into IMS myself, and I see you somehow sorted out the Kamailio
part, but in case it helps, you can find sample configuration files in
the source code tree at misc/examples/ims/

As for FHOSS, I am not sure if that project is active/maintained. Maybe
other guys here using IMS extensions can comment more.

Cheers,
Daniel


On 05.04.18 17:37, Roi Arias Salve wrote:
>>* Hi all.
*>>  >>* I would like to thank you all the documents you have to install a
*>* Kamailio server. It’s quite easy and fast.
*>>  >>* Currently I’m working on Azure, witha  Debian 9 OS, and I’d followed
*>* the instructions to install the Kamailio OPENSER, and everything Works
*>* perfect.
*>>  >>* But now I’m stuck on my next step. I would like to install all the IMS
*>* components, P-cscf/I-cscf/S-cscf/Fhoss following this document
*>* https://www.kamailio.org/wiki/tutorials/ims/installation-howto

*>>  >>* But, I have no success. Maybe I’ve a mistake on the selection for the
*>* Debian OS installed on the server. I say this because of this sentence:
*>>* “ *Note: This document is work in progress and yet unfinished!*
*>>* This is a short installation howto for Debian Wheezy (stable).
*>>* “
*>>  >>* So, I asume that maybe here I have a problem with the OS version, I’ll
*>* try to summarize where I have problems:
*>>  >>* 1.- I’ve installed the , P-cscf/I-cscf/S-cscf not a problem.
*>>  >>* 2.- I am not able to follow this steps related to the repository:
*>>  >>* First, install the Key for our repository:
*>>* wget -O - http://repository.ng-voice.com/PublicKey
 | apt-key add -
*>>* Then add the repository to your “/etc/apt/sources.list”:
*>>* echo "deb http://repository.ng-voice.com
 jessie ims rtpproxy" >>
*>* /etc/apt/sources.list
*>>  >>* and also I have problems with this action over the repository
*>>  >>* Note: You will need to add the “non-free” packages to your repository:
*>>* deb http://ftp.de.debian.org/debian
 lenny main non-free
*>* deb http://security.debian.org/ 
lenny/updates main non-free
*>>  >>  >>  >>*   3.- I decided to install directly the modules from an apt-get
*>* install action, because I followed the instructions on the Log created
*>* on the Kamailio starting box, where you can find all the steps related
*>* to IMS modules, and the suggestion there it is to compile your own
*>* modules. On this step I detected a problem related with the dialog_ng
*>* module, according to the .log document on the Starting box, you have
*>* to include all the modules before you execute the make all instruction:
*>>  >>* modify modules.lst for included modules and excluded modules (use
*>* saved file)
*>>* - include: ims_auth ims_charging ims_icscf ims_isc
*>* ims_qos ims_registrar_pcscf ims_registrar_scscf ims_usrloc_pcscf
*>* ims_usrloc_scscf dialog_ng cdp cdp_avp
*>>  >>* 4.- After this issue, I tried to install FHOSS, but here I can’t go
*>* further, I am not able to compile it, neither doing my own compilation
*>* following this step
*>>  >>*   ant compile deploy | tee ant_compile_deploy.txt
*>>  >>* nor following
*>>  >>* apt-get install openimscore-fhoss
*>>  >>* I was no table to get connected to the repository, so I can’t
go further.
*>>  >>* I’m sorry for all this information, can anyone help? Any suggestion?
*>>  >>* Regards
*>>* Roi
*>>  >>>* 
>
*>* Libre de virus. www.avast.com 
*>* 
>
*>* ___
*>* Kamailio (SER) - Users Mailing List
*>* sr-users at lists.kamailio.org

*>* https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

*
-- 
Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - April 16-18, 2018, Berlin - www.asipto.com
Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com

-- next part --
An HTML attachment was scrubbed...
URL: 

[SR-Users] (N)DB_FIREBASE module?

2018-06-06 Thread Pan Christensen
Greetings all.





We are currently developing web and mobile apps using firebase: 
https://firebase.google.com/products/realtime-database/ . We have been 
discussing the possibility of Kamailio querying this database.



I assume that it will be possible to query it using HTTP and JSON modules, but 
it would probably be easier to use the DB API.



Any plans to develop such a module?




With kind regards
Pan B. Christensen
Developer

Phonect AS
Brugata 19, PB 9156 Grønland, N-0133 Oslo, Norway
E-mail: pan.christen...@phonect.no
Mobile: 41 88 88 00


 [cid:image007.png@01D3A0E8.376921D0] 
[facebook_2] [LinkedIn_logo_initials (1)] 



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] ASN.1 HI2- IRI-Parameters

2018-06-06 Thread Mojtaba
Hi Daniel
Finally i could implement 3GPP TS 101-671 (HI2Operations) in C
programming with asn1c.
I could use it with Kamailio like Homer.
Daniel is it could be a new module in Kamailio? How can i implement it
as a new module in Kamailio? I want to do it.
Thanks.
Mojtaba

On Mon, Apr 30, 2018 at 2:00 PM, Mojtaba  wrote:
> Any idea in this regards?
> I understood it's structure of HI2Operations as ASN.1 IRI-HI2, I attached it.
> I think i should convert SIP signalling flow to this structure for 
> transmission.
> Is it right way that i am doing?
> With Regards.Mojtaba
>
> On Thu, Apr 26, 2018 at 12:50 PM, Mojtaba  wrote:
>> Hello,
>> The declaration of details are in 3GPP TS 101-671 Annex D.5 (ASN.1
>> description of IRI (HI2 interface)).
>> I need a sample packet of HI2Operations for underestanding, so that
>> i'll develop this HI in kamailio.
>> With Regards.Mojtaba
>>
>>
>> On Thu, Apr 26, 2018 at 11:20 AM, Daniel-Constantin Mierla
>>  wrote:
>>> Hello,
>>>
>>> can you provide more details or references (web links) about the operations
>>> you want to do? Like what sip message comes to kamailio and what you need to
>>> change to it.
>>>
>>> Cheers,
>>> Daniel
>>>
>>>
>>> On 25.04.18 06:00, Mojtaba wrote:
>>>
>>> Hello.
>>> I need to use HI2Operations for transfering IRI-Parameters in kamailio.Dose
>>> anybody have experience in this regards?
>>> Thanks.
>>> Mojtaba
>>>
>>>
>>> ___
>>> Kamailio (SER) - Users Mailing List
>>> sr-users@lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>>
>>> --
>>> Daniel-Constantin Mierla
>>> www.twitter.com/miconda -- www.linkedin.com/in/miconda
>>> Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com
>>
>>
>>
>> --
>> --Mojtaba Esfandiari.S
>
>
>
> --
> --Mojtaba Esfandiari.S



-- 
--Mojtaba Esfandiari.S

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] RFC: dispatcher refactoring to use xavp and options for attributes

2018-06-06 Thread Luis Azedo
Hi Daniel,


love the idea!


just to be sure i understand...,

current params declaration
modparam("dispatcher", "dst_avp", "$avp(ds_dst)")
modparam("dispatcher", "attrs_avp", "$avp(ds_attrs)")

new params declaration
modparam("dispatcher", "dst_xavp", "$xavp(ds_dst)")
##modparam("dispatcher", "attrs_avp", "$avp(ds_attrs)")

instead of using $avp(ds_dst) to get the uri we would use  $xavp(ds_dst=>uri) ?
instead of parsing the $avp(ds_attrs) to get the required param we would use 
$xavp(ds_dst=>my_extra_column) ?

Best





From: sr-users  on behalf of 
Daniel-Constantin Mierla 
Sent: Wednesday, June 6, 2018 7:53:24 AM
To: Kamailio (SER) - Devel Mailing List; Kamailio (SER) - Users Mailing List
Subject: [SR-Users] RFC: dispatcher refactoring to use xavp and options for 
attributes

Hello,

I am starting a discussion here about my plans to do a bit of
refactoring to dispatcher module and gather some feedback if people
think of other improvements.

1) First is about moving from using avps to xavps. It should simplify at
least the config in terms of modparams, but also makes it more coherent
in storing the details of destination record for serial forking.

Practically, from a bunch of avp parameters, there will be one to set
the root xavp name, and the old "avps" will be fields inside the xavp.

2) The second is about the attributes field. I am considering to add the
option to load additional attributes from dedicated columns when using
database. So besides the attrs column, one can specify via a mod param
additional columns to be loaded and added to attributes, like:

modparam("dispatcher", "xattrs", "weight,socket,maxload")

The attributes string will be the value of "attrs" column concatenated
with "weight=val1;socket=val2;maxload=val3" (the valX being the
corresponding values in those columns).

This should make easier the management of the database records. For the
option with a text file, no changes will be done.

3) Anything else that one thinks would be good to add to dispatcher?

Cheers,
Daniel

PS. I wrote to both sr-dev and sr-users, to get the attention of the two
communities. However, you can reply only to sr-users (larger community)
if you are not on sr-dev, because this discussion is about features of
the module, not technical aspects of coding.

--
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- 
www.linkedin.com/in/miconda
Kamailio World Conference -- www.kamailioworld.com


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] TOPOS module errors

2018-06-06 Thread Aleksandar Sosic
Ok Daniel,

thank you very much!
--
Aleksandar Sosic
linkedin.com/in/alexsosic/
mail: alex.sosic@evosip.cloud

On Wed, Jun 6, 2018 at 8:23 AM Daniel-Constantin Mierla
 wrote:
>
> Hello,
>
> it was a mistake in matching KDMQ, I just pushed a fix for it in master
> branch.
>
> Cheers,
> Daniel
>
>
> On 05.06.18 19:29, Aleksandar Sosic wrote:
> > Hi Daniel,
> >
> > here you go:
> >
> >  0(578) DEBUG:  [core/parser/msg_parser.c:152]: get_hdr_field():
> > cseq : <10> 
> >  0(578) DEBUG:  [core/parser/msg_parser.c:183]: get_hdr_field():
> > content_length=73
> > 22(600) DEBUG: db_mysql [km_my_con.c:136]: db_mysql_new_connection():
> > connection type is router-msgdb-service via TCP/IP
> > 22(600) DEBUG: db_mysql [km_my_con.c:137]: db_mysql_new_connection():
> > protocol version is 10
> > 22(600) DEBUG: db_mysql [km_my_con.c:138]: db_mysql_new_connection():
> > server version is 5.7.18
> >  0(578) DEBUG:  [core/parser/msg_parser.c:89]: get_hdr_field():
> > found end of header
> > 24(602) DEBUG:  [db_res.c:119]: db_new_result(): allocate 56
> > bytes for result set at 0x7f02cf32a830
> > 24(602) DEBUG: db_mysql [km_res.c:66]: db_mysql_get_columns(): 1
> > columns returned from the query
> > 24(602) DEBUG:  [db_res.c:156]: db_allocate_columns(): allocate
> > 8 bytes for result names at 0x7f02cf32a948
> > 24(602) DEBUG:  [db_res.c:167]: db_allocate_columns(): allocate
> > 4 bytes for result types at 0x7f02cf32a9b8
> > 24(602) DEBUG: db_mysql [km_res.c:83]: db_mysql_get_columns():
> > allocate 16 bytes for RES_NAMES[0] at 0x7f02cf32aa28
> > 24(602) DEBUG: db_mysql [km_res.c:90]: db_mysql_get_columns():
> > RES_NAMES(0x7f02cf32aa28)[0]=[table_version]
> > 24(602) DEBUG: db_mysql [km_res.c:99]: db_mysql_get_columns(): use
> > DB1_INT result type
> > 24(602) DEBUG:  [db_res.c:188]: db_allocate_rows(): allocate 16
> > bytes for rows at 0x7f02cf341cf0
> > 24(602) DEBUG:  [db_row.c:117]: db_allocate_row(): allocate 32
> > bytes for row values at 0x7f02cf341d68
> > 24(602) DEBUG:  [db_val.c:74]: db_str2val(): converting INT [6]
> > 24(602) DEBUG:  [db_res.c:79]: db_free_columns(): freeing 1 columns
> > 24(602) DEBUG:  [db_res.c:83]: db_free_columns(): freeing
> > RES_NAMES[0] at 0x7f02cf32aa28
> > 24(602) DEBUG:  [db_res.c:96]: db_free_columns(): freeing result
> > names at 0x7f02cf32a948
> > 24(602) DEBUG:  [db_res.c:101]: db_free_columns(): freeing
> > result types at 0x7f02cf32a9b8
> > 24(602) DEBUG:  [db_res.c:52]: db_free_rows(): freeing 1 rows
> > 24(602) DEBUG:  [db_row.c:95]: db_free_row(): freeing row values
> > at 0x7f02cf341d68
> > 24(602) DEBUG:  [db_res.c:60]: db_free_rows(): freeing rows at
> > 0x7f02cf341cf0
> > 24(602) DEBUG:  [db_res.c:138]: db_free_result(): freeing result
> > set at 0x7f02cf32a830
> > 24(602) DEBUG:  [core/sr_module.c:941]: init_mod_child(): idx 24
> > rank 24: app_python [udp receiver child=7 sock=127.0.0.1:5060]
> >  0(578) DEBUG:  [core/parser/parse_addr_spec.c:185]:
> > parse_to_param(): add param: tag=cc74da418311da4b8fe0787ffe42ae95-7b67
> >  0(578) DEBUG:  [core/parser/parse_addr_spec.c:864]:
> > parse_addr_spec(): end of header reached, state=29
> >  0(578) DEBUG: topos [tps_msg.c:934]: tps_request_sent(): handling
> > outgoing request (0, 1)
> >  0(578) DEBUG: topos [tps_msg.c:376]: tps_pack_message(): compacted
> > headers - x_via1: [SIP/2.0/UDP
> > 172.22.5.98;branch=z9hG4bKb5bc.cc5f1947.0](77)
> > - x_via2: [](0) - x_vbranch1:
> > [z9hG4bKb5bc.cc5f1947.0](46)
> >  0(578) DEBUG: topos [tps_msg.c:485]: tps_pack_message(): compacted
> > headers - a_rr: [](0) - b_rr: [](0) - s_rr: [](0)
> >  0(578) DEBUG: topos [tps_msg.c:490]: tps_pack_message(): compacted
> > headers - as_contact: [](0) - bs_contact: [](0)
> >  0(578) DEBUG: topos [tps_storage.c:124]: tps_storage_lock_get(): tps
> > lock get: 61
> >  0(578) DEBUG:  [sruid.c:182]: sruid_next(): new sruid is
> > [tpsh-5b16c7df-242-1] (1 / 19)
> >  0(578) WARNING: topos [tps_storage.c:400]: tps_storage_record(): no
> > local address - do record routing for all initial requests BUSDELCUL
> >  0(578) ERROR: topos [tps_storage.c:480]: tps_db_insert_dialog(): No
> > database handle - misconfiguration?
> > 24(602) DEBUG:  [core/sr_module.c:941]: init_mod_child(): idx 24
> > rank 24: topos [udp receiver child=7 sock=127.0.0.1:5060]
> >  0(578) ERROR: topos [tps_storage.c:412]: tps_storage_record(): failed to 
> > store
> >  0(578) DEBUG: topos [tps_storage.c:136]: tps_storage_lock_release():
> > tps lock release: 61
> > 24(602) DEBUG:  [sruid.c:105]: sruid_init(): root for sruid is
> > [tpsh-5b16c7df-25a-] (0 / 18)
> > 24(602) DEBUG:  [db.c:314]: db_do_init2(): connection
> > 0x7f02cf341df0 not found in pool
> > 24(602) DEBUG: db_mysql [km_my_con.c:97]: db_mysql_new_connection():
> > opening connection: mysql://:@router-msgdb-service/kamailio
> >  0(578) DEBUG: tm [uac.c:645]: send_prepared_request_impl(): uac:
> > 0x7f02a99815a8  branch: 0  to 172.22.5.101:5060
> >  0(578) DEBUG: 

[SR-Users] RFC: dispatcher refactoring to use xavp and options for attributes

2018-06-06 Thread Daniel-Constantin Mierla
Hello,

I am starting a discussion here about my plans to do a bit of
refactoring to dispatcher module and gather some feedback if people
think of other improvements.

1) First is about moving from using avps to xavps. It should simplify at
least the config in terms of modparams, but also makes it more coherent
in storing the details of destination record for serial forking.

Practically, from a bunch of avp parameters, there will be one to set
the root xavp name, and the old "avps" will be fields inside the xavp.

2) The second is about the attributes field. I am considering to add the
option to load additional attributes from dedicated columns when using
database. So besides the attrs column, one can specify via a mod param
additional columns to be loaded and added to attributes, like:

modparam("dispatcher", "xattrs", "weight,socket,maxload")

The attributes string will be the value of "attrs" column concatenated
with "weight=val1;socket=val2;maxload=val3" (the valX being the
corresponding values in those columns).

This should make easier the management of the database records. For the
option with a text file, no changes will be done.

3) Anything else that one thinks would be good to add to dispatcher?

Cheers,
Daniel

PS. I wrote to both sr-dev and sr-users, to get the attention of the two
communities. However, you can reply only to sr-users (larger community)
if you are not on sr-dev, because this discussion is about features of
the module, not technical aspects of coding.

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference -- www.kamailioworld.com


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] TOPOS module errors

2018-06-06 Thread Daniel-Constantin Mierla
Hello,

it was a mistake in matching KDMQ, I just pushed a fix for it in master
branch.

Cheers,
Daniel


On 05.06.18 19:29, Aleksandar Sosic wrote:
> Hi Daniel,
>
> here you go:
>
>  0(578) DEBUG:  [core/parser/msg_parser.c:152]: get_hdr_field():
> cseq : <10> 
>  0(578) DEBUG:  [core/parser/msg_parser.c:183]: get_hdr_field():
> content_length=73
> 22(600) DEBUG: db_mysql [km_my_con.c:136]: db_mysql_new_connection():
> connection type is router-msgdb-service via TCP/IP
> 22(600) DEBUG: db_mysql [km_my_con.c:137]: db_mysql_new_connection():
> protocol version is 10
> 22(600) DEBUG: db_mysql [km_my_con.c:138]: db_mysql_new_connection():
> server version is 5.7.18
>  0(578) DEBUG:  [core/parser/msg_parser.c:89]: get_hdr_field():
> found end of header
> 24(602) DEBUG:  [db_res.c:119]: db_new_result(): allocate 56
> bytes for result set at 0x7f02cf32a830
> 24(602) DEBUG: db_mysql [km_res.c:66]: db_mysql_get_columns(): 1
> columns returned from the query
> 24(602) DEBUG:  [db_res.c:156]: db_allocate_columns(): allocate
> 8 bytes for result names at 0x7f02cf32a948
> 24(602) DEBUG:  [db_res.c:167]: db_allocate_columns(): allocate
> 4 bytes for result types at 0x7f02cf32a9b8
> 24(602) DEBUG: db_mysql [km_res.c:83]: db_mysql_get_columns():
> allocate 16 bytes for RES_NAMES[0] at 0x7f02cf32aa28
> 24(602) DEBUG: db_mysql [km_res.c:90]: db_mysql_get_columns():
> RES_NAMES(0x7f02cf32aa28)[0]=[table_version]
> 24(602) DEBUG: db_mysql [km_res.c:99]: db_mysql_get_columns(): use
> DB1_INT result type
> 24(602) DEBUG:  [db_res.c:188]: db_allocate_rows(): allocate 16
> bytes for rows at 0x7f02cf341cf0
> 24(602) DEBUG:  [db_row.c:117]: db_allocate_row(): allocate 32
> bytes for row values at 0x7f02cf341d68
> 24(602) DEBUG:  [db_val.c:74]: db_str2val(): converting INT [6]
> 24(602) DEBUG:  [db_res.c:79]: db_free_columns(): freeing 1 columns
> 24(602) DEBUG:  [db_res.c:83]: db_free_columns(): freeing
> RES_NAMES[0] at 0x7f02cf32aa28
> 24(602) DEBUG:  [db_res.c:96]: db_free_columns(): freeing result
> names at 0x7f02cf32a948
> 24(602) DEBUG:  [db_res.c:101]: db_free_columns(): freeing
> result types at 0x7f02cf32a9b8
> 24(602) DEBUG:  [db_res.c:52]: db_free_rows(): freeing 1 rows
> 24(602) DEBUG:  [db_row.c:95]: db_free_row(): freeing row values
> at 0x7f02cf341d68
> 24(602) DEBUG:  [db_res.c:60]: db_free_rows(): freeing rows at
> 0x7f02cf341cf0
> 24(602) DEBUG:  [db_res.c:138]: db_free_result(): freeing result
> set at 0x7f02cf32a830
> 24(602) DEBUG:  [core/sr_module.c:941]: init_mod_child(): idx 24
> rank 24: app_python [udp receiver child=7 sock=127.0.0.1:5060]
>  0(578) DEBUG:  [core/parser/parse_addr_spec.c:185]:
> parse_to_param(): add param: tag=cc74da418311da4b8fe0787ffe42ae95-7b67
>  0(578) DEBUG:  [core/parser/parse_addr_spec.c:864]:
> parse_addr_spec(): end of header reached, state=29
>  0(578) DEBUG: topos [tps_msg.c:934]: tps_request_sent(): handling
> outgoing request (0, 1)
>  0(578) DEBUG: topos [tps_msg.c:376]: tps_pack_message(): compacted
> headers - x_via1: [SIP/2.0/UDP
> 172.22.5.98;branch=z9hG4bKb5bc.cc5f1947.0](77)
> - x_via2: [](0) - x_vbranch1:
> [z9hG4bKb5bc.cc5f1947.0](46)
>  0(578) DEBUG: topos [tps_msg.c:485]: tps_pack_message(): compacted
> headers - a_rr: [](0) - b_rr: [](0) - s_rr: [](0)
>  0(578) DEBUG: topos [tps_msg.c:490]: tps_pack_message(): compacted
> headers - as_contact: [](0) - bs_contact: [](0)
>  0(578) DEBUG: topos [tps_storage.c:124]: tps_storage_lock_get(): tps
> lock get: 61
>  0(578) DEBUG:  [sruid.c:182]: sruid_next(): new sruid is
> [tpsh-5b16c7df-242-1] (1 / 19)
>  0(578) WARNING: topos [tps_storage.c:400]: tps_storage_record(): no
> local address - do record routing for all initial requests BUSDELCUL
>  0(578) ERROR: topos [tps_storage.c:480]: tps_db_insert_dialog(): No
> database handle - misconfiguration?
> 24(602) DEBUG:  [core/sr_module.c:941]: init_mod_child(): idx 24
> rank 24: topos [udp receiver child=7 sock=127.0.0.1:5060]
>  0(578) ERROR: topos [tps_storage.c:412]: tps_storage_record(): failed to 
> store
>  0(578) DEBUG: topos [tps_storage.c:136]: tps_storage_lock_release():
> tps lock release: 61
> 24(602) DEBUG:  [sruid.c:105]: sruid_init(): root for sruid is
> [tpsh-5b16c7df-25a-] (0 / 18)
> 24(602) DEBUG:  [db.c:314]: db_do_init2(): connection
> 0x7f02cf341df0 not found in pool
> 24(602) DEBUG: db_mysql [km_my_con.c:97]: db_mysql_new_connection():
> opening connection: mysql://:@router-msgdb-service/kamailio
>  0(578) DEBUG: tm [uac.c:645]: send_prepared_request_impl(): uac:
> 0x7f02a99815a8  branch: 0  to 172.22.5.101:5060
>  0(578) DEBUG: tm [../../core/onsend.h:69]: run_onsend(): required
> parameters are not available - ignoring
> 27(605) DEBUG: db_mysql [km_my_con.c:136]: db_mysql_new_connection():
> connection type is router-msgdb-service via TCP/IP
>  0(578) DEBUG: dmq [dmq_funcs.c:165]: bcast_dmq_message(): skipping
> node sip:172.22.5.98:5060
>  0(578) DEBUG:  [core/sr_module.c:941]: