Hello,

jsonrpc-s module has a function to execute rpc commands from kamailio.cfg:

- http://www.kamailio.org/docs/modules/devel/modules/jsonrpc-s.html#jsonrpc-s.f.jsonrpc_exec

Then you can use jansson module to get the values from the json rpc result.

Cheers,
Daniel

On 18/02/16 09:35, alexandre.anconetti@orange.com wrote:

Hi,

I’m using the dispatcher module with Kamailio 4.3.4, the keep alive mechanism and the routing are OK, but I would like to get in my request_route the flag(s) (active, inactive, probing …) that the dispatcher give to each destination. I know that in command line I can run kamcmd or kamctl to get :

 

NRSETS: 1

        RECORDS: {

                SET: {

                        ID: 1

                        TARGETS: {

                                DEST: {

                                        URI: sip: xxx.xxx.xxx.xxx:xxxx

                                        FLAGS: IP

                                        PRIORITY: 0

                                }

                                DEST: {

                                        URI: sip:xxx.xxx.xxx.xxx:xxxx

                                        FLAGS: AP

                                        PRIORITY: 0

How can I get that in the request_route process ? Any suggestion would be appreciated ;)

Best Regards,

Alexandre.

 

_________________________________________________________________________________________________________________________

Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com
http://miconda.eu