Hi,
Is there any way to use the Mapping technique in kamailio.
For Example: ==========
Key = 91, Value = India Key = 92, Value = Srilanka
How to store Key Value Pairs into kamailio and how to Retrieve?
If I pass 91 it should Retrieve India, Is it possible?
Input Please
Thanks & Kind Regards, *Logeshwaran G*
*"Be Hungry, Stay Foolish"*
Hi,
On Mon, Sep 11, 2017 at 8:26 AM, Logeshwaran G logeshwarangs@gmail.com wrote:
Is there any way to use the Mapping technique in kamailio.
For Example:
Key = 91, Value = India Key = 92, Value = Srilanka
How to store Key Value Pairs into kamailio and how to Retrieve?
You can use a htable for that and read it from DB on startup (or trigger reload via RPC).
$sht(yourHtableName=>91) would give you India then.
HTH Sebastian
Hi,
As per your Input , I have my below htable Entries,
| id | key_name | key_type | value_type | key_value | expires | +----+----------+----------+------------+-----------+---------+ | 1 | 91 | 0 | 1 | India | 0 |
I have executed the below command :
[root@zeodialer kamailio]# $sht(htable=>91) -bash: syntax error near unexpected token `htable='
I am not Sure what I am missing? Guide me please
Thanks & Kind Regards, *Logeshwaran G*
*"Be Hungry, Stay Foolish"*
On Mon, Sep 11, 2017 at 12:10 PM, Sebastian Damm damm@sipgate.de wrote:
Hi,
On Mon, Sep 11, 2017 at 8:26 AM, Logeshwaran G logeshwarangs@gmail.com wrote:
Is there any way to use the Mapping technique in kamailio.
For Example:
Key = 91, Value = India Key = 92, Value = Srilanka
How to store Key Value Pairs into kamailio and how to Retrieve?
You can use a htable for that and read it from DB on startup (or trigger reload via RPC).
$sht(yourHtableName=>91) would give you India then.
HTH Sebastian
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Sorry :)
Yes I have loaded dmq.so as well,
#----- DMQ params ----- modparam("dmq", "server_address", "sip:209.95.52.97:15060") modparam("dmq", "notification_address", "sip:209.95.52.97:15060")
#----- htable params ----- modparam("htable", "db_url", DBURL)
While Passing RPC command I do get the below Error:
# kamcmd htable.listTables 6(13168) DEBUG: ctl [../../core/io_wait.h:380]: io_watch_add(): DBG: io_watch_add(0x7f266f4d23e0, 10, 3, 0x231ac60), fd_no=1 6(13168) DEBUG: ctl [io_listener.c:442]: handle_new_connect(): handle_stream read: new connection (1) on /var/run/kamailio//kamailio_ctl error: 500 - No htables 6(13168) DEBUG: ctl [io_listener.c:495]: handle_stream_read(): handle_stream read: eof on /var/run/kamailio//kamailio_ctl 6(13168) DEBUG: ctl [../../core/io_wait.h:602]: io_watch_del(): DBG: io_watch_del (0x7f266f4d23e0, 10, -1, 0x10) fd_no=2 called
# kamcmd htable.get key_name 91 6(13168) DEBUG: ctl [../../core/io_wait.h:380]: io_watch_add(): DBG: io_watch_add(0x7f266f4d23e0, 10, 3, 0x231ac60), fd_no=1 6(13168) DEBUG: ctl [io_listener.c:442]: handle_new_connect(): handle_stream read: new connection (1) on /var/run/kamailio//kamailio_ctl error: 500 - Not enough parameters (htable name and key name) 6(13168) DEBUG: ctl [io_listener.c:495]: handle_stream_read(): handle_stream read: eof on /var/run/kamailio//kamailio_ctl 6(13168) DEBUG: ctl [../../core/io_wait.h:602]: io_watch_del(): DBG: io_watch_del (0x7f266f4d23e0, 10, -1, 0x10) fd_no=2 called
#
Thanks & Kind Regards, *Logeshwaran G*
*"Be Hungry, Stay Foolish"*
On Mon, Sep 11, 2017 at 12:42 PM, Yu Boot yu@yu-boot.ru wrote:
You should use this in kamailio.cfg, not in bash :)
11.09.2017 10:09, Logeshwaran G пишет:
[root@zeodialer kamailio]# $sht(htable=>91)
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Input Please
Thanks & Kind Regards, *Logeshwaran G*
*"Be Hungry, Stay Foolish"*
On Mon, Sep 11, 2017 at 1:17 PM, Logeshwaran G logeshwarangs@gmail.com wrote:
Sorry :)
Yes I have loaded dmq.so as well,
#----- DMQ params ----- modparam("dmq", "server_address", "sip:209.95.52.97:15060") modparam("dmq", "notification_address", "sip:209.95.52.97:15060")
#----- htable params ----- modparam("htable", "db_url", DBURL)
While Passing RPC command I do get the below Error:
# kamcmd htable.listTables 6(13168) DEBUG: ctl [../../core/io_wait.h:380]: io_watch_add(): DBG: io_watch_add(0x7f266f4d23e0, 10, 3, 0x231ac60), fd_no=1 6(13168) DEBUG: ctl [io_listener.c:442]: handle_new_connect(): handle_stream read: new connection (1) on /var/run/kamailio//kamailio_ctl error: 500 - No htables 6(13168) DEBUG: ctl [io_listener.c:495]: handle_stream_read(): handle_stream read: eof on /var/run/kamailio//kamailio_ctl 6(13168) DEBUG: ctl [../../core/io_wait.h:602]: io_watch_del(): DBG: io_watch_del (0x7f266f4d23e0, 10, -1, 0x10) fd_no=2 called
# kamcmd htable.get key_name 91 6(13168) DEBUG: ctl [../../core/io_wait.h:380]: io_watch_add(): DBG: io_watch_add(0x7f266f4d23e0, 10, 3, 0x231ac60), fd_no=1 6(13168) DEBUG: ctl [io_listener.c:442]: handle_new_connect(): handle_stream read: new connection (1) on /var/run/kamailio//kamailio_ctl error: 500 - Not enough parameters (htable name and key name) 6(13168) DEBUG: ctl [io_listener.c:495]: handle_stream_read(): handle_stream read: eof on /var/run/kamailio//kamailio_ctl 6(13168) DEBUG: ctl [../../core/io_wait.h:602]: io_watch_del(): DBG: io_watch_del (0x7f266f4d23e0, 10, -1, 0x10) fd_no=2 called
#
Thanks & Kind Regards, *Logeshwaran G*
*"Be Hungry, Stay Foolish"*
On Mon, Sep 11, 2017 at 12:42 PM, Yu Boot yu@yu-boot.ru wrote:
You should use this in kamailio.cfg, not in bash :)
11.09.2017 10:09, Logeshwaran G пишет:
[root@zeodialer kamailio]# $sht(htable=>91)
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Got The Solution.. Thank you
Thanks & Kind Regards, *Logeshwaran G*
*"Be Hungry, Stay Foolish"*
On Tue, Sep 12, 2017 at 10:52 AM, Logeshwaran G logeshwarangs@gmail.com wrote:
Input Please
Thanks & Kind Regards, *Logeshwaran G*
*"Be Hungry, Stay Foolish"*
On Mon, Sep 11, 2017 at 1:17 PM, Logeshwaran G logeshwarangs@gmail.com wrote:
Sorry :)
Yes I have loaded dmq.so as well,
#----- DMQ params ----- modparam("dmq", "server_address", "sip:209.95.52.97:15060") modparam("dmq", "notification_address", "sip:209.95.52.97:15060")
#----- htable params ----- modparam("htable", "db_url", DBURL)
While Passing RPC command I do get the below Error:
# kamcmd htable.listTables 6(13168) DEBUG: ctl [../../core/io_wait.h:380]: io_watch_add(): DBG: io_watch_add(0x7f266f4d23e0, 10, 3, 0x231ac60), fd_no=1 6(13168) DEBUG: ctl [io_listener.c:442]: handle_new_connect(): handle_stream read: new connection (1) on /var/run/kamailio//kamailio_ctl error: 500 - No htables 6(13168) DEBUG: ctl [io_listener.c:495]: handle_stream_read(): handle_stream read: eof on /var/run/kamailio//kamailio_ctl 6(13168) DEBUG: ctl [../../core/io_wait.h:602]: io_watch_del(): DBG: io_watch_del (0x7f266f4d23e0, 10, -1, 0x10) fd_no=2 called
# kamcmd htable.get key_name 91 6(13168) DEBUG: ctl [../../core/io_wait.h:380]: io_watch_add(): DBG: io_watch_add(0x7f266f4d23e0, 10, 3, 0x231ac60), fd_no=1 6(13168) DEBUG: ctl [io_listener.c:442]: handle_new_connect(): handle_stream read: new connection (1) on /var/run/kamailio//kamailio_ctl error: 500 - Not enough parameters (htable name and key name) 6(13168) DEBUG: ctl [io_listener.c:495]: handle_stream_read(): handle_stream read: eof on /var/run/kamailio//kamailio_ctl 6(13168) DEBUG: ctl [../../core/io_wait.h:602]: io_watch_del(): DBG: io_watch_del (0x7f266f4d23e0, 10, -1, 0x10) fd_no=2 called
#
Thanks & Kind Regards, *Logeshwaran G*
*"Be Hungry, Stay Foolish"*
On Mon, Sep 11, 2017 at 12:42 PM, Yu Boot yu@yu-boot.ru wrote:
You should use this in kamailio.cfg, not in bash :)
11.09.2017 10:09, Logeshwaran G пишет:
[root@zeodialer kamailio]# $sht(htable=>91)
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hello.
You can do it easily with dialplan module or any other way to lookup in DB such as sqlops.
11.09.2017 9:26, Logeshwaran G пишет:
Key = 91, Value = India Key = 92, Value = Srilanka
How to store Key Value Pairs into kamailio and how to Retrieve?
If I pass 91 it should Retrieve India, Is it possible?
Thanks a lot For the inputs. Will Try it
Thanks & Kind Regards, *Logeshwaran G*
*"Be Hungry, Stay Foolish"*
On Mon, Sep 11, 2017 at 12:25 PM, Yu Boot yu@yu-boot.ru wrote:
Hello.
You can do it easily with dialplan module or any other way to lookup in DB such as sqlops.
11.09.2017 9:26, Logeshwaran G пишет:
Key = 91, Value = India Key = 92, Value = Srilanka
How to store Key Value Pairs into kamailio and how to Retrieve?
If I pass 91 it should Retrieve India, Is it possible?
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users