Re: [OpenSIPS-Users] Unable to load my private key file (TLS) in OpenSIPS 2.2. What should I check? Default example worked.

2015-07-27 Thread Liviu Chircu

Hi Rodrigo,

Could you try to decrypt the key manually (i.e. remove the passphrase), 
and use the resulting key in OpenSIPS? You can use the following example:


cp your_keyyour_key.bak
openssl rsa -inyour_key  -out new_key

If this works for you, could you please open a GitHub ticket? Many thanks!

Best regards,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 28.07.2015 00:34, Rodrigo Pimenta Carvalho wrote:


Hi.


1 - I have read and followed all the instructions on page 
http://www.opensips.org/Documentation/Tutorials-TLS-2-1 
http://www.opensips.org/Documentation/Tutorials-TLS-2-1 . It is 
about how to set up TLS in OpenSIPS 2.1. Good tutorial for beginners. 
But, there is no tutorial for it in version 2.2


2 - I have read all the instructions from page 
http://www.opensips.org/html/docs/modules/2.2.x/proto_tls.html 
http://www.opensips.org/html/docs/modules/2.2.x/proto_tls.html . 
This is the OpenSIPS TLS Module Guide.



3 - Considering all instructions I have learnt today, I wrote the 
following configuration:






loadmodule proto_tls.so

modparam(proto_tls,verify_cert, 1)
modparam(proto_tls,require_cert, 0)
modparam(proto_tls,tls_method, tlsv1)

#modparam(proto_tls,certificate, 
/usr/local/opensips_proxy/etc/opensips/tls/user/user-cert.pem)   
 # This line was generated automatically, after using the make 
menuconfig. It works very well.
#modparam(proto_tls,private_key, 
/usr/local/opensips_proxy/etc/opensips/tls/user/user-privkey.pem)   
   # This line was generated automatically, after using the make 
menuconfig. It works very well.
#modparam(proto_tls,ca_list, 
/usr/local/opensips_proxy/etc/opensips/tls/user/user-calist.pem) # 
This line was generated automatically, after using the make 
menuconfig. It works very well.



 modparam(proto_tls, certificate, 
/home/pimenta/SISC/TLS/tls_cnf/tls/rootCA/cacert.pem)   
  # I want to use the files generated by me, following the tutorial on 
how to set up TLS. No problem here.
 modparam(proto_tls, private_key, 
/home/pimenta/SISC/TLS/tls_cnf/tls/rootCA/private/cakey.pem) 
# File also generated by me, following the tutorial. ERROR here.  What 
is the problem??
 modparam(proto_tls, ca_list, 
/home/pimenta/SISC/TLS/tls_cnf/tls/rootCA/cacert.pem) # I want to 
use the files generated by me, following the tutorial on how to set up 
TLS. No problem here.
 modparam(proto_tls, ca_dir, 
/home/pimenta/SISC/TLS/tls_cnf/tls/rootCA/) 
  # I want to use the files generated by me, following the tutorial on 
how to set up TLS. No problem here.






4. All paths I'm using in such configuration are real and correct.


5. When I try to run the OpenSIPS, I always got the erro:


Jul 27 18:02:02 [13783] WARNING:proto_tls:mod_init: disabling 
compression due ZLIB problems


...

...

Enter passphrase for 
/home/pimenta/SISC/TLS/tls_cnf/tls/rootCA/private/cakey.pem:
Jul 27 18:02:02 [13783] ERROR:proto_tls:load_private_key: unable to 
load private key file 
'/home/pimenta/SISC/TLS/tls_cnf/tls/rootCA/private/cakey.pem'.



So, the file cakey.pem cann't be loaded. But, I'm running the OpenSIPS 
as a superuser.




What should I check in my files to verify whether  I have made some 
mistake?


To follow the tutorial for version 2.1 and to use the version 2.2 can 
cause troubles? I tutorial I see TLSv1 and in the module guide I see 
tlsv1. Is the script case sensitive?



