Re: [SR-Users] auth by IP

2019-04-19 Thread Yu Boot

I mean auth, not registration. Anyway this works as I've wanted:

  if(!allow_source_address() && $au==$null)
    {
    sl_send_reply("403","Go away!");
    exit;
    }



19.04.2019 12:19, Daniel Tryba пишет:

This code is in no way related to registrations.


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] auth by IP

2019-04-19 Thread Yu Boot
Added this before final "return", it still allow to call from any IP 
without registration. :(


19.04.2019 11:22, Daniel Tryba пишет:

if(!allow_source_address() || $au==$null)
{
sl_send_reply("403","Go away!");
}


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] auth by IP

2019-04-19 Thread Yu Boot
Following code snippet from default kamailio.cfg never gives 403 if you 
smart enough to set "fromdomain" parameter on Asterisk to Kamailio's IP. 
How to fix it? I want password-based registration (which is OK now) and 
permit calls via Kamailio only from permitted IPs.



    # if caller is not local subscriber, then check if it calls
    # a local destination, otherwise deny, not an open relay here
    if (from_uri!=myself && uri!=myself) {
    sl_send_reply("403","Not relaying");
    exit;
    }


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio and CDR

2019-04-10 Thread Yu Boot

Thanks you!

10.04.2019 10:28, Jan-Hendrik Dörner пишет:

Hello,

i was working on a similar problem. I followed the acc-dialog -> 
(r)syslog approach.
In rsyslog I piped the message to a script, which appends the message 
as a xml-record to a file in "/var/log/kamailio-call.log“.

(This script might be useful for you to adapt to your needs.)

module(load="omprog“)
local6.* action(type="omprog" binary="/etc/rsyslog-cdr-script.sh")

and my script looks like

#! /bin/ash
Log=/var/log/kamailio-call.log
read fromstdin;
while read fromstdin; do
 echo $fromstdin | sed -e "s/^[^;]* \(.*=\)/\1/" -e 
"s/\(time=[0-9]*\)\.[0-9]*/\1/g" -e "s/\([^=;]*\)=\([^;]*\(;[^ 
][^=]*=[^;]*\)*\); / <\1>\2<\/\1>; /g" -e "s/ \([^=;]*\)=\([^;]*\(;[^ 
][^=]*=[^;]*\)*\)$/ <\1>\2<\/\1>/" | awk 'BEGIN {FS=";"; printf 
""} { i = 1; while(i < NF){if(index($i,"time>")>0) { time_value 
= $i; gsub("<[^>]*>","",time_value); sub(">[^<]*", 
strftime(">%Y-%m-%dT%H:%M:%S", time_value), $i); } printf $i;  i = 
i+1;} } END {print ""}' >> $Log

done

Here a little explanation that might be helpful to understand the 
commands:

The sed-command
*) removes the front syslog-stuff
*) trunks all the post dot digit from any entry that names ends with 
„time" and

*) converts it to xml-syntax (one extra for the last entry)

The awk command converts the (trunked) timestamps into a 
"human-readable“ format and adds the enclosing „call“ syntax.
(If you exactly know what your syslog entry syntax is, you might 
simplify the script statements a lot … )


I hope this helps a little.

Regards
Jan-Hendrik


Am 07.04.2019 um 12:42 schrieb Henning Westerholt <mailto:h...@skalatan.de>>:


Hello,

some starting points:

- use dlg_manage() or set a dialog flag in the cfg to start dialog 
tracking


- setup the dialog event routes (section 11 in README) and put your
logging logic there

Best regards,

Henning

Am 06.04.19 um 11:29 schrieb Yu Boot:

