Hi!
For your scenario the domainpolicy module is not needed, and actually it
is obsolete and not maintained anymore.
regards
klaus
truong ngoc THANH wrote:
hi all,
I try to configure domainpolicy but it does not work.
===========
my scenarios is :
1: i configure multi domain with kamailio, and i set two domain
example.com and
kamailio.com which have the same ip(192.168.1.40).
2:the sip client can register and make call in local domain .
3: i try to make policy in domain
example.com to call to
kamailio.com.
my config as :
============
i add some line in kamailio.cfg
loadmodule "domainpolicy.so"
#---------------------domainpolicy----------------------------
modparam("domainpolicy", "db_url",
"mysql://openser:openserrw@localhost/kamailio")
modparam("domainpolicy", "dp_table", "supportedpolicies")
modparam("domainpolicy", "dp_col_rule", "rules")
modparam("domainpolicy", "dp_col_type", "type")
modparam("domainpolicy", "dp_col_att", "att")
modparam("domainpolicy", "dp_col_val", "val")
modparam("domainpolicy", "port_override_avp",
"portoverride")
modparam("domainpolicy", "transport_override_avp",
"transportoverride")
modparam("domainpolicy", "domain_replacement_avp",
"domainreplacement")
modparam("domainpolicy", "domain_prefix_avp",
"domainprefix")
modparam("domainpolicy", "domain_suffix_avp",
"domainsuffix")
modparam("domainpolicy", "send_socket_avp", "sendsocket")
if (is_method("INVITE")) {
setflag(1); # do accounting
dp_can_connect(); #< i add
dp_apply_policy(); #< i add
in mysql i create table : and add rules as :
mysql> select * from supportedpolicies;
+----+--------------+------+-------------------+--------------+--------------+-------------------+-------------------+--------------+--------------+-------------+
| id | rules | type | att | val |
portoverride | transportoverride | domainreplacement | domainprefix |
domainsuffix | description |
+----+--------------+------+-------------------+--------------+--------------+-------------------+-------------------+--------------+--------------+-------------+
| 5 |
kamailio.com | dom | domainreplacement |
kamailio.com | 5060
| udp |
kamailio.com | NULL | NULL
| |
| 6 |
example.com | dom | domainreplacement |
kamailio.com | NULL
| NULL | kamailio | NULL | NULL
| |
+----+--------------+------+-------------------+--------------+--------------+-------------------+-------------------+--------------+--------------+-------------+
2 rows in set (0.00 sec)
the log when i make call from 1(a)example.com to 3(a)kamailio.com
Aug 14 10:16:41 appliance /usr/local/sbin/kamailio[2140]: INFO:
domainpolicy [domainpolicy.c:547]: looking up Domain itself:
example.com
Aug 14 10:16:41 appliance /usr/local/sbin/kamailio[2140]: INFO:
domainpolicy [domainpolicy.c:429]: checking for 'example.com'.
Aug 14 10:16:41 appliance /usr/local/sbin/kamailio[2140]: INFO:
domainpolicy [domainpolicy.c:473]: querying database OK
Aug 14 10:16:41 appliance /usr/local/sbin/kamailio[2140]: INFO:
domainpolicy [domainpolicy.c:506]: DB returned
domainreplacement/kamailio.com
Aug 14 10:16:41 appliance /usr/local/sbin/kamailio[2140]: INFO:
domainpolicy [domainpolicy.c:551]: found a match on domain itself
Please help me to correct config to use domainpolicy
thanks for help.
peter_green
------------------------------------------------------------------------
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users