The issued file is: -rw--- 1 root root 1834 Jul 24 14:54 
/home/pimenta/SISC/TLS/tls_cnf/tls/rootCA/private/cakey.pem. Can it be 
owned by root user, or must be another one?



I have just googled this case and I found same problem for people who 
was using wrong key file, which I think is not my case.



Any hint will be very helpful!


Thanks a lot!



RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Fwd: opensips server dual network card configuration

2015-07-27 Thread kevinfang
HI,
I have a opensips servers in a private network, IP address: 10.34.14.24,
now I'm going to this private network address 1: 1 NAT to public networks,
and modify the opensips.cfg profile. Register now through the public
network clients can conduct video and audio communications, and work very
well.

Now I need to add a network card (IP: 192.168.100.100) on opensips server,
and directly connected to a sip client (IP: 192.168.100.200) through this
card.

How should I modify opensips.cfg, make public sip client the private
network sip client to communicate it?

Attach opensips.cfg I now use:



#
# $Id$
#
# OpenSIPS residential configuration script
# by OpenSIPS Solutions t...@opensips-solutions.com
#
# This script was generated via make menuconfig, from
#   the Residential scenario.
# You can enable / disable more features / functionalities by
#   re-generating the scenario with different options.#
#
# Please refer to the Core CookBook at:
#  http://www.opensips.org/Resources/DocsCookbooks
# for a explanation of possible statements, functions and parameters.
#


### Global Parameters #

debug=3
log_stderror=no
log_facility=LOG_LOCAL0

fork=yes
children=4

/* uncomment the following lines to enable debugging */
#debug=6
#fork=no
#log_stderror=yes

/* uncomment the next line to enable the auto temporary blacklisting of
   not available destinations (default disabled) */
#disable_dns_blacklist=no

/* uncomment the next line to enable IPv6 lookup after IPv4 dns
   lookup failures (default disabled) */
#dns_try_ipv6=yes

/* comment the next line to enable the auto discovery of local aliases
   based on revers DNS on IPs */
auto_aliases=no

advertised_address=61.132.137.100
alias=61.132.137.100

listen=udp:10.34.14.24:5060  # CUSTOMIZE ME
#listen=udp:10.34.240.150:5060

disable_tcp=yes

disable_tls=yes


### Modules Section 

#set module path
mpath=/usr/local/opensips/lib64/opensips/modules

 SIGNALING module
loadmodule signaling.so

 StateLess module
loadmodule sl.so

 Transaction Module
loadmodule tm.so
modparam(tm, fr_timer, 5)
modparam(tm, fr_inv_timer, 30)
modparam(tm, restart_fr_on_each_reply, 0)
modparam(tm, onreply_avp_mode, 1)

 Record Route Module
loadmodule rr.so
/* do not append from tag to the RR (no need for this script) */
modparam(rr, append_fromtag, 0)

 MAX ForWarD module
loadmodule maxfwd.so

 SIP MSG OPerationS module
loadmodule sipmsgops.so

 FIFO Management Interface
loadmodule mi_fifo.so
modparam(mi_fifo, fifo_name, /tmp/opensips_fifo)


 URI module
loadmodule uri.so
modparam(uri, use_uri_table, 0)






 USeR LOCation module
loadmodule usrloc.so
modparam(usrloc, nat_bflag, 10)
modparam(usrloc, db_mode,   0)

 REGISTRAR module
loadmodule registrar.so
modparam(registrar, tcp_persistent_flag, 7)

/* uncomment the next line not to allow more than 10 contacts per AOR */
#modparam(registrar, max_contacts, 10)

 ACCounting module
loadmodule acc.so
/* what special events should be accounted ? */
modparam(acc, early_media, 0)
modparam(acc, report_cancels, 0)
/* by default we do not adjust the direct of the sequential requests.
   if you enable this parameter, be sure the enable append_fromtag
   in rr module */
modparam(acc, detect_direction, 0)
modparam(acc, failed_transaction_flag, 3)
/* account triggers (flags) */
modparam(acc, log_flag, 1)
modparam(acc, log_missed_flag, 2)