How to make something on dialog event? Just can't figure it out after
reading module docs :(


06.04.2019 2:09, David Villasmil пишет:

You can always export the cdr table periodically.
Take a look at siremis. And when the trigger fires every 5 minutes to
create the cdrs, just export them.


Also, as it’s been said, you can use the dialog and when the call
ends gather all the info and just print it out. You can direct it to
rsyslog to save it anywhere you want.



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://skalatan.de/services

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio and CDR

2019-04-06 Thread Yu Boot
How to make something on dialog event? Just can't figure it out after 
reading module docs :(



06.04.2019 2:09, David Villasmil пишет:

You can always export the cdr table periodically.
Take a look at siremis. And when the trigger fires every 5 minutes to 
create the cdrs, just export them.



Also, as it’s been said, you can use the dialog and when the call ends 
gather all the info and just print it out. You can direct it to 
rsyslog to save it anywhere you want.




___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio and CDR

2019-04-04 Thread Yu Boot
Anyone? I can't believe that nobody of Kami users don't have these 
problems with CDR.



03.04.2019 16:03, Yu Boot пишет:

You didn't catch my idea. Here's what Kami writes to syslog:


 NOTICE: acc [acc_cdr.c:352]: log_write_cdr(): 
start_time=1554295999.014; end_time=1554296092.164; duration=93.150; 
src_user=4956885645; src_domain=65.181.181.218; src_ip=65.181.181.218; 
dst_ouser=9956885645; dst_user=6004440; dst_domain=181.188.186.32



1. I want to get rid from junk in beginning of CDR string, and 
ideally, remove params names.


2. I want end_time in human-readable format

3 and last little problem - I want call duration will be always integer.

Is anything of it attainable with Kami? These CDRs issues is a last 
thing that keep me from using Kami instead of Yate as a SBC.



03.04.2019 15:43, Daniel-Constantin Mierla пишет:

You can direct the syslog messages printed by acc module by setting the
parameter:

   -
https://www.kamailio.org/docs/modules/5.2.x/modules/acc.html#acc.p.log_facility 



to a specific value and then configure the syslog application to write
the messages with that facility to a specific file. In this way you can
get acc records in a dedicated file, not together with the rest of logs
printed by kamailio. See also:

   - https://www.kamailio.org/wiki/tutorials/3.2.x/syslog

You can also look at acc_json, you can construct a way to push the acc
records to your own backend where you can do whatever suits better for
your needs.

Cheers,
Daniel

On 03.04.19 14:31, Yu Boot wrote:

Thanks for a reply


I need CDR easily "greppable", so it must be in regular text file.
Very easy to parse, generate stats, and again, it can be "tail-f'ed".

And I want time in human readable format.

Now iI use acc/dialog, result is horrible syslog output which is 50%
meaningless syslog stuff.


Show me right way. Or "Kamailio-way" to get CDR.


03.04.2019 15:01, Daniel-Constantin Mierla пишет:

The dialog+acc can also write the cdrs to database, afaik. If
documentation says different, maybe it was forgotten to be updated.

Or you look for something different than using dialog+acc?

Cheers,
Daniel

On 03.04.19 13:27, Yu Boot wrote:

Is there any other way to retrieve CDRs from Kami other than
dialog/acc modules and writing CDRs to syslog only?


Thanks.


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio and CDR

2019-04-03 Thread Yu Boot

You didn't catch my idea. Here's what Kami writes to syslog:


 NOTICE: acc [acc_cdr.c:352]: log_write_cdr(): 
start_time=1554295999.014; end_time=1554296092.164; duration=93.150; 
src_user=4956885645; src_domain=65.181.181.218; src_ip=65.181.181.218; 
dst_ouser=9956885645; dst_user=6004440; dst_domain=181.188.186.32



1. I want to get rid from junk in beginning of CDR string, and ideally, 
remove params names.


2. I want end_time in human-readable format

3 and last little problem - I want call duration will be always integer.

Is anything of it attainable with Kami? These CDRs issues is a last 
thing that keep me from using Kami instead of Yate as a SBC.



03.04.2019 15:43, Daniel-Constantin Mierla пишет:

You can direct the syslog messages printed by acc module by setting the
parameter:

   -
https://www.kamailio.org/docs/modules/5.2.x/modules/acc.html#acc.p.log_facility

to a specific value and then configure the syslog application to write
the messages with that facility to a specific file. In this way you can
get acc records in a dedicated file, not together with the rest of logs
printed by kamailio. See also:

   - https://www.kamailio.org/wiki/tutorials/3.2.x/syslog

You can also look at acc_json, you can construct a way to push the acc
records to your own backend where you can do whatever suits better for
your needs.

Cheers,
Daniel

On 03.04.19 14:31, Yu Boot wrote:

Thanks for a reply


I need CDR easily "greppable", so it must be in regular text file.
Very easy to parse, generate stats, and again, it can be "tail-f'ed".

And I want time in human readable format.

Now iI use acc/dialog, result is horrible syslog output which is 50%
meaningless syslog stuff.


Show me right way. Or "Kamailio-way" to get CDR.


03.04.2019 15:01, Daniel-Constantin Mierla пишет:

The dialog+acc can also write the cdrs to database, afaik. If
documentation says different, maybe it was forgotten to be updated.

Or you look for something different than using dialog+acc?

Cheers,
Daniel

On 03.04.19 13:27, Yu Boot wrote:

Is there any other way to retrieve CDRs from Kami other than
dialog/acc modules and writing CDRs to syslog only?


Thanks.


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio and CDR

2019-04-03 Thread Yu Boot

Thanks for a reply


I need CDR easily "greppable", so it must be in regular text file. Very 
easy to parse, generate stats, and again, it can be "tail-f'ed".


And I want time in human readable format.

Now iI use acc/dialog, result is horrible syslog output which is 50% 
meaningless syslog stuff.



Show me right way. Or "Kamailio-way" to get CDR.


03.04.2019 15:01, Daniel-Constantin Mierla пишет:

The dialog+acc can also write the cdrs to database, afaik. If
documentation says different, maybe it was forgotten to be updated.

Or you look for something different than using dialog+acc?

Cheers,
Daniel

On 03.04.19 13:27, Yu Boot wrote:

Is there any other way to retrieve CDRs from Kami other than
dialog/acc modules and writing CDRs to syslog only?


Thanks.


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Kamailio and CDR

2019-04-03 Thread Yu Boot


Is there any other way to retrieve CDRs from Kami other than dialog/acc 
modules and writing CDRs to syslog only?



Thanks.


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Questions

2018-10-29 Thread Yu Boot
I will sell my soul to the devil for correct work of Kami in bridge mode 
with 100% working fax. :) Maybe someone spare working fax configuration 
with Kami and bridged rtpproxy? I can't understand, why fax are OK whan 
Kami bridges it from SIP to E1 via Mediant and can't passthrough fax 
with any other working solutions like Yate or FreeSwitch.



26.10.2018 9:32, YAS0 CANER пишет:


Hello Yu,


it isnt related but  i couldnt install rtpengine on Centos(6.X or 7.X) 
because when start rtpengine or restart system , network interfaces 
are disappeared.


In addition , i think rtpproxy doesnt support T.38. Because i tried 
and asked on google group about T.38 , there isnt any answer. you can 
use FreeSwitch (FS) or Asterisk for T.38 . i tried with Asterisk and 
it works (%80) but there isnt any experience about FS .




Fax issue is really hard to solve on Voip. There is a lot of node to 
solve. Clients and Servers are is hard to configure.



Good luck 


Yasin CANER






*From:* sr-users  on behalf of Yu 
Boot 

*Sent:* Friday, October 26, 2018 9:20 AM
*To:* sr-users@lists.kamailio.org
*Subject:* [SR-Users] Questions
Hello.

Have a following auestions on Kami 4.4.7. Centos 6.9

1. Dialog modules stores entire dialog data in SQL. When I do "kamctl
restart", dialog data is still on SQL, but dialog module ignores it and
start new dialog. I've expeced previous dialog will be catched up and
contonue and finally write CDR. What can it be?

I use rtpproxy from git, in bridge mode (maybe I'm stupid but I can't
build rtpengine on Centos). When I forword call to Mediant (E1-SIP
gateway), T.38 fax is going OK. When I try to route it for 100% working
softswitch, remote drops call immediatly with BYE or I see in sngrep
endless INVITE exchange and then hangup. Help me please with this.

I can provide full kamailio.cfg as well as any log files.

Thanks!

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
sr-users -- Kamailio (SER) - Users Mailing List 
<https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users>

lists.kamailio.org
Kamailio Users Mailing list - online email forum for communities of 
Kamailio (OpenSER) and SIP Express Router (SER) projects. Subscription 
is open to anyone that wants to join, the topics should be related to 
stable versions and general community discussions.






___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Questions

2018-10-26 Thread Yu Boot

Hello.

Have a following auestions on Kami 4.4.7. Centos 6.9

1. Dialog modules stores entire dialog data in SQL. When I do "kamctl 
restart", dialog data is still on SQL, but dialog module ignores it and 
start new dialog. I've expeced previous dialog will be catched up and 
contonue and finally write CDR. What can it be?


I use rtpproxy from git, in bridge mode (maybe I'm stupid but I can't 
build rtpengine on Centos). When I forword call to Mediant (E1-SIP 
gateway), T.38 fax is going OK. When I try to route it for 100% working 
softswitch, remote drops call immediatly with BYE or I see in sngrep 
endless INVITE exchange and then hangup. Help me please with this.


I can provide full kamailio.cfg as well as any log files.

Thanks!

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio as SBC

2018-10-22 Thread Yu Boot
I can help you with cfg, if you 're ready to implement standalone 
softswitch on your Kamailio :)



