Re: [OpenSIPS-Users] registrant table

2016-03-16 Thread Francjos
Tkank you very much to make me understand the difference.
So, given these parameters:

Username: 
 Password: yyy
 Authorisation username: zzz
 My telefon number : a
 Domain/registar: sip3.ovh.fr

I can fill the registrtant table's columns as follows:
registar_column : sip3.ovh.fr
proxy_column : NULL
third_party_registrant_column : NULL
username_column : 
password_column : yyy
binding_params_column: NULL

What about aor_column and binding_column ??

 Thank you aganin



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/registrant-table-tp7602038p7602083.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

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


[OpenSIPS-Users] Sequential check in Fraud Detection

2016-03-16 Thread John Quick
I found how to report the internal stats from the fraud detection module.
I used this command (not as per the module documentation):
  opensipsctl fifo show_fraud_stats   1

It clearly shows that the sequential call count does not increment. After 3
test calls to the same number:
calls per minute:: 2
total calls:: 3
concurrent calls:: 0
sequential calls:: 1

Either I have misunderstood what is meant by "sequential calls" or there
must be a bug.

John Quick
Smartvox Limited


>Date: Thu, 10 Mar 2016 13:58:43 -
>From: "John Quick" 
>Subject: [OpenSIPS-Users] Sequential check in Fraud Detection
>To: 
>Message-ID: <000901d17ad4$f5339970$df9acc50$@smartvox.co.uk>
>Content-Type: text/plain;  charset="us-ascii"
>
>I am unable to trigger an event for sequential calls, although I have had
success testing thresholds for concurrent calls and cpm.
>I'm testing with v2.1.2 and set sequential_calls_warning to 12, then made
18 calls to the same number in a period of 5 minutes, but got no events
triggered.
>(The prefix for the rule matches the first 6 digits of the destination
number).>
>
>John Quick
>Smartvox Limited


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


Re: [OpenSIPS-Users] siptrace problem

2016-03-16 Thread Liviu Chircu

Hi Dragomir!

Indeed, the error reporting ("parameter not found") is a bit strange 
there - we will improve that soon! Basically, you have one of the 
following problems:


* "db_mysql.so" not loaded
* insufficient permissions for "name:passwd@localhost"
* opensips.sip_trace table does not exist

If taking care of the above does not solve your problem, please 
copy-paste all the error logs you receive - there must be other errors.


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

On 16.03.2016 11:04, Dragomir Haralambiev wrote:

Hello,

I try to add siptrace in my system.

I make follow:
git pull
make proper
make all
make install

in script put follow lines :
modparam("siptrace", 
"trace_id","[tid]uri=mysql://name:passwd@localhost/opensips;table=sip_trace;")

modparam("siptrace", "trace_on", 1)

I receive follow error:
Parameter  not found in module  - can't set

Where is problem?

Best regards,
Dragomir


___
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


Re: [OpenSIPS-Users] registrant table

2016-03-16 Thread Aqs Younas
I think both commands do completely opposite things. The first one is used
when opensips is needed to register with  provider before sending call to
it and later one when  UA needs to register with opensips before sending
calls to opensips.

On 16 March 2016 at 14:44, Francjos <35...@heb.be> wrote:

> Okey. And i have an other questrion:
> I have connexion parameters provides by provider:
> Username: 
> Password: yyy
> Authorisation username: zzz
> My telefon number : a
> Domain/registar: sip3.ovh.fr
>
> 1) when i create entry in the registrant  table, may i going tu use these
> parameters to fill the registrant table's columns?
>
> 2) I create new subscriber using this command: opensipsctl add
> xxx...@opensips.org 
>
> In which order i have to perform these two points, 1) and 2)
>
>
>
>
>
>
> --
> View this message in context:
> http://opensips-open-sip-server.1449251.n2.nabble.com/registrant-table-tp7602038p7602073.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> ___
> 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] Fraud_module

2016-03-16 Thread John Quick
Hi Denis