### Authenticated by MySQL ###
loadmodule db_mysql.so
loadmodule auth.so
loadmodule auth_db.so

modparam(usrloc, db_mode, 2)
modparam(usrloc, db_url, mysql://opensips:opensipsrw@localhost
/opensips)
modparam(auth_db, calculate_ha1, yes)
modparam(auth_db, password_column, password)
modparam(auth_db, db_url, mysql://opensips:opensipsrw@localhost
/opensips)
modparam(auth_db, load_credentials, )
### End Authentivated by MySQL ###

loadmodule domain.so
modparam(domain, db_url,mysql://opensips:opensipsrw@localhost
/opensips)
modparam(domain, db_mode, 1)   # Use caching

loadmodule nat_traversal.so
modparam(nat_traversal, keepalive_interval, 90)

 nathelper module
loadmodule nathelper.so
modparam(nathelper, natping_interval, 30)
modparam(nathelper, sipping_from, sip:pin...@opensips.org)
modparam(nathelper|registrar, received_avp, $avp(RECEIVED))

 Modulo rtpproxy (forcar o audio atraves do opensips)
loadmodule rtpproxy.so
modparam(rtpproxy, rtpproxy_sock, udp:127.0.0.1:7890)
modparam(nathelper, force_socket, udp:127.0.0.1:7890)
modparam(rtpproxy, rtpproxy_autobridge, 1)


### Routing Logic 

# main request routing logic