22.10.2018 17:21, Ellad Yatsko пишет:

May you help?.. :-)

Kind regards,
Ellad

22.10.2018 17:12, Alex Balashov пишет:

I did not say that my article represents a complete answer to every part
of every one of your questions, at every level of abstraction and
specificity. Just that it might be helpful. :-)

On Mon, Oct 22, 2018 at 04:40:03PM +0300, Ellad Yatsko wrote:


Dear Alex,

your article is just "general words". :-) There is a couple of questions:

   - can my "vision" be completed?
   - how can it be implemented?

The major problem as I see is to modify algorithm so Kamailio will not check
database but will lean on answers of its upstream to generate
UL. It should not BALANCE, just forward SIP traffic, ANALYZE answers of
Upstream
SIP-Server, make decision about attacks and PROXY RTP. It should be more
clear
definition what I would like to achieve.

I could be confused about exact terminology of "Session Border Controller".
But I'd like to implement FRAUD/BruteForce protection of my Asterisk using
Kamailio (in the middle) because I heard it highly effective in the point
of view of heavy loads. Asterisk might not bear a "tons" of SIP requests
(dialogs).



Kind regards,
Ellad


22.10.2018 12:07, Alex Balashov пишет:

I hate to plug my own articles, but in this case it might help:

http://www.evaristesys.com/blog/kamailio-as-an-sbc-five-years-on/

--
Sent from mobile. Apologies for brevity and errors.

-Original Message-
From: Ellad Yatsko 
To: sr-users@lists.kamailio.org
Sent: Mon, 22 Oct 2018 3:28 AM
Subject: [SR-Users] Kamailio as SBC

Hello!

I'd like to implement the following diagram:

  Users  -> Internet -> Kamailio -> Asterisk

1. Kamailio has no own users, it just re-writes headers and re-send
REGISTER messages to Asterisk where usres are located.

2. Depending on Astersisk's answers Kamailio either form UL (using
original IP from the first, original REGISTER from Users) or translates
Asterisk's answer back to Users. If it is error (e.g.
forbidden/notfound) Kamailio blocks User's IP (for instance using pike
module) and Fail2Ban adds affected IP into IPSet's List to block it by
IPTables Permanently.

3. INVITEs are translated to Asterisk as to the only Upstream
SIP-Server. And again Errors from Asterisk are processed in the same way
as Bad REGISTERs. Pike in conjunction with IPSet/IPTables block affected
IPs.

4. Astersisk sees all registrations from Internet user as they are
directly behind Kamailio. Kamailio rewirtes headers twice: from Users to
Asterisk and from Asterisk to Users - this allows to hide topology from
users (they deal ONLY with Kamailio) and block non-static IPs on the
Asterisk's side.

Is this possible?

Kind regards,
Ellad Yatsko





___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] rtpproxy or rtpengine with Kamailio and Asterisk

2018-08-14 Thread Yu Boot
I've tested Kamailio+rtpproxy as a simple softswitch in many 
configurations including (something)<->Kamailio<->Asterisk. With single 
interface mode of rtpproxy, it works perfectly.


Send your kamailio.cfg, sip.conf and describe your network topology with 
Kamailio and Asterisk machines. Maybe you need to run rtpproxy in bridge 
mode, maybe you need to change something in NATDETECT/NATMANAGE routes. 
Dump SIP messages with SDP at Kamailio side also will be useful.



14.08.2018 13:30, Wilkins, Steve пишет:


Good Morning everyone,

Has anyone ever gotten rtpproxy/rtpengine to work with Kamailio and 
Asterisk?


I have tried both, and even though I see no errors with either, and 
when I make calls I see rtpproxy/rtpengine traffic, I am still seeing 
media traffic go directly to and from Asterisk.  I just can’t get the 
media packets to not go directly from Asterisk to the Callee and 
visa-versa.


Any ideas on where I am messing up in my kamalio.cfg file?




___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Rtpengine?

2018-08-14 Thread Yu Boot

Hello.

It's not enough to install rtpproxy/rtpengine and start it. You need to 
call rtpengine functions from kamailio.cfg for every SIP packet with SDP 
so media will be routed "thru Kamailio".


To make it easier, I recommend to begin with rtpproxy, not rtpengine. 
Default kamailio.cfg contains everything you need to proxy media flow by 
rtpproxy, just enable WITH_NAT parameter.




14.08.2018 1:51, Wilkins, Steve пишет:


HI All,

I am not sure if I understand it correctly but I thought that I could 
use rtpengine to redirect media packets.  My current SIP flow is =>


Softphone=>Kamailio=>Asterisk=>Kamailio=>Softphone, and Media flows 
from is Asteriskósoftphone. But I don’t want Media to flow this way.


That is, I do not want Asterisk and the Softphone to be aware of each 
other. I would like the Media to go through Kamailio just like SIP 
packets do.


I installed rtpengine and it starts and runs with no errors.  I even 
see traffic with the call is made but media traffic still flows from 
softphoneóasterisk.





___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Module RTPPROXY param Timeout_Socket not Working

