sometimes when I'm do a restart on opensips (using init.d script, with some
customization to handle this problem) opensips takes quite a bit of time,
like 30 - 50 seconds to stop. Other times it is very quick. I'm using 1.6.2
and 1.6.3.
The servers are fairly busy, less then 200 calls per sec, with around 1000
sustained open calls.
I am using dialog module and db mode is 3 (on shutdown) with postgresql 8.4.
However since sometimes it is very quick with the same call volume it
doesn't "feel" like this is the problem. Further I have had it be slow to
stop when testing a config that is not using dialog at all and there are no
active calls or any sip activity when I try to stop it.
My hunch is slightly toward it is waiting on a transaction but not so sure.
The pertinent part of my init.d script customizations are for after sending
opensips the kill <pid> signal to every 0.1 seconds check if it has stopped
yet then start it back up.
Needless to say, having it take 50 seconds to restart, and not responding to
sip traffic does not make customers happy when your dealing with thousands
of call. :(
Any thoughts or things to try would be appreciated.
Thanks
cando
dear Daniel,
when i add
xlog("my var value is: $sel(cfg_get.my.route_addr)\n");
i see that kamailio load right value.
my scenarios as:
my kamailio server(192.168.1.40) and the $sel(cfg_get.my.route_addr) is
192.168.1.110
i register with 1(a)192.168.1.40 and 2(a)192.168.1.40
then i make call is ok
so the route ip is ???
and why i can make call ?
TRUONG NGOC THANH
Telecommunications Engineer
Tel: 0984 480 646
Y!M: ngoc217thanh
________________________________
Hello,
I am planning to release minor version 3.0.3 by beginning of next week.
Please commit there what you think it needs to be fixed for this release.
Thanks,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.com/
Hello,
first, keep the mailing list on cc, otherwise future emails will be ignored.
Then, the -ddd and -E parameters are for kamailio, not kamctl.
Just run:
kamailio -ddd -E
of course, if you have a custom path to your config, keep you -c
/path/to/cfg parameter.
Cheers,
Daniel
On 8/18/10 6:20 PM, truong ngoc THANH wrote:
> thanks Daniel,
> thanks for help, but i cannot start :kamctl -ddd -E
> or kamctl -ddd
> or kamctl -E.
> and can you show me how it work, or how the result when i declare the
> parameter, and how do I know the parameter is used for ?
> so nice too get your help.
> TRUONG NGOC THANH
> Telecommunications Engineer
> Tel: 0984 480 646
> Y!M: ngoc217thanh
>
>
> ------------------------------------------------------------------------
> *From:* Daniel-Constantin Mierla <miconda(a)gmail.com>
> *To:* truong ngoc THANH <ngoc217thanh(a)yahoo.com>
> *Cc:* kamailio <sr-users(a)lists.sip-router.org>
> *Sent:* Wed, August 18, 2010 10:47:58 PM
> *Subject:* Re: [SR-Users] help to config cfg_db module in kamailio 3.0.1
>
> Hello,
>
> not a user of this module, however, start kamailio with parameters
> -ddd -E and paste the output here.
>
> Do you declare my.route_addr in config file as well? Might be that the
> parameter is declared in cfg_custom table, the startup debug log
> should give more hints.
>
> Thanks,
> Daniel
>
>
> On 8/18/10 7:13 AM, truong ngoc THANH wrote:
>>
>> Hi all ,
>>
>> I try to configure with cfg_db, but after create and insert value
>> into tables in mysql , I cannot start kamailio.
>>
>> I add My config in kamalio.cfg
>>
>> ==============
>>
>> Loadmodule “cfg_db.so <http://cfg_db.so>”
>>
>> modparam("cfg_db", "db_url",
>> "mysql://openser:openserrw@localhost/kamailio")
>>
>> modparam("cfg_db", "transl_tbl", "cfg_transl")
>>
>> modparam("cfg_db", "custom_tbl", "cfg_custom")
>>
>> I add and insert in mysql as:
>>
>> ===============
>>
>> cfg_transl table:
>>
>> group_name|name|cfg_table|cfg_table_group_name_field|cfg_table_name_field|cfg_table_value_field
>>
>> core|use_dst_blacklist|cfg_dns|||
>>
>> core|dst_blacklist_mem|cfg_dns|||
>>
>> core|dst_blacklist_expire|||
>>
>> my|route_addr|cfg_my|my_group_name|my_name|my_value ; overrides
>> <default> values
>>
>> my|use_rtp_proxy|cfg_my|my_group_name|my_name|my_value
>>
>> *|*|||| ; matches all param ids, points to tables defined in row
>> <default>
>>
>> <default>||cfg_var|group_name|name|value ; default cfg_table* values
>>
>> cfg_custom table:
>>
>> group_name|name|value_type|min_value|max_value|description
>>
>> my|route_addr|S|||Routing address
>>
>> my|use_rtp_proxy|I|0|1|Use RTP proxy
>>
>> cfg_var table:
>>
>> group_name|my_name|value
>>
>> core|debug|4
>>
>> cfg_my table:
>>
>> my_group_name|my_name|my_value
>>
>> my|route_addr|127.0.0.1
>>
>> my|use_rtp_proxy|1
>>
>> cfg_dns table:
>>
>> group_name|name|value
>>
>> dns|use_dst_blacklist|1
>>
>> dns|dst_blacklist_mem|1024
>>
>> dns|dst_blacklist_expire|60
>>
>> when I start kamailio the log show :
>>
>> ===============
>>
>> Aug 18 12:04:56 appliance /usr/local/sbin/kamailio[2771]: INFO:
>> usrloc [hslot.c:53]: locks array size 512
>>
>> Aug 18 12:04:56 appliance /usr/local/sbin/kamailio[2771]: ERROR:
>> <core> [cfg/cfg_script.c:80]: ERROR: new_cfg_script_var(): variable
>> already exists: my.route_addr
>>
>> Aug 18 12:04:56 appliance /usr/local/sbin/kamailio[2771]: ERROR:
>> cfg_db [cfg_db.c:335]: cfg_db: Error declaring cfg int 'my.route_addr'
>>
>> Aug 18 12:04:56 appliance /usr/local/sbin/kamailio[2771]: ERROR:
>> <core> [sr_module.c:860]: init_mod(): Error while initializing module
>> cfg_db
>>
>> Thanks for looking.
>>
>> TRUONG NGOC THANH
>> Telecommunications Engineer
>> Tel: 0984 480 646
>> Y!M: ngoc217thanh
>>
>>
>>
>> _______________________________________________
>> 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
>
> --
> Daniel-Constantin Mierla
> http://www.asipto.com/
>
--
Daniel-Constantin Mierla
http://www.asipto.com/
HEllo community,
I'm having some problems with my kamailio configuration, following is the
section of my authentication process on my /etc/kamailio/kamailio.cfg
route [3] {
if (is_method("REGISTER")) {
if (!www_authorize("", "subscriber")) {
www_challenge("", "0");
exit;
}
if ($au!=$tU) {
sl_send_reply("403", "Forbidden auth ID");
exit;
}
} else {
if (from_uri==myself) {
if(!proxy_authorize("", "subscriber")) {
proxy_challenge("", "0");
exit;
}
if (is_method("PUBLISH")) {
if ($au!=$tU) {
sl_send_reply("403", "Forbidden auth
ID");
exit;
}
} else {
if ($au!=$fU) {
sl_send_reply("403", "Forbidden auth ID");
exit;
}
}
consume_credentials();
}
}
return;
}
I added a user with the following command:
# kamctl add 1102 123456
And then i checked on mysql, table subscriber:
mysql> select * from subscriber;
+----+----------+---------------+----------+---------------+----------------------------------+----------------------------------+------+
| id | username | domain | password | email_address | ha1
| ha1b | rpid |
+----+----------+---------------+----------+---------------+----------------------------------+----------------------------------+------+
| 3 | 1102 | dannydias.com | | |
fe7a80817383cfd90950dea03d37eccf | dbb9b6ef93d4f3417038a6bf5cd176db | NULL
|
+----+----------+---------------+----------+---------------+----------------------------------+----------------------------------+------+
1 row in set (0.00 sec)
By the way, the domain field does not exist (dannydias.com) i'm not sure how
this could affect the authentication process, this migh be the problem?
And finally, ngrep-sip to check what is going on:
#
U 2010/08/17 22:28:38.548357 80.26.81.96:26932 -> 212.230.19.191:5060
*REGISTER sip:212.230.19.191 SIP/2.0'*
Via: SIP/2.0/UDP 80.26.81.96:26932;branch=z9hG4bK-d2ee4e38'
From: "1102" <sip:1102@212.230.19.191 <sip%3A1102(a)212.230.19.191>
>;tag=36dcc698cfc16210o1'
To: "1102" <sip:1102@212.230.19.191 <sip%3A1102(a)212.230.19.191>>'
Call-ID: 4aab2f50-775b4d34(a)80.26.81.96'
CSeq: 10409 REGISTER'
Max-Forwards: 70'
Authorization: Digest
username="1102",realm="212.230.19.191",nonce="4c6b0d34000000c9c4e2068de2d41bec38c6d23029696501",uri="sip:212.230.19.191",algorithm=MD5,response="a09ea335a01051d714d2cbfe95e17820"'
Contact: "1102" <sip:1102@80.26.81.96:26932>;expires=180'
User-Agent: Linksys/SPA942-5.1.15(a)'
Content-Length: 0'
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER'
Supported: replaces'
'
#
U 2010/08/17 22:28:38.548357 212.230.19.191:5060 -> 80.26.81.96:26932
*SIP/2.0 401 Unauthorized'*
Via: SIP/2.0/UDP 80.26.81.96:26932;branch=z9hG4bK-d2ee4e38'
From: "1102" <sip:1102@212.230.19.191 <sip%3A1102(a)212.230.19.191>
>;tag=36dcc698cfc16210o1'
To: "1102" <sip:1102@212.230.19.191 <sip%3A1102(a)212.230.19.191>
>;tag=00f209f5fddbfe1aa952cd699e41d531.97e5'
Call-ID: 4aab2f50-775b4d34(a)80.26.81.96'
CSeq: 10409 REGISTER'
WWW-Authenticate: Digest realm="212.230.19.191",
nonce="4c6b0d34000000caa164dcad25dbc5b4c6baefcef6dc84ae"'
Server: Kamailio (1.5.4-notls (x86_64/linux))'
Content-Length: 0'
'
Could somebody help me? i can't find the real problem
Thanks in advance
DD
Hello,
the path to modules can be specified via command line option -L or cfg
parameter loadpath (aliased as mpath for K backward compat). loadpath
overwrites the value given by -L.
The question is whether the value given via -L shouldn't be effective
all the time (i.e., loadpath cfg parameter ignored when -L is given)
since it is via command line parameter -- my expectation is command line
options should have higher priority. Changing it now will break backward
compatibility (if anyone used it like now) while in testing, but if all
think is a bug, then can be fixed.
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.com/
Hello,
I committed in master branch (to be 3.1.0) code that allows to set uri,
username, domain and display name for To and From headers using
assignments to their respective PVs in configuration file. For example:
$fu = "sip:anonymous@invalid";
$fn = '"Jon Doe"';
$tU = "+123455678";
Assignment of each such attribute should be done only once, otherwise
you get concatenated values since it uses the internal lump system.
Therefore, doing an update is not visible immediately in config unless
you do use msg_apply_changes().
Also, use it carefully, in case you have sipv1 devices in your network
then it can break dialog matching. Anyhow changing content of From and
To headers was possible with remove_hf()/append_hf() or subst()
functions, the new feature comes just to ease writing the config when
one needs it.
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.com/