route{

if (!mf_process_maxfwd_header(10)) {
sl_send_reply(483,Too Many Hops);
exit;
}

if (has_totag()) {
# sequential requests within a dialog should
# take the path determined by record-routing
if (loose_route()) {
 if (is_method(BYE)) {
setflag(1); # do accounting ...
setflag(3); # ... even if the transaction fails
} else if (is_method(INVITE)) {
# even if in most of the cases is useless, do RR for
# re-INVITEs 

[OpenSIPS-Users] Radius Async Support

2015-07-27 Thread Ionut Ionita

Hello all,


I’m glad to announce that OpenSIPS 2.2 now has async support for RADIUS 
operations. This new extension allows you to do RADIUS authentication 
and accounting requests (against a RADIUS server) in an asynchronous way 
(by transparently using the OpenSIPS internal reactor).


A big problem we are trying to solve these days is trying to reduce the 
time we wait for the response from a remote server we are talking to. We 
definitely do not want to block one entire process while waiting for the 
response. This exact problem arises when doing RADIUS authentication and 
accounting, because we send a message to the radius server and wait for 
the response. In order to solve this problem, we implemented these two 
operations asynchronously - basically this translates into non-blocking 
waiting for the responses from the RADIUS server.


There are two new async functions that are now exposed by the RADIUS 
module:

***radius_send_auth(), authentication function [0]

*** *radius_send_acct(), accounting function [1]*

For the moment, freeradius-client[2] does not officially have any async 
support, so we developed a patch for the library. We also proposed the 
patch to freeradius-client team, and we hope it will reach future 
versions. For the moment, you have to apply the patch manually over the 
radius library. You can find a full tutorial on how to apply it here [3].


The patch has not been intensely tested in real life scenarios, so we 
are looking forward to receiving feedback about any bugs you may find 
and/or new functionalities that may be useful to you.


Best regards,

Ionut-Razvan Ionita


[0] 
http://www.opensips.org/html/docs/modules/2.2.x/aaa_radius.html#id293595
[1] 
http://www.opensips.org/html/docs/modules/2.2.x/aaa_radius.html#id293657

[2] https://github.com/FreeRADIUS/freeradius-client
[3] 
http://www.opensips.org/html/docs/modules/2.2.x/aaa_radius.html#id294274*


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Compact/Full Headers

2015-07-27 Thread Newlin, Ben
Does anyone have any ideas about this?

The only thing I found was the txtops module. I tried using it to simply do a 
text replacement of the compact headers for the full headers:

replace(^c: , Content-Type: “);

But this doesn’t work when there are headers that OpenSIPS will replace like 
Via. When the message is sent, the text replacements end up in the wrong places 
as the new Via headers are not inserted in the same place the old ones were.

Would I have to actually remove the header (remove_hf), copy the content, and 
then replace it (append_hf)? What would be the best way to do that for any 
given header?

Ben Newlin

From: Newlin, Ben
Date: Friday, July 10, 2015 at 5:54 PM
To: users@lists.opensips.orgmailto:users@lists.opensips.org
Subject: Compact/Full Headers

Is there a simple way to convert Compact headers to their full form and vice 
versa while processing a message? I haven’t found much mention of compact 
headers except that they are supported. I also saw the new compression module 
in 2.1, but we are using 1.11.

Ben Newlin
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] opensips-cp problem

2015-07-27 Thread alneami_ahmed
Hi all,Well I am a new to opensips and I have installed opensips for the third 
times so far,
until now I can go to the opensips-cp in the web and putting admin and admin 
password 
then blank page came out meaning it will not take me to the main.php and 
menu.php etc...

I am using opensips-2.1.0 and debain whzeey. opensips-cp 6.1


I had this problem for a month which I cant fix it. 
Any help will be appriciated ..
Thanks and Regards
Ahmed Alneami  
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] ERROR:core:parse_via: bad port

2015-07-27 Thread Nabeel
I am using rtpproxy with OpenSIPS, I can register to the server but I get
the following error when making a call:

ERROR:core:parse_via: bad port
ERROR:core:parse_via:  SIP/2.0/TCP
10.31.188.230:38703:-1;rport;branch=z9hG4bK66793#015#012Max-Forwards:
70#015#012To: sip:+447984977...@server0.domain.com;transport=tcp#015#012From:
sip:+447479189...@server0.domain.com;tag=z9hG4bK07391365#015#012Call-ID:
638873549209@10.31.188.230#015#012CSeq: 1 CANCEL#015#012Contact:
sip:+447479189410@10.31.188.230:38703;transport=tcp#015#012Expires:
3600#015#012User-Agent: Name/1.3.4/MP-S168#015#012Content-Length:
0#015#012#015#012
ERROR:core:parse_via: parsed so far:SIP/2.0/TCP 10.31.188.230:38703
ERROR:core:get_hdr_field: bad via
DBG:core:set_err_info: ec: 1, el: 3, ei: 'error parsing Via'
DBG:core:get_hdr_field: error exit

The config I'm using:

modparam(registrar,received_avp, $avp(42))
modparam(usrloc,nat_bflag,6)
modparam(nathelper, ping_nated_only, 1)
modparam(nathelper, natping_tcp, 1)
modparam(nathelper, sipping_bflag, 7)
modparam(nathelper, natping_interval, 5)
modparam(nathelper, sipping_from, sip:pinger at PUBLIC-IP:5060)
modparam(nathelper, received_avp, $avp(i:801))
modparam(nathelper, nortpproxy_str, )
modparam(rtpproxy, rtpproxy_sock, udp:PUBLIC-IP:7890)
modparam(nat_traversal, keepalive_state_file, /etc/keepalive_state)
modparam(nat_traversal, keepalive_interval, 5)


How do I fix this?
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] opensips-cp problem

2015-07-27 Thread Trevor Steyn
Hi Ahmed,

Have you set

short_open_tag = On ;  

In your php.ini file?

Also tailing your http error and access  logs might give you some
insight to your problem.


Regards
Trevor Steyn


On 27/07/2015 16:15, alneami_ah...@yahoo.co.uk wrote:
 Hi all,
 Well I am a new to opensips and I have installed opensips for the
 third times so far,

 until now I can go to the opensips-cp in the web and putting admin and
 admin password
 then blank page came out
 meaning it will not take me to the main.php and menu.php etc...

 I am using opensips-2.1.0 and debain whzeey. opensips-cp 6.1


 I had this problem for a month which I cant fix it.
 Any help will be appriciated ..

 Thanks and Regards

 Ahmed Alneami 


 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Unable to load my private key file (TLS) in OpenSIPS 2.2. What should I check? Default example worked.

2015-07-27 Thread Rodrigo Pimenta Carvalho
Hi.


1 - I have read and followed all the instructions on page 
http://www.opensips.org/Documentation/Tutorials-TLS-2-1 . It is about how to 
set up TLS in OpenSIPS 2.1. Good tutorial for beginners. But, there is no 
tutorial for it in version 2.2

2 - I have read all the instructions from page 
http://www.opensips.org/html/docs/modules/2.2.x/proto_tls.html . This is the 
OpenSIPS TLS Module Guide.


3 - Considering all instructions I have learnt today, I wrote the following 
configuration:





loadmodule proto_tls.so

modparam(proto_tls,verify_cert, 1)
modparam(proto_tls,require_cert, 0)
modparam(proto_tls,tls_method, tlsv1)

#modparam(proto_tls,certificate, 
/usr/local/opensips_proxy/etc/opensips/tls/user/user-cert.pem)
# This line was generated automatically, after using the make menuconfig. It 
works very well.
#modparam(proto_tls,private_key, 
/usr/local/opensips_proxy/etc/opensips/tls/user/user-privkey.pem)   # 
This line was generated automatically, after using the make menuconfig. It 
works very well.
#modparam(proto_tls,ca_list, 
/usr/local/opensips_proxy/etc/opensips/tls/user/user-calist.pem)  
 # This line was generated automatically, after using the make menuconfig. 