2018-07-23 Thread Yu Boot

Hello.


AFAIK rtpproxy timeout socket requires very special version of rtpproxy 
itself and a patch. Personally, I've gived up to make this feature work.



Now I use dialog-based keepalives to detect and tear down dead sessions.




23.07.2018 9:42, Hamid Hashmi пишет:

waiting for suggestions.

Regards


*Hamid R. Hashmi*

__

www.hrhashmi.blogspot.com 

Mobile: +92 300 968 22 85 ; +92 322 636 32 66
Email: hamid.hashmi...@gmail.com 
; _hamid2kviii@hotmail.com_


Sype: _hamidrhashmi_


*From:* Hamid Hashmi 
*Sent:* Thursday, July 19, 2018 1:05 PM
*To:* Hamid Hashmi; Kamailio (SER) - Users Mailing List
*Subject:* Re: Module RTPPROXY param Timeout_Socket not Working
I started the RTPproxy with the following command.

|/usr/bin/rtpproxy -u root -A [PUBLIC IP] -F -f -T 45 -i -2 -l 
192.168.3.22 -b -m 35000 -M 65000 -s udp:127.0.0.1:7722 -n 
tcp:127.0.0.1:8000 -d DBUG|



Regards


*Hamid R. Hashmi*

__

www.hrhashmi.blogspot.com 

Mobile: +92 300 968 22 85 ; +92 322 636 32 66
Email: hamid.hashmi...@gmail.com 
; _hamid2kviii@hotmail.com_


Sype: _hamidrhashmi_


*From:* sr-users  on behalf of 
Hamid Hashmi 

*Sent:* Thursday, July 19, 2018 12:59 PM
*To:* sr-users@lists.kamailio.org
*Subject:* [SR-Users] Module RTPPROXY param Timeout_Socket not Working

Kamailio didn't start listening on IP mentioned in Module RTPPROXY 
parameterTimeout_Socket 
.


Below is my configuration file.

|
|loadmodule "rtpproxy.so" modparam("rtpproxy", "rtpproxy_sock", 
"udp:127.0.0.1:7722") modparam("rtpproxy", "rtpproxy_tout", 1) 
modparam("rtpproxy", "rtpproxy_retr", 2) modparam("rtpproxy", 
"timeout_socket", "xmlrpc:http://127.0.0.1:8000/RPC2;) loadmodule 
"xmlrpc.so" modparam("xmlrpc", "route", "XMLRPC"); modparam("xmlrpc", 
"mode", 1) modparam("xmlrpc", "url_match", "^/RPC2")|

|

when I type a command

|$ netstat -nlp|

it only shows SIP listening ports. Kamailio should also start 
listening on|127.0.0.1:8000.|



 Below are the RTPproxy logs, *RTPproxy is also unable to bridge the 
media*


|DBUG:get_command:GLOBAL: received command "19083_4 Uc120,101 
9a1060af660d4202976c419ab5300470 58.65.176.42 4000 
1ea06d1eb0a8443697a08e568045598c;1" 
INFO:rtpp_command_ul_handle:GLOBAL: new session 
9a1060af660d4202976c419ab5300470, tag 
1ea06d1eb0a8443697a08e568045598c;1 requested, type strong 
INFO:rtpp_command_ul_handle:9a1060af660d4202976c419ab5300470: new 
session on a port 35012 created, tag 
1ea06d1eb0a8443697a08e568045598c;1 
INFO:rtpp_command_ul_handle:9a1060af660d4202976c419ab5300470: 
pre-filling caller's address with 58.65.176.42:4000 
DBUG:rtpc_doreply:GLOBAL: sending reply "35012 51.38.201.3 " 
DBUG:get_command:GLOBAL: received command "19083_5 Uc120,101 
9a1060af660d4202976c419ab5300470 58.65.176.42 4022 
9RPsEBbcZSA23MmWAw0hfXzJ-bG1GYDq;1 1ea06d1eb0a8443697a08e568045598c;1 
xmlrpc:http://127.0.0.1:8000/RPC2; INFO:rtpp_command_ul_handle:GLOBAL: 
new session 9a1060af660d4202976c419ab5300470, tag 
9RPsEBbcZSA23MmWAw0hfXzJ-bG1GYDq;1 requested, type strong 
INFO:rtpp_command_ul_handle:9a1060af660d4202976c419ab5300470: new 
session on a port 35014 created, tag 
9RPsEBbcZSA23MmWAw0hfXzJ-bG1GYDq;1 
ERR:rtpp_command_ul_handle:9a1060af660d4202976c419ab5300470: *invalid 
socket name 1ea06d1eb0a8443697a08e568045598c;1* 
INFO:rtpp_command_ul_handle:9a1060af660d4202976c419ab5300470: 
pre-filling caller's address with 58.65.176.42:4022 
DBUG:rtpc_doreply:GLOBAL: sending reply "35014 51.38.201.3 " 
DBUG:get_command:GLOBAL: received command "19086_4 D 
9a1060af660d4202976c419ab5300470 9RPsEBbcZSA23MmWAw0hfXzJ-bG1GYDq 
1ea06d1eb0a8443697a08e568045598c" 
INFO:handle_delete:9a1060af660d4202976c419ab5300470: forcefully 
deleting session 1 on ports 35012/0 
INFO:remove_session:9a1060af660d4202976c419ab5300470: RTP stats: 0 in 
from callee, 0 in from caller, 0 relayed, 0 dropped 
INFO:remove_session:9a1060af660d4202976c419ab5300470: RTCP stats: 0 in 
from callee, 0 in from caller, 0 relayed, 0 dropped 
INFO:remove_session:9a1060af660d4202976c419ab5300470: session on ports 
35012/0 is cleaned up 
INFO:handle_delete:9a1060af660d4202976c419ab5300470: forcefully 
deleting session 1 on ports 35014/0 
INFO:remove_session:9a1060af660d4202976c419ab5300470: RTP stats: 0 in 
from callee, 0 in from caller, 0 relayed, 0 dropped 
INFO:remove_session:9a1060af660d4202976c419ab5300470: RTCP stats: 0 in 
from callee, 0 in from caller, 0 relayed, 0 dropped 
INFO:remove_session:9a1060af660d4202976c419ab5300470: session on ports 
35014/0 is cleaned up DBUG:rtpc_doreply:GLOBAL: sending reply "0 " 
DBUG:get_command:GLOBAL: received command 

[SR-Users] Keep dialog info on Kamailio restart?

2018-07-17 Thread Yu Boot
Hello. I want that all dialog- and acc- related stuff were saved on 
kamailio restart and then on Kamailio startup was loaded from SQL tables.



dialog settings:

modparam("dialog", "db_url", DBURL)
modparam("dialog", "db_mode", 1)
modparam("dialog", "dlg_flag", 4)
modparam("dialog", "dlg_match_mode", 1)
modparam("dialog", "profiles_with_value", "limithash ; caller")
modparam("dialog", "ka_timer", 10)
modparam("dialog", "ka_interval", 30)
modparam("dialog", "send_bye", 1)
modparam("dialog", "wait_ack", 1)


1. I dial from one number to another. There are records in dialog and 
dialog_var tables. OK


2. "kamctl restart". Call keeps staying online, OK.

3. Related dialog and dialog_var data are all in place in SQL. OK

4. Finally I drop a call.

5. And there is no CDR record at all!!!

What's wrong? What can it be? Maybe there's some special fuction to load 
dialog data back from SQL to memory to continue dialog tracking?



Thanks.



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Convert 183+SDP and 180+SDP into a single reply w/SDP

2018-07-16 Thread Yu Boot

Thanks for advice.

I simplify my task a bit by just pass only first 183/180 answer and then 
drop everything else. Seems to work properly.




16.07.2018 10:30, Daniel-Constantin Mierla пишет:


Hello,

if you define an onreply_route[x] to be executed for that invite 
transaction, you can execute 'drop' instead of 'exit' and the reply is 
not forwarded.


What is tricky is 'relay only last provisional' -- here you should 
define the rules specific for the device/your environment and decide 
when you need to drop or not -- message flags or htable can be options 
to save some states to track whether to drop or not.


Cheers,
Daniel



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Add custom parameter to From field

2018-02-21 Thread Yu Boot

Hello. My carrier requires something like this in From field:

From: 

How to add this parameter after "5060"?


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kami as NAT traversal + FS as media

2018-01-05 Thread Yu Boot
Thanks for an answer? but what I want to do (already done :)) is totally 
opposite to your solution.