I am also testing the Fraud Detection module in v2.1.2. I posted some
questions last week, but not had any responses yet.
I have not had any problems with crashing after reload.
My tests have produced code -2 when the critical threshold is reached. My
code snippet is like this:
if (!check_fraud("$avp(userid)", "$rU", "1")) {
switch ($retcode) {
  case -1:
xlog("L_WARN", "Route[4]: FRAUD WARNING for call to $rU by
User ID $avp(userid)  Call-ID=$ci\n");
break;
  case -2:
xlog("L_WARN", "Route[4]: FRAUD ALERT Blocking call to $rU
by User ID $avp(userid)  Call-ID=$ci\n");
sl_send_reply("403","Fraud Detect Blocked");
exit;
}
}

I have found that some tests work (like call per minute) whereas others do
not (like sequential calls).
Hope this helps.

John Quick
Smartvox Limited


Date: Wed, 16 Mar 2016 10:35:20 +0300
From: Denis 
Subject: [OpenSIPS-Users] Fraud_module
To: users@lists.opensips.org
Message-ID: <1241249825.20160316103...@ptl.ru>
Content-Type: text/plain; charset="windows-1251"

Hello!

I am testing Fraud_detection on Opensips 2.1

1) I noticed an Opensips crash after fifo fraud_relaod. GDB from core in
attachment. 
2) In the log file i can see such messages "CRITICAL:core:sig_alarm_abort:
BUG - shutdown timeout triggered, dying..."
3) Fraud detection doesn`t work because it shows "code 1" of check_fraud
function during every call, although the function exports event
"E_FRD_CRITICAL".

| ruleid | profileid | prefix | start_hour | end_hour | daysoftheweek | 
| cpm_warning | cpm_critical | call_duration_warning | 
| call_duration_critical | total_calls_warning | total_calls_critical | 
| concurrent_calls_warning | concurrent_calls_critical | 
| sequential_calls_warning | sequential_calls_critical |
++---+++--+---+-
+--+---++---
--+--+--+---
+--+---+
|  1 | 1 | 8812   | 00:00  | 23:59| Mon-Fri   |
2 |   30 | 1 |  2 |
3 |5 |1 |
2 |3 | 4 |

I made more than 5 calls but there is no "code -2" detected.

Thank you for any help.

mailto:denis7...@mail.ru


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


Re: [OpenSIPS-Users] registrant table

2016-03-16 Thread Francjos
Okey. And i have an other questrion:
I have connexion parameters provides by provider:
Username: 
Password: yyy
Authorisation username: zzz
My telefon number : a
Domain/registar: sip3.ovh.fr

1) when i create entry in the registrant  table, may i going tu use these
parameters to fill the registrant table's columns?

2) I create new subscriber using this command: opensipsctl add
xxx...@opensips.org 

In which order i have to perform these two points, 1) and 2)






--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/registrant-table-tp7602038p7602073.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

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


Re: [OpenSIPS-Users] OpenSIPS error Malformed Header/failed to generate a HBH ACK

2016-03-16 Thread Liviu Chircu
Useful update: The actual culprit is the initial INVITE from the SIP 
trunk, which is missing the "From" header. FreeSWITCH raises an eyebrow 
and replies with 400 "Bad Request", while omitting the header as well on 
the way back to OpenSIPS!


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

On 16.03.2016 11:27, Liviu Chircu wrote:

Hi Dimitry!

That errors suggests the "From" Header Field of the 400 negative reply 
is missing! Best way to continue from here is to perform a SIP trace 
on this scenario, so you can confirm this yourself before starting to 
fix it.

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com
On 15.03.2016 14:48, Nagorny, Dimitry wrote:


Good afternoon Ladies and Gentlemen,

I’m trying to use OpenSIPS as a Border Controller between a PSTN and 
a FreeSWITCH. The PSTN is sending all SIP-messages through a SIP-trunk.


I got OpenSIPS working fine from PSTN through OpenSIPS to FreeSWITCH, 
but the other way around (from FS over OpenSIPS to PSTN),  I’m 
getting an error message I can’t solve. (Info: There are NO phones 
registered with OpenSIPS or FreeSWITCH, they are all on the PSTN, I 
need OpenSIPS only to guide traffic to either my FreeSWITCH 
mediaserver or tot he Aus @ PBX.)


As far as I can tell, when OpenSIPS opens up a new branch it is 
changing internally the headers from the incoming SIP-message from 
FreeSWITCH into a wrong format and after that it’s throwing two errors:


-ERROR:tm:send_ack: failed to generate a HBH ACK if key HFs in reply 
missing

ERROR:tm:reply_received: failed to send ACK (local=no)

oHere I looked at the relevant code but I can’t tell what it is 
trying to do in the transaction module


oAs well I couldn’t find info about the abbreviation „HBH“ or „HF“

Additionally this piece of info:

-… SIP/2.0 400 Bad Request..Warning: 399 192.168.1.30 "Malformed 
headers : From " …


oFrom this somehow I found out that it’s missing the “:“ after From

Please see the attached files for more info.
I would very much appreciate it if somebody could give me, at least, 
a hint how I could fix the problem, because by now I googled these 
problems for three days now w/o a solution. I can’t attach the full 
debug, the mail list blocks the size of it (17KB…). I’ll attach it to 
an answer.


Thanks in advance for any help I can get!

Very Respectfully

*Dimitry Nagorny*

Trainee

robot5GmbH

___

This message is confidential and may contain privileged information.
If you are not the above named addressee or authorized to receive this
message on behalf of the addressee, please advise the sender immediately
and delete this message. Any unauthorized copying, disclosure or
distribution of the information in this e-mail is strictly forbidden.



___
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


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


Re: [OpenSIPS-Users] OpenSIPS error Malformed Header/failed to generate a HBH ACK

2016-03-16 Thread Liviu Chircu

Hi Dimitry!

That errors suggests the "From" Header Field of the 400 negative reply 
is missing! Best way to continue from here is to perform a SIP trace on 
this scenario, so you can confirm this yourself before starting to fix it.


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

On 15.03.2016 14:48, Nagorny, Dimitry wrote:


Good afternoon Ladies and Gentlemen,

I’m trying to use OpenSIPS as a Border Controller between a PSTN and a 
FreeSWITCH. The PSTN is sending all SIP-messages through a SIP-trunk.


I got OpenSIPS working fine from PSTN through OpenSIPS to FreeSWITCH, 
but the other way around (from FS over OpenSIPS to PSTN),  I’m getting 
an error message I can’t solve. (Info: There are NO phones registered 
with OpenSIPS or FreeSWITCH, they are all on the PSTN, I need OpenSIPS 
only to guide traffic to either my FreeSWITCH mediaserver or tot he 
Aus @ PBX.)


As far as I can tell, when OpenSIPS opens up a new branch it is 
changing internally the headers from the incoming SIP-message from 
FreeSWITCH into a wrong format and after that it’s throwing two errors:


-ERROR:tm:send_ack: failed to generate a HBH ACK if key HFs in reply 
missing

ERROR:tm:reply_received: failed to send ACK (local=no)

oHere I looked at the relevant code but I can’t tell what it is trying 
to do in the transaction module


oAs well I couldn’t find info about the abbreviation „HBH“ or „HF“

Additionally this piece of info:

-… SIP/2.0 400 Bad Request..Warning: 399 192.168.1.30 "Malformed 
headers : From " …


oFrom this somehow I found out that it’s missing the “:“ after From

Please see the attached files for more info.
I would very much appreciate it if somebody could give me, at least, a 
hint how I could fix the problem, because by now I googled these 
problems for three days now w/o a solution. I can’t attach the full 
debug, the mail list blocks the size of it (17KB…). I’ll attach it to 
an answer.


Thanks in advance for any help I can get!

Very Respectfully

*Dimitry Nagorny*

Trainee

robot5GmbH

___

This message is confidential and may contain privileged information.
If you are not the above named addressee or authorized to receive this
message on behalf of the addressee, please advise the sender immediately
and delete this message. Any unauthorized copying, disclosure or
distribution of the information in this e-mail is strictly forbidden.



___
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


Re: [OpenSIPS-Users] siptrace problem

2016-03-16 Thread Dragomir Haralambiev
I try to use in Opensips 2.2.

2016-03-16 11:14 GMT+02:00 Nagorny, Dimitry :

> Hi Dragomir,
>
>
>
> If I understand your lines correct the *trace_id* should read like
> modparam("siptrace","db_url","mysql://name:passwd@localhost/opensips;table=sip_trace;"),
> but not sure.
> See http://www.opensips.org/html/docs/modules/2.1.x/siptrace.html  for
> further reference.
>
>
>
>
>
> Best Regards
>
> *Dimitry Nagorny*
>
> Trainee
>
>
>
> *Von:* users-boun...@lists.opensips.org [mailto:
> users-boun...@lists.opensips.org] *Im Auftrag von *Dragomir Haralambiev
> *Gesendet:* Mittwoch, 16. März 2016 10:04
> *An:* OpenSIPS users mailling list 
> *Betreff:* [OpenSIPS-Users] siptrace problem
>
>
>
> Hello,
>
>
>
> I try to add siptrace in my system.
>
>
>
> I make follow:
> git pull
> make proper
> make all
> make install
>
> in script put follow lines :
>
> modparam("siptrace", "trace_id","[tid]uri=mysql://name:passwd@localhost
> /opensips;table=sip_trace;")
>
> modparam("siptrace", "trace_on", 1)
>
>
>
> I receive follow error:
> Parameter  not found in module  - can't set
>
>
>
> Where is problem?
>
>
>
> Best regards,
>
> Dragomir
>
> ___
> 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


Re: [OpenSIPS-Users] siptrace problem

2016-03-16 Thread Nagorny, Dimitry
Hi Dragomir,

If I understand your lines correct the trace_id should read like 
modparam("siptrace","db_url","mysql://name:passwd@localhost/opensips;table=sip_trace;"),
 but not sure.
See http://www.opensips.org/html/docs/modules/2.1.x/siptrace.html  for further 
reference.


Best Regards
Dimitry Nagorny
Trainee

Von: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] 
Im Auftrag von Dragomir Haralambiev
Gesendet: Mittwoch, 16. März 2016 10:04
An: OpenSIPS users mailling list 
Betreff: [OpenSIPS-Users] siptrace problem

Hello,

I try to add siptrace in my system.

I make follow:
git pull
make proper
make all
make install

in script put follow lines :
modparam("siptrace", 
"trace_id","[tid]uri=mysql://name:passwd@localhost/opensips;table=sip_trace;")
modparam("siptrace", "trace_on", 1)

I receive follow error:
Parameter  not found in module  - can't set

Where is problem?

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


[OpenSIPS-Users] siptrace problem

2016-03-16 Thread Dragomir Haralambiev
Hello,

I try to add siptrace in my system.

I make follow:
git pull
make proper
make all
make install

in script put follow lines :
modparam("siptrace", "trace_id","[tid]uri=mysql://name:passwd@localhost
/opensips;table=sip_trace;")
modparam("siptrace", "trace_on", 1)

I receive follow error:
Parameter  not found in module  - can't set

Where is problem?

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


Re: [OpenSIPS-Users] Script execution hanging

2016-03-16 Thread Liviu Chircu

Hi Koce,

Does the first async rest_post() finish successfully by having its 
resume route run? Could you please add some xlog() debugging prints, so 
we can better understand where it gets stuck exactly?


Also, do you notice this behaviour with any HTTP server (100% 
reproducible), or is it a timing corner-case of your scenario?


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

On 14.03.2016 23:16, Koce wrote:
Hello I'm using Opensips 2.1 git version and when I try to execute the 
outline from the routing logic below I get Opensips hanging on 
route(CGR_LCR_REQ) when it finishes executing.What I'm trying to say 
is it hangs on that particular line as it is expecting something.
So I'm wondering if I need to do a return on the end of that chained 
routing block?
Also is there some kind of depth limit that Opensips can go in the 
routing route calling logic where it can't find it's way back,because 
If I comment out route(CGR_LCR_REQ) everything continues execution as 
planned?

##
if (is_method("INVITE")) {
  sl_send_reply("100", "-Trying-");
  xlog("L_INFO", "LOOKUPLOCATION_INVITE: [F=$fu R=$ru D=$du M=$rm 
IP=($si:$sp $Ri:$Rp) ID=$ci]");

  if ($rU=~"(\+|00)?[0-9]{4,15}") {#PSTN LOGIC
route(PSTN);
xlog("L_INFO", "PSTN_PROCESSED_INVITE: [F=$fu R=$ru D=$du M=$rm 
IP=($si:$sp $Ri:$Rp) ID=$ci]");

  }
#rest of is_method("INVITE") route logic
##
route[PSTN]{
  route(CGR_LCR_REQ); #hanging
#rest of PSTN route logic
}

route[CGR_LCR_REQ]{
#var assignment and route logic
async(rest_post(),,,CGR_LCR_REPLY)
}

route[CGR_LCR_REPLY]{
#route logic and var assignment
async(rest_post(),,,CLI-REQ)
}
#and a few more route blocks calling async as outlined between 
CGR_LCR_REQ and CGR_LCR_REPLY




___
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] Fraud_module

2016-03-16 Thread Denis
Hello!

I am testing Fraud_detection on Opensips 2.1

1) I noticed an Opensips crash after fifo fraud_relaod. GDB from core in 
attachment. 
2) In the log file i can see such messages "CRITICAL:core:sig_alarm_abort: BUG 
- shutdown timeout triggered, dying..."
3) Fraud detection doesn`t work because it shows "code 1" of check_fraud 
function during every call, although the function exports event 
"E_FRD_CRITICAL".