It works very well.


 modparam(proto_tls, certificate, 
/home/pimenta/SISC/TLS/tls_cnf/tls/rootCA/cacert.pem) 
   # I want to use the files generated by me, following the tutorial on how to 
set up TLS. No problem here.
 modparam(proto_tls, private_key, 
/home/pimenta/SISC/TLS/tls_cnf/tls/rootCA/private/cakey.pem)# 
File also generated by me, following the tutorial. ERROR here.  What is the 
problem??
 modparam(proto_tls, ca_list, 
/home/pimenta/SISC/TLS/tls_cnf/tls/rootCA/cacert.pem) 
 # I want to use the files generated by me, following the tutorial on 
how to set up TLS. No problem here.
 modparam(proto_tls, ca_dir, /home/pimenta/SISC/TLS/tls_cnf/tls/rootCA/)  
# I want to use the files 
generated by me, following the tutorial on how to set up TLS. No problem here.





4. All paths I'm using in such configuration are real and correct.


5. When I try to run the OpenSIPS, I always got the erro:


Jul 27 18:02:02 [13783] WARNING:proto_tls:mod_init: disabling compression due 
ZLIB problems

...

...

Enter passphrase for 
/home/pimenta/SISC/TLS/tls_cnf/tls/rootCA/private/cakey.pem:
Jul 27 18:02:02 [13783] ERROR:proto_tls:load_private_key: unable to load 
private key file '/home/pimenta/SISC/TLS/tls_cnf/tls/rootCA/private/cakey.pem'.


So, the file cakey.pem cann't be loaded. But, I'm running the OpenSIPS as a 
superuser.



What should I check in my files to verify whether  I have made some mistake?

To follow the tutorial for version 2.1 and to use the version 2.2 can cause 
troubles? I tutorial I see TLSv1 and in the module guide I see tlsv1. Is 
the script case sensitive?


The issued file is: -rw--- 1 root root 1834 Jul 24 14:54 
/home/pimenta/SISC/TLS/tls_cnf/tls/rootCA/private/cakey.pem. Can it be owned by 
root user, or must be another one?


I have just googled this case and I found same problem for people who was using 
wrong key file, which I think is not my case.


Any hint will be very helpful!


Thanks a lot!



RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] topology hiding not accepting BYE before 200 OK