The main thing I wanted, so I don't need to open 5060/UDP on FreeSwitch 
for (entire world), BUT at the same time АЫ should work with RTP traffic 
directly, no matter is it NATed UAC or not.


This kind of "NAT traversal" (call it RTP NAT traversal :)) and UAC 
registrar are on Kami side. FS is pure softswitch here.



What I did to perform this is replace
    rtpproxy_manage("co");

with

  fix_nated_sdp("10");

Now it works exactly as I wanted. Thanks for advice.


04.01.2018 12:42, Daniel-Constantin Mierla пишет:

Hello,


On 25.12.17 10:16, Yu Boot wrote:

Hello. I want to implement the following scheme:

Kami takes inbound call, replces SPD for correct NAT trversal and
forward that call to FS. Kami should NOT be in RTP stream. Is it
possible? Any advices?


Kamailio should not touch the SDP if it is not going to do the RTP
relaying with rtpengine or rtpproxy. Just leave it untouch, freeswitch
will handle what is needed in this regard.

What you have to do is to fix the signaling for nat traversal, which may
mean to use path module for handling registrations as well as doing
set_contact_alias() as well as handle_ruri_alias(), so you can route
requests within dialog.

Cheers,
Daniel




___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Best way to do routing against a list of gateways

2017-11-29 Thread Yu Boot

Hello.

Try carrierroute module. Use it with failure_route to iterate thru 
different gateways from database.



29.11.2017 14:29, voipspace voipspace пишет:

Hi
I want to build the following scenerio
There should be some sort of database table to hold a list of gateway 
entries with fields ip, prefix, and name/description.
It would be good to use exiting tables to use what is avaiable. Have 
been looking at the lcr and drouting tables
but it seems they are designed to choose automaticaly for you and not 
just returning data about specific entries.

Please suggest how I may archive the following
Kamailio will receive a request it will then send to another Kamailio 
redirect server.
The response from the redirect will have a sip header value holding 
the id/name of the gateway choosen.
I want Kamailio processing the reponse to use the gateway id/name to 
lookup on the table and access the full details

ip, prefix details.
This data can then be used to construct the relay parameter.
Regards


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Set timeout before 180/183 reply arrived

2017-10-27 Thread Yu Boot

Thanks!


27.10.2017 9:53, Alex Balashov пишет:

On Fri, Oct 27, 2017 at 09:44:55AM +0300, Yu Boot wrote:


Have a problem with some uplinks. They sometimes respond "100 Trying" on
initial INVITE and... that's all. A caller waits for about 30 seconds and
cancel a call deciding there's something wrong with our network. How to use
failure route when 180/183 answers don't arrive in 5 or 10 seconds after
INVITE?

Use t_set_fr() to set a timeout of 5 sec or whatever, then reset it
(e.g. t_reset_fr()) to a more reasonable default in an onreply_route
when a 18x reply is received.




___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Siremis - version from git don't work