| ruleid | profileid | prefix | start_hour | end_hour | daysoftheweek | 
cpm_warning | cpm_critical | call_duration_warning | call_duration_critical | 
total_calls_warning | total_calls_critical | concurrent_calls_warning | 
concurrent_calls_critical | sequential_calls_warning | 
sequential_calls_critical |
++---+++--+---+-+--+---++-+--+--+---+--+---+
|  1 | 1 | 8812   | 00:00  | 23:59| Mon-Fri   | 
  2 |   30 | 1 |  2 |   
3 |5 |1 |   
  2 |3 | 4 |

I made more than 5 calls but there is no "code -2" detected.

Thank you for any help.

mailto:denis7...@mail.ru gdb /usr/local/opensips2.1/sbin/opensips /opensipscore/core
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/local/opensips2.1/sbin/opensips...done.
[New LWP 7217]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/local/opensips2.1/sbin/opensips -P 
/sock/opensips.pid -u opensips -w /open'.
Program terminated with signal SIGABRT, Aborted.
#0  0x7f4cf2e27cc9 in __GI_raise (sig=sig@entry=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:56
56  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt full
#0  0x7f4cf2e27cc9 in __GI_raise (sig=sig@entry=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:56
resultvar = 0
pid = 7217
selftid = 7217
#1  0x7f4cf2e2b0d8 in __GI_abort () at abort.c:89
save_stage = 2
act = {__sigaction_handler = {sa_handler = 0x8, sa_sigaction = 0x8}, 
sa_mask = {__val = {64, 2000277491456, 139968477283671, 5, 0, 0, 
139968468974888, 1190321981, 2000277491456,
  1189216652, 139968477312277, 1, 139968469976411, 0, 0, 
139968472872800}}, sa_flags = 0, sa_restorer = 0x0}
sigs = {__val = {32, 0 }}
#2  0x0044459b in sig_alarm_abort (signo=) at main.c:403
__FUNCTION__ = "sig_alarm_abort"
#3  
No locals.
#4  0x0050d249 in fm_status (qm=0x7f4cad2c7000) at mem/f_malloc.c:620
f = 0x7f4cb3f20d30
i = 1190321981
j = 1189216652
h = 8
unused = 0
size = 2000277491456
__FUNCTION__ = "fm_status"
#5  0x00444980 in shm_status () at mem/shm_mem.h:434
No locals.
#6  cleanup (show_status=show_status@entry=1) at main.c:337
__FUNCTION__ = "cleanup"
#7  0x0044530f in handle_sigs () at main.c:445
chld = 
chld_status = 0
overall_status = 0
i = 
do_exit = 
__FUNCTION__ = "handle_sigs"
#8  0x00419aff in main_loop () at main.c:765
startup_done = 
chd_rank = 16
#9  main (argc=, argv=) at main.c:1280
cfg_log_stderr = 
cfg_stream = 
c = 
r = 
tmp = 0x7fff6ab20852 ""
tmp_len = 
port = 
proto = 
options = 0x5c7be0 "f:cCm:M:b:l:n:N:rRvdDFETSVhw:t:u:g:P:G:W:o:"
seed = 3049959710
__FUNCTION__ = "main"
(gdb)
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users