2015-07-27 Thread Trevor Steyn
Hi Anyone have any ideas on the below issue?

On 23/07/2015 17:12, Trevor Steyn wrote:
 Hi Guys,

 I seem to be having some trouble with the new topology_hiding module in
 opensips 2.1

 here is the call scenario

 UAC -- Opensips -- UAS

 UAC Sends Invite to UAS with topology hiding module
 UAS sends 180 with to-tag
 UAC sends BYE

 When the Bye is sent opensips loops the call till max forwards is reached

 from what i can see from the debugs the  Bye from UAC is accepted and
 matches the topology_hiding_match function but does not rewrite the
 destination IP so when the message passes t_relay() its sending the Bye
 to Itself from Itself.

 I have tried this without topology hiding and the BYE is relayed as it
 should
 .

 My route looks as follows


 route{
 script_trace( 3, $rm from $si, ruri=$ru, me);

 if (!mf_process_maxfwd_header(10)) {
 sl_send_reply(483,Too Many Hops);
 exit;
 }

 if ( check_source_address(1,$avp(trunk_attrs)) ) {
 # request comes from trunks
 setflag(IS_TRUNK);
 } else if ( is_from_gw() ) {
 # request comes from GWs
 } else {
 #send_reply(403,Forbidden);
 xlog(Message is not from Trunk or GW $si);
 #exit;
 }

 if (has_totag()) {
 # sequential request withing a dialog should
 # take the path determined by record-routing
 #if (loose_route()) {
 if(topology_hiding_match()) {

 # validate the sequential request against dialog
 if ( $DLG_status!=NULL  !validate_dialog() ) {
 xlog(In-Dialog $rm from $si (callid=$ci) is not valid
 according to dialog\n);
 ## exit;
 }

 if (is_method(BYE)) {
 setflag(ACC_DO); # do accounting ...
 setflag(ACC_FAILED); # ... even if the transaction fails
 } else if (is_method(INVITE)) {
 # even if in most of the cases is useless, do RR for
 # re-INVITEs alos, as some buggy clients do change route set
 # during the dialog.
 record_route();
 }

 # lets handle re-invites and offer proxy
 if (has_body(application/sdp))  {
 # Begin rtp session update gyrations
 if (method == INVITE) {
 # INVITE w/ SDP, so early neg
 # This is offer, reply is answer
 rtpproxy_offer(iewlz20);
 t_on_reply(1);
 } else if (method == ACK) {
 # ACK w/ SDP, so late neg (done now)
 # This is answer
 rtpproxy_answer(iewlz20);
 }
 }


 # route it out to whatever destination was set by loose_route()
 # in $du (destination URI).
 route(RELAY);
 } else {
 if ( is_method(ACK) ) {
 if ( t_check_trans() ) {
 # non loose-route, but stateful ACK; must be an ACK
 after
 # a 487 or e.g. 404 from upstream server
 t_relay();
 exit;
 } else {
 # ACK without matching transaction -
 # ignore and discard
 exit;
 }
 }
 sl_send_reply(404,Not here);
 }
 exit;
 }

  INITIAL REQUESTS

 if ( !isflagset(IS_TRUNK) ) {
 ## accept new calls only from trunks
 send_reply(403,Not from trunk);
 exit;
 }

 # CANCEL processing
 if (is_method(CANCEL)) {
 if (t_check_trans())
 t_relay();
 exit;
 } else if (!is_method(INVITE)) {
 send_reply(405,Method Not Allowed);
 exit;
 }

 if ($rU==NULL) {
 # request with no Username in RURI
 sl_send_reply(484,Address Incomplete);
 exit;
 }

 t_check_trans();

 # preloaded route checking
 if (loose_route()) {
 xlog(L_ERR,
 Attempt to route with preloaded Route's [$fu/$tu/$ru/$ci]);
 if (!is_method(ACK))
 sl_send_reply(403,Preload Route denied);
 exit;
 }

 # record routing
 record_route();

 setflag(ACC_DO); # do accounting



 # create dialog with timeout
 if ( !create_dialog(B) ) {
 send_reply(500,Internal Server Error);
 exit;
 }


 if (is_avp_set($avp(trunk_attrs))  $avp(trunk_attrs)=~^[0-9]+$) {
 get_profile_size(trunkCalls,$si,$var(size));
 if ( $(var(size){s.int}) = $(avp(trunk_attrs){s.int}) ) {
 send_reply(486,Busy Here);
 exit;
 }
 }
 set_dlg_profile(trunkCalls,$si);




 # apply transformations from dialplan table
 dp_translate(0,$rU/$rU);

 # route calls based on prefix
 if ( !do_routing(1) ) {
  

Re: [OpenSIPS-Users] Usrloc Write-Back scheme doesn't delete expired contacts from location. 1.10

2015-07-27 Thread Игорь Павлов
Somebody met such problem?

add:
version: opensips 1.10.4-tls (x86_64/linux)
flags: STATS: On, USE_IPV6, USE_TCP, USE_TLS, DISABLE_NAGLE, USE_MCAST,
SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
@(#) $Id$
main.c compiled on 00:06:21 Apr  3 2015 with gcc 4.4.7



Best regards,
Igor Pavlov

2015-07-21 23:28 GMT+04:00 Игорь Павлов i...@ringcloud.ru:

 Hi all. We have a problem with USRLOC, we are using write-back scheme with
 90 seconds timer_interval. In location table presents expired contacts like
 this:

 username contact expires q callid user_agent socket  10271225
 sip:10271225@192.168.0.100:5060 17.07.2015 17:44 -1.00
 000AD87F-8E28-E511-95FA-ED5AA7718DC4@79.120.58.194 SIPPER for PhonerLite
 udp:192.168.0.5:5060  10271225  sip:10271225@192.168.0.100:5060 16.07.2015
 15:39 -1.00 0018FF86-8E28-E511-B071-73FCC3C39125@79.120.58.194 SIPPER for
 PhonerLite udp:192.168.0.5:5060  10271225  sip:10271225@192.168.0.100:5060 
 18.07.2015
 16:01 -1.00 805B93D6-8E2B-E511-B232-C3E27EBE0AEC@79.120.58.194 SIPPER for
 PhonerLite udp:192.168.0.5:5060  10271225  sip:10271225@192.168.0.100:5060 
 21.07.2015
 10:00 -1.00 80612236-8A2C-E511-B771-23AC57084C2D@79.120.58.194 SIPPER for
 PhonerLite udp:192.168.0.5:5060  10271225  sip:10271225@192.168.0.100:5060 
 17.07.2015
 9:55 -1.00 807832C3-8E28-E511-AFE6-E49E9283A1CD@79.120.58.194 SIPPER for
 PhonerLite udp:192.168.0.5:5060

 At same time, in syslog, I can see this:

 Jul 21 18:59:36 [37186]:
 CRITICAL:db_mysql:wrapper_single_mysql_stmt_execute: driver error (1062):
 Duplicate entry '10271225-domain-sip:1027
 1225@192.168.0.100:5060-00705664-8' for key 'account_contact_idx'
 Jul 21 18:59:36 [37186]: ERROR:usrloc:db_update_ucontact: updating
 database failed
 Jul 21 18:59:36 [37186]: ERROR:usrloc:wb_timer: updating contact in db
 failed
 Jul 21 19:01:07 [37186]:
 CRITICAL:db_mysql:wrapper_single_mysql_stmt_execute: driver error (1062):
 Duplicate entry '10271225-domain-sip:1027
 1225@192.168.0.100:5060-00705664-8' for key 'account_contact_idx'
 Jul 21 19:01:07 [37186]: ERROR:usrloc:db_update_ucontact: updating
 database failed
 Jul 21 19:01:07 [37186]: ERROR:usrloc:wb_timer: updating contact in db
 failed


 
 Best regards,
 Igor Pavlov

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users