2017-09-18 Thread Yu Boot
For now I can only parse text output with Ruby script. My PHP is too bad 
to integrate this into Siremis :(



18.09.2017 10:23, Daniel-Constantin Mierla пишет:

Great! Have you sorted out xmlrpc or jsonrpc?





___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Siremis - version from git don't work

2017-09-15 Thread Yu Boot

Thanks you, now it works


15.09.2017 17:49, Daniel-Constantin Mierla пишет:

You need xml rpc extension for php.

You may also consider using jsonrpc instead of xmlrpc.





___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Siremis - version from git don't work

2017-09-15 Thread Yu Boot
Thanks, now it is installed and working. But I can't use XMLRPC 
https://pastebin.com/uDxXeW52



15.09.2017 16:04, Daniel-Constantin Mierla пишет:

If you do not have a lot of data that needs to be recreated afterwards
(like a lot of admin users), then the simplest way is to delete (make a
backup before, just to be safe) and recreate it.

Otherwise, you should just update the paths and names in the tables with
references to the menu and modules.

The sip (kamailio) database should not be touched at all, just leave it
as it is.

In the installation wizard, select only the option to create and
populate siremis database, nothing for sip database.





___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Siremis - version from git don't work

2017-09-15 Thread Yu Boot

Thanks you for an answer.

Do I need to delete "siremis" db from mysql to install it?


15.09.2017 15:45, Daniel-Constantin Mierla пишет:

Hello,

you need to do a fresh installation when using git master branch,
including a reset of menu.





___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Siremis - version from git don't work

2017-09-15 Thread Yu Boot
Downloaded new Siremis version via "git clone" and replaced /var/www/ 
content by new files. Now any menu entry gives the following error:


https://pastebin.com/hV8ngRVx

If if copy old Siremis files back, everything works fine.


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dialog keep-alive don't work

2017-09-13 Thread Yu Boot
Timer works OK, now Kami sends BYE to both ends when one peer goes 
offline. Nice. But that dropped calls don't appear in CDR at all. How to 
fix it?



11.09.2017 11:26, Daniel-Constantin Mierla пишет:

you also need to set the KA property for src or dst:
   -
https://www.kamailio.org/docs/modules/stable/modules/dialog.html#dialog.f.dlg_set_property




___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dialog keep-alive don't work

2017-09-11 Thread Yu Boot

Thanks you so much :)


11.09.2017 11:26, Daniel-Constantin Mierla пишет:

you also need to set the KA property for src or dst:

   -
https://www.kamailio.org/docs/modules/stable/modules/dialog.html#dialog.f.dlg_set_property





___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Map Technique(Key value pair) in kamailio

2017-09-11 Thread Yu Boot

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


Re: [SR-Users] Map Technique(Key value pair) in kamailio

2017-09-11 Thread Yu Boot

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


[SR-Users] dialog keep-alive don't work

2017-09-08 Thread Yu Boot

Hello.

I'm using following dialog module settings:

modparam("dialog", "db_url", DBURL)
modparam("dialog", "db_mode", 1)
modparam("dialog", "dlg_flag", 4)
modparam("dialog", "dlg_match_mode", 1)
modparam("dialog", "profiles_with_value", "limithash ; caller")
modparam("dialog", "ka_timer", 10)
modparam("dialog", "ka_interval", 300)
modparam("dialog", "send_bye", 1)


and I expect some OPTIONS within dialogs. But that don't happen. I don't 
see any OPTIONS messages in sngrep in established calls. What's wrong? I 
call dlg_manage() right before main t_relay, everything including CDRs 
are working fine...



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] need some help about acc module

2017-09-08 Thread Yu Boot

Hello.

Take your accounting code for INVITE and copy and modify it like this:

    if (is_method("OPTIONS")) {
    setflag(FLT_ACC); # do accounting
    }



08.09.2017 8:30, Vidja Prashant пишет:


Hello,

I have some feature required changes in acc module.
In acc module we getting cdrs in database only which have
METHOD=INVITE
METHOD=BYE
but in my setup I also get
METHOD=OPTIONS
so I need this entry also in acc table in kamailio database.

so which changes i need to do in kamailio acc module or other..
my cdrs log I paste below which have mehod=options

"Sep 7 07:16:53 sip /usr/local/sbin/kamailio[29264]: NOTICE: acc 
[acc.c:317]: acc_log_request(): ACC: request accounted: 
timestamp=1504783013;method=OPTIONS;from_tag=eUC9UgGrD;to_tag=j90H6yy5pU6Xc;call_id=2xJd0KCt-P;code=200;reason=OK;calling=46566464645;called=you;egressIP=kamailio.org 
;src_ip=1.0.0.127;to=sip:+918866213...@sip.call.org 
;tag=j90H6yy5pU6Xc;from=sip:9188@localhost;contact=;pai=;uri=sip:y...@kamailio.org 
;onnet=0;rate=0.00033"


Thanks.. # #



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Carrierroute, uac_*, failure_route.

2017-09-04 Thread Yu Boot

Finally I've found dirty hack for that:

    remove_hf("From");
    insert_hf("From: sip:$fU@my_ip;tag=$fti\r\n");

instead of uac_replace_from()? and similiar for To.


So weird that such a simple option requires such hacks and can't be done 
using standard tools (or I've just overlooked them).



01.09.2017 8:59, ycaner пишет:

hello,
i route it another request route, for example.
In addition, i remember that there is only once can change from header or
uac module breaks from header. check headers please.

failroute{
route(changecli)
route(outcarrierroute)
route(relay)
}

route[changecli]
{

return
}

route[outcarrierroute]{

return
}

route[RELAY]{


}



--
Sent from: http://sip-router.1086192.n5.nabble.com/Users-f3.html

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Carrierroute, uac_*, failure_route.

2017-09-01 Thread Yu Boot
A trick to jump out of first failure route after first call attempt 
works, and now Kami permits to use uac* functions. But they don't work. 
From/To remains unchanged on second call.



01.09.2017 8:59, ycaner пишет:

hello,
i route it another request route, for example.
In addition, i remember that there is only once can change from header or
uac module breaks from header. check headers please.

failroute{
route(changecli)
route(outcarrierroute)
route(relay)
}

route[changecli]
{

return
}

route[outcarrierroute]{

return
}

route[RELAY]{


}



--
Sent from: http://sip-router.1086192.n5.nabble.com/Users-f3.html

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] rtpproxy rtp timeout

2017-08-23 Thread Yu Boot

Installed rtpproxy from GIT, timeout socket still don't work. Any ideas?

/usr/local/bin/rtpproxy -T 10 -F -l 1.2.3.4. -s udp:localhost:7722 -n 
tcp:127.0.0.1:5060 -d DBUG:LOCAL5


config:

modparam("rtpproxy", "rtpproxy_sock", "udp:127.0.0.1:7722")
modparam("rtpproxy", "timeout_socket", "xmlrpc:http://127.0.0.1:5060/RPC2;)



rtpproxy:

ERR:cULR7EBIz5qAzgRX3AFO3A..:rtpp_command_ul_handle: invalid socket name 
4e5f4725;1




And a strange thing - I can't find anything like "xmlrpc" both in 
rtpproxy man page and rtpproxy sources... Maybe some patch is required 
for that option?



22.08.2017 8:02, Maxim Sobolev пишет:

Hi. 2.1 is the version we recommend using.

-Max

On Aug 21, 2017 1:22 PM, > wrote:

Hello.

What version of rtpproxy app should be used for this feature to
work with Kami? How to use it correctly?

--
Отправлено из myMail для Android


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org 
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users




___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] dp_translate_cr_route, R-URI

2017-08-22 Thread Yu Boot

Hello.

#cut off prefix "9"

    dp_translate("1");
...

#searching in db by called number without prefix...

 if(!cr_route("default", "default", "$rU", "$rU", "call_id")){

...

and failing.


Is it normal behavior that cr_route "sees" original $rU even after 
dp_translate manipulations?



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Siremis - can't add carrier without prefix/suffix

2017-08-22 Thread Yu Boot

Oh, thanks you so much, it's exactly what I've wanted.


22.08.2017 9:25, Daniel-Constantin Mierla пишет:

Try with latest master, I changed corresponding Required flags for those
fields to N (no). Not being that familiar with carrierrroute module,
should other fields need something similar, you can change these flags
in the xml file - here is the path to online repo:

   -
https://github.com/asipto/siremis/blob/master/siremis/modules/sipadmin/rtg/carrierroute/do/CarrierrouteDO.xml

You can make pull requests on github and I will merge.





___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Siremis - can't add carrier without prefix/suffix

2017-08-21 Thread Yu Boot

Here is it: http://imgur.com/SrK1UO1


21.08.2017 8:27, Daniel-Constantin Mierla пишет:

Hello,

the link to screenshot does not show any image. Have you remove it?

Cheers,
Daniel


On 20.08.17 16:00, Yu Boot wrote:

Hello

Suddenly revealed that I can't add carriers without
rewrite_prefix/rewrite_suffix via Siremis. But I don't need these
fields! And kamctl adds these rules fine. What's a problem?

Screenshot with error http://tinypic.com/r/68v493/9


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Siremis - can't add carrier without prefix/suffix

2017-08-20 Thread Yu Boot

Hello

Suddenly revealed that I can't add carriers without 
rewrite_prefix/rewrite_suffix via Siremis. But I don't need these 
fields! And kamctl adds these rules fine. What's a problem?


Screenshot with error http://tinypic.com/r/68v493/9


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] syslog CDR time format

2017-08-18 Thread Yu Boot

Hello.

Can't get 'date-time' format timestamps in syslog CDRs, while SQL CDRs 
are OK.


According to acc module documentation:

modparam("acc", "cdr_enable", 1)
modparam("acc", "time_format", "%Y-%m-%d %H:%M:%S")
modparam("acc", "time_mode", 3)
modparam("acc", "cdr_facility", "LOG_DAEMON")

syslog:

NOTICE: acc [acc_cdr.c:352]: log_write_cdr(): start_time=1503068984.627; 
end_time=1503068991.250; duration=6.623; src_user=100; 
src_domain=a.b.c.d; src_ip=e.f.g.h; dst_ouser=200; dst_user=200; 
dst_domain=k.l.m.n



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Siremis Install: Unable to write in the session save path (CentOS 6)

2017-08-15 Thread Yu Boot

use following command:

chcon -t httpd_sys_content_t /var/www/html -R


or just disable SELinux globally


16.08.2017 0:34, Trent пишет:


Full error:   Unable to write in the session save path 
[/var/www/html/siremis/session]Unable to write in the session save 
path [/var/www/html/siremis/session]





___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] [Solved] Re: Reinvite, rewrite reply SDP?

2017-08-14 Thread Yu Boot

Gotcha!

Maybe it will be useful for someone.

Problem was that SDPs in reinvite sequence have already "nortpproxy=yes" 
flag set (from initial INVITE transaction I think), and SDP rewriting 
just don't triggers when it should. One little line has solved this issue:


modparam("rtpproxy", "nortpproxy_str", "")

Pretty dumb solution, but for now it finally works. Sorry for annoying :)


14.08.2017 12:55, Yu Boot пишет:

Finally I find a root of a problem with my T.38 reinvites.

A->(NAT)->Kami->PSTN

When NATted caller does reinvite, and remote side answers with 200 
OK+SDP,  Kami (why?) doesn't rewrite SDP for its own IP (so NATted 
caller can receive RTP) and leaves remote's IP as media address, so of 
course there is no RTP/UDPTL. All other NAT related stuff works fine. 
Even if remote side sends me T.38 reinvite first, everything works 
properly. Config file is default from Kami sources.





___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Reinvite, rewrite reply SDP?

2017-08-14 Thread Yu Boot

Finally I find a root of a problem with my T.38 reinvites.

A->(NAT)->Kami->PSTN

When NATted caller does reinvite, and remote side answers with 200 
OK+SDP,  Kami (why?) doesn't rewrite SDP for its own IP (so NATted 
caller can receive RTP) and leaves remote's IP as media address, so of 
course there is no RTP/UDPTL. All other NAT related stuff works fine. 
Even if remote side sends me T.38 reinvite first, everything works 
properly. Config file is default from Kami sources.


Any ideas?


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] [ *SPAM* 2.2 ] Re: "kamctl restart" fails

2017-08-09 Thread Yu Boot

# grep PID /etc/kamailio/kamctlrc
## PID file path - default is: /var/run/kamailio.pid
PID_FILE=/var/run/kamailio.pid

I've stopped Kami entirely, deleted that .pid. Now:

# kamctl restart

INFO: Stopping Kamailio :
INFO: stopped

INFO: Starting Kamailio :
 3069 pts/0S+ 0:00 /bin/egrep kamailio
-rw-r--r--. 1 kamailio kamailio 5 Aug  9 11:13 /var/run/kamailio.pid
INFO: PID file exists (/var/run/kamailio.pid)! Kamailio already running?


08.08.2017 12:30, David Villasmil пишет:
You need to configure kamctlrc properly, it probably doesn't know 
where the pid file is.


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] "kamctl restart" fails

2017-08-08 Thread Yu Boot

# kamctl restart

INFO: Stopping Kamailio :
INFO: stopped

INFO: Starting Kamailio :
 2292 pts/0S+ 0:00 /bin/egrep kamailio
-rw-r--r--. 1 kamailio kamailio 5 Aug  8 11:15 /var/run/kamailio.pid
INFO: PID file exists (/var/run/kamailio.pid)! Kamailio already running?


"service kamailio restart" works fine. What's wrong?

Centos 6.9 x64, Kamailio 4.3 installed from official repo.


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] carrierroute and failure route

2017-08-05 Thread Yu Boot
Gotcha! I've added fix_nated_contact() to [NATDETECT] route and now all 
messages UNTIL reinvite occurs are with correct NATed IP in "Contact" field.



Now I'm trying to make it work similiar way with reinvites. And I still 
don't understand, is default Kami config is somewhat broken or what.


route[NATDETECT] {
#!ifdef WITH_NAT
force_rport();
if (nat_uac_test("19")) {
if (is_method("REGISTER")) {
fix_nated_register();
} else {
if(is_first_hop())

#here we go

fix_nated_contact();

set_contact_alias();
}
setflag(FLT_NATS);
}
#!endif
return;
}



04.08.2017 16:27, Yu Boot пишет:
Played some time with sngrep and wireshark. All "working" solutions 
wors only with devices that ignore Contact and reply to Kami IP 
directly. Even with plain default kamailio.cfg relayed messages from 
NAtted device are with private address (and correct NATted alias) in 
Contact field. Is default cfg is broken? Kamailio 4.3



04.08.2017 15:26, Sebastian Damm пишет:

Hi,

On Fri, Aug 4, 2017 at 1:37 PM, Yu Boot <y...@yu-boot.ru> wrote:

Problem was magically solved by replacing t_relay in CR route by route
(RELAY) :)

Okay, the only thing route(RELAY) does more is set the reply route. So
maybe your replies were not correctly handled in first place. (And it
does take care of the dialog handling, but I don't know whether that's
important.)




___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] [ *SPAM* 5.1 ] Re: carrierroute and failure route

2017-08-04 Thread Yu Boot
Problem was magically solved by replacing t_relay in CR route by route 
(RELAY) :)


And finally a question. Can't find answer in Kami docs. What 
loose_route() proc actually does? Check some parameters, rewrite other 
parameters? I think real routing is performed by R-URI manipulations and 
t_relay to actually send created message, isn't it?



04.08.2017 13:26, Sebastian Damm пишет:

Hi,

On Thu, Aug 3, 2017 at 3:45 PM, Yu Boot <y...@yu-boot.ru> wrote:

I use this in WITHINDLG to handle reINVITEs

 else if ( is_method("INVITE") ) {
 record_route();

or T.38 fax behind NAT doesn't work at all.

Actually that shouldn't be the case. I know, T.38 needs a reINVITE,
too, but the record route information is supplied in the 200 OK. (If
it isn't than that's what's broken.) The route information doesn't
change with reINVITEs, so there's no need to record-route reINVITEs.

But if you really need the record-route there, then you need to call
set_contact_alias() in the reply to your reINVITE. So you might have
to add a different reply_route[reinvite] and set t_on_reply(reinvite)
in the WITHINDLG route. But I really think that's not necessary.

Sebastian

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] [ *SPAM* 5.1 ] Re: carrierroute and failure route

2017-08-03 Thread Yu Boot

I use this in WITHINDLG to handle reINVITEs

else if ( is_method("INVITE") ) {
record_route();

or T.38 fax behind NAT doesn't work at all.

03.08.2017 15:14, Sebastian Damm пишет:

Hi,

On Thu, Aug 3, 2017 at 12:48 PM, Yu Boot <y...@yu-boot.ru> wrote:

You should only call record_route() in the initial call setup, never
again after the 200 OK. Then you should be fine.




___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] T.38 fax, rtpproxy, re-invite

2017-08-02 Thread Yu Boot
Hello. I'm using almost default kamailio.cfg with nathelper, rtpproxy, 
PSTN dialing and other default features. I have following scheme:


FXS gateway -> (NAT) -> Kamailio -> FreeSwitch

Voice calls work perfectly, no one-direction sound and so on.


But with fax machine there was a problem. In wireshark I saw UDPTL from 
FS to Kamailio IP, and no UDPTL at all to FXS gw. I've guessed that 
something's wrong with a re-INVITE request processing in Kamailio. I've 
added this to WITHINDLG route:


else if ( is_method("INVITE") ) {
record_route();

}

And problem was magically solved, T.38 now works OK. Is this OK solution 
or this may break something elsewhere?



Thanks.


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] [ *SPAM* 2.0 ] Re: Kamailio CDR "best practices"

2017-08-02 Thread Yu Boot


31.07.2017 17:35, Daniel-Constantin Mierla пишет:


On 31.07.17 13:18, Yu Boot wrote:

How to make Kamailio write "normal" CDRs?

Can you provide more details about what you consider a 'normal' CDR? It
is hard to guess what you expect here.


Like Asterisk/FS/Yate one :)

sourceIP (detected with NAT), callerID number, destIP(detected with 
NAT), called number, startdate, starttime, duration, release_code







acc cdr module writes start time and end time in unixtime format, that
is very uncomfortable.

Which format would you consider more appropriate?


2017-08-02 09:52:43

It was my fault, I make respective field in SQL too short. with enough 
varchar() length CDR time-date looks exactly how I wanted.




You can get accounting records/cdrs into a syslog file, and you can
configure syslog daemon to write those into a dedicated file -- see the
readme of acc module for log facility as well as the manual of your
syslog daemon application.

An alternative is to use db_flatstore module as a database driver.



Thanks so much!

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Kamailio CDR "best practices"

2017-07-31 Thread Yu Boot
How to make Kamailio write "normal" CDRs? acc cdr module writes start 
time and end time in unixtime format, that is very uncomfortable.


Fnd stcond question - how to make Kamailio to write CDR in ordinary text 
file?



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users