Re: [SR-Users] How to disable retransmits via TCP connection? etc.

2015-06-25 Thread Vitaliy Aleksandrov
Hi, But the fact that packet sent from a server to a client looks differently captured from both points says that somebody tries to "help" you (read SIP ALG). So I would join to Daniel's suggestion to try with TLS. On 24/06/15 17:30, Andrey Utkin wrote: Thanks for all the suggestions. Have t

Re: [SR-Users] How to disable retransmits via TCP connection? etc.

2015-06-25 Thread Vitaliy Aleksandrov
Hi, Don't want to sound like a captain obvious, but what I can say after a quick look at your traces is that both client and server are behind NAT and either some entity drops big packets silently or somebody drops ICMP (fragmentation needed) which doesn't allow TCP to adjust max MSS. The othe

Re: [SR-Users] How to disable retransmits via TCP connection? etc.

2015-06-24 Thread Vitaliy Aleksandrov
Hi, I would also add that if you see partial packets you can try to remove any transport protocol (udp/tcp) and port filters. It will help if you are dealing with IP fragmentation. Otherwise sniffer won't catch IP fragments since they don't have transport level headers. Best Regards, Vitaliy

Re: [SR-Users] Recommended configuration for TCP support

2015-05-08 Thread Vitaliy Aleksandrov
What would happen in this case? If I understand correctly, the proxy will always forward the request but the last hop (before the UAS) will forward the request only if a connection is active? correct. If the last hop doesn't forward the request because no TCP connection exists, what happe

Re: [SR-Users] Recommended configuration for TCP support

2015-05-08 Thread Vitaliy Aleksandrov
s.sip-router.org] *On Behalf Of *Vitaliy Aleksandrov *Sent:* Wednesday, May 06, 2015 10:34 AM *To:* sr-users@lists.sip-router.org *Subject:* Re: [SR-Users] Recommended configuration for TCP support *set_forward_no_connect()* called after lookup() prevents kamailio from making a new connection

Re: [SR-Users] Recommended configuration for TCP support

2015-05-06 Thread Vitaliy Aleksandrov
*set_forward_no_connect()* called after lookup() prevents kamailio from making a new connection to a phone if there is no active connection. This is useful when you are trying to call to a UA which kamailio still keeps registration record for, but TCP/TLS connect to this phone is already gone (d

Re: [SR-Users] LCR with gateway capabilities

2015-04-29 Thread Vitaliy Aleksandrov
The Tag column size is 64. If I make this larger in the database, will it be truncated once it is loaded into memory? According to modules source code Tag's max size is hardcoded and will be truncated. But this is not a bit problem. You can keep capabilities list in htable and only put a key

Re: [SR-Users] LCR with gateway capabilities

2015-04-29 Thread Vitaliy Aleksandrov
don't match your criteria and in the end a call will be routed to the cheapest gateway with proper capabilities. *From:*sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On Behalf Of *Vitaliy Aleksandrov *Sent:* Wednesday, April 29, 2015 10:36 AM *To:* sr-users@lists.sip-route

Re: [SR-Users] LCR with gateway capabilities

2015-04-29 Thread Vitaliy Aleksandrov
What about configuring two LCR instances with different "lcr_id". The first one can use only gateways with requested capabilities and the second one all gateways. Then you can make a decision about which instance to use during call routing process providing this lcr_id to load_gws() function.

Re: [SR-Users] Expect the kamailio's sip account is unregistered state when the client app is shutdown

2015-04-28 Thread Vitaliy Aleksandrov
Hi, You can take a look at this option: http://kamailio.org/docs/modules/4.2.x/modules/usrloc.html#usrloc.p.handle_lost_tcp It's a bit limited and doesn't work for: - usrloc db only mode - if you have separated edge proxy and registrar Thank you for information.. What can Kamailio do about cli

Re: [SR-Users] Routing PSTN calls from Asterisk through Kamailio to UAC & loose_route

2015-03-26 Thread Vitaliy Aleksandrov
According to your description BYE was sent using the information from R-URI which had no 5080 port. Asterisk should have added port 5080 to the outgoing Invite contact so that it could be used for in-dialog routing. Can you show a full trace with sip traffic between kamailio and asterisk. To c

Re: [SR-Users] missing BYE when 2 redundant kamailio servers share the same database

2015-03-20 Thread Vitaliy Aleksandrov
We use TLS for SIP. The Wireshark pcap would be encrypted. I’ll try to get a pcap anyway. Wonder if there is a way to dump pcap from inside kamailio. Wireshark can decrypt SIP signalling sent over TLS connections if you provide server's private key to it. All the requests within dialog ar

Re: [SR-Users] tcp_max_connection to 4096

2015-01-27 Thread Vitaliy Aleksandrov
You shouldn't feel any performance issues after increasing tcp_max_conn to 4096. Connections hash table size is pretty high (1024) so it's not a problem at all. Of course if you want to handle twice bigger number of simultaneous clients you need to check if you current hardware can handle it (R

Re: [SR-Users] async workers

2014-10-24 Thread Vitaliy Aleksandrov
Hi, What is the practical limit to the number of async worker processes? With SIP child processes, it seems to be about the number of available CPUs in /proc/cpuinfo. After that--at least, per my testing--one begins to hit the point of diminishing returns, presumably due to SHM IPC and synchro

[SR-Users] Crash after async_sleep().

2014-10-24 Thread Vitaliy Aleksandrov
Hello list. root@proxy:/# kamcmd core.version kamailio 4.1.4 (i386/linux) I'm getting a crash when I'm trying to simulate a ringing UAS from kamailio config. To achieve this I've added the next config actions: if (is_method("INVITE") && !has_totag() && $rU =~ "^999") { sl_send_reply("100

Re: [SR-Users] How to uniquely identify SIP WS / WSS endpoint

2014-08-25 Thread Vitaliy Aleksandrov
thought of using GRUU, but it is not always present, especially in SIP replies. Thank you. On Mon, Aug 25, 2014 at 3:24 PM, Vitaliy Aleksandrov mailto:vitalik.v...@gmail.com>> wrote: On 22.08.14 03:26, Muhammad Shahzad wrote: Sorry for putting this question on both dev

Re: [SR-Users] How to uniquely identify SIP WS / WSS endpoint

2014-08-25 Thread Vitaliy Aleksandrov
On 22.08.14 03:26, Muhammad Shahzad wrote: Sorry for putting this question on both dev and user mailing lists, as it is a rather theoretical question and i hope some SIP guru on either mail list will answer. For non-WS endpoints which use TCP or UDP for SIP transport, each upstream request ha

Re: [SR-Users] pkg.stats

2014-07-21 Thread Vitaliy Aleksandrov
changes I did in master for a bit more optimizations for memory manager. Cheers, Daniel On 18/07/14 18:22, Vitaliy Aleksandrov wrote: Hi list, I have a problem with pkg.stats for tcp.main process on kamailio "4.1.2 73ea61-dirty". kamailio has 64M of private memory for each proc

[SR-Users] pkg.stats

2014-07-18 Thread Vitaliy Aleksandrov
Hi list, I have a problem with pkg.stats for tcp.main process on kamailio "4.1.2 73ea61-dirty". kamailio has 64M of private memory for each process (-M 64). pkg.stats for tcp.main process shows that is uses 75M and still has 62M free: { entry:36 pid:10032

Re: [SR-Users] How to remove attribute from SDP ?

2014-05-14 Thread Vitaliy Aleksandrov
I absolutely forgot about the possibility of embedding scripting languages to configuration. Lua did the trick. Thanks for the right direction and example. I can share my solution, using app_python. I'm using this in production environment during 2 years. loadmodule "app_python.so" modparam(

[SR-Users] How to remove attribute from SDP ?

2014-05-14 Thread Vitaliy Aleksandrov
Hello list, Can anybody suggest the way to remove a line/attribute from SDP that matches some pattern (regexp), some kind of "grep -v" for SDP ? I'm trying to remove unnecessary ICE candidates from the SDP body and only thing I know is the IP address of the candidate I need to remove. I was t

Re: [SR-Users] Does tls/wss actually work or What is required for tls/wss

2014-03-19 Thread Vitaliy Aleksandrov
Hi, What are the requirements for connecting with tls/wss. I have not come across any information or example for this. My config is working when the client uses ws. However if I change this to use wss, (this is it only paramter I change) it does not work. I understand Kamailio does not supp

Re: [SR-Users] Kamailio without tls

2014-02-01 Thread Vitaliy Aleksandrov
Just add "listen=tcp:_kamailio_server_ip:5060" to the kamailio.cfg if don't have one and change sip settings of your SIP application to disable tls. You can have both clear tcp and tls at the same time and application will choose which type of connection to use. Hi Support, I have recently ka

Re: [SR-Users] pkg.stats problem, possible memory leak in websockets.

2013-10-02 Thread Vitaliy Aleksandrov
On 10/01/2013 12:54 PM, Peter Dunkley wrote: Done. The patch is in master and the 4.0 branch. Thanks, Peter Thanks for applying the patch. It looks like websockets in master are stable now. No memory leaks are detected for the last two days. pks.stats still shows some strange numbers, but th

Re: [SR-Users] pkg.stats problem, possible memory leak in websockets.

2013-10-01 Thread Vitaliy Aleksandrov
Hello, Thank you for the explanation. Could somebody review the patch in the attachment ? I tried to fix the problem with a growing tcpconn->refcnt for websocket connections. On 30 September 2013 17:14, Vitaliy Aleksandrov mailto:vitalik.v...@gmail.com>> wrote: Could you ple

Re: [SR-Users] pkg.stats problem

2013-09-30 Thread Vitaliy Aleksandrov
I found one place where tcpconn_put() never called after tcpconn_get(): --- a/msg_translator.c +++ b/msg_translator.c @@ -2509,9 +2509,11 @@ char* via_builder( unsigned int *len, } else if (con->rcv.proto==PROTO_WSS) { memcpy(line_buf+MY_VIA_LEN-4, "WSS ", 4

Re: [SR-Users] pkg.stats problem

2013-09-26 Thread Vitaliy Aleksandrov
Yes, I found you commit. That's why now I'm using latest master. tcl_list shows 200+ tcp connections and only a few of them have ref_count bigger that 1. netstat shows the same number of established connections. If lost tcp_conn structures are not shown in tcp_list how can I check if it is my

Re: [SR-Users] pkg.stats problem

2013-09-26 Thread Vitaliy Aleksandrov
At first thanks for trying to help. It's my fault that I messed up "top" to this story, just wanted to show that while my system is working just fine: 1. "used" and "real_used" fields of a process (tcp receiver) is bigger that I set in -M 2. "free" hasn't changed from the last restart. root@p

Re: [SR-Users] pkg.stats problem

2013-09-25 Thread Vitaliy Aleksandrov
I switched to the latest master branch and it seems it works better, but unfortunately I can't understand how much PKG memory kamailio really uses to know it still has problems with PKG. For instance "kamcmd pkg.stats" always shows that tcp_main process has free: 32627984 (started with -M 32),

Re: [SR-Users] unregister user when kamailio looses TCP connection.

2013-09-23 Thread Vitaliy Aleksandrov
On 09/23/2013 11:23 PM, Andreas Granig wrote: Hi, On 09/13/2013 11:27 AM, Daniel-Constantin Mierla wrote: thanks, patch was commited and pushed to remote repository. The patch only handles the case where a tcp connection is directly made to the registrar, as no event route is fired, right? Y

Re: [SR-Users] pkg.stats problem

2013-09-21 Thread Vitaliy Aleksandrov
ood idea to use websocket module from the master branch with a 4.0 verion ? Hello, can you get the type of the process with 'kamctl ps'? Cheers, Daniel On 9/20/13 6:51 PM, Vitaliy Aleksandrov wrote: Didn't check master branch before writing previous email. There were some commits a

[SR-Users] pkg.stats problem

2013-09-20 Thread Vitaliy Aleksandrov
Hello, I have one installation with a strange pkg.stats output: root@host:~# kamcmd pkg.stats index 36 { entry: 36 pid: 2599 rank: -4 used: 16234288 free: 15788240 real_used: 16900864 } After some time I've checked it again and found that used and

Re: [SR-Users] pkg.stats problem

2013-09-20 Thread Vitaliy Aleksandrov
Didn't check master branch before writing previous email. There were some commits about memory leaks in websocket module. Will try master. ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://

Re: [SR-Users] unregister user when kamailio looses TCP connection.

2013-09-10 Thread Vitaliy Aleksandrov
fails to apply because it doesn't match any longer the context. Can you resend in it raw format with 'git diff >../filename.patch'? Cheers, Daniel On Fri, Sep 6, 2013 at 12:46 AM, Vitaliy Aleksandrov mailto:vitalik.v...@gmail.com>> wrote: Make the patch for ma

Re: [SR-Users] unregister user when kamailio looses TCP connection.

2013-09-05 Thread Vitaliy Aleksandrov
Make the patch for master branch, 4.0 doesn't take any new feature and I applied the patches to master branch anyhow. Also, do not forget the patch for xml documentation. Cheers, Daniel Patch for master branch is in the attachment. Changelog: - documentation is updated - tcpconn_id initialize

Re: [SR-Users] unregister user when kamailio looses TCP connection.

2013-09-05 Thread Vitaliy Aleksandrov
1. You have to add the documentation for the new usrloc parameter, in xml files from modules/usrloc/doc/ - send over the patch and I will commit it as well. Cheers, Daniel On 8/29/13 12:47 PM, Vitaliy Aleksandrov wrote: Thanks community for all replies. I did the second try. Result is in the at

Re: [SR-Users] kamailio load balancing

2013-08-30 Thread Vitaliy Aleksandrov
As written many time in this mailing list it depends on what services you want to provide using such "voice servers". If they are transparent media relays then rtpproxy or mediaproxy(-ng) can help. Also you can integrate it with your billing to authorize calls and limit their duration. Though

Re: [SR-Users] unregister user when kamailio looses TCP connection.

2013-08-29 Thread Vitaliy Aleksandrov
Thanks community for all replies. I did the second try. Result is in the attachment. This time a did it in the way proposed by Daniel-Constantin Mierla. All job is done in timer process when it iterates through all registrations looking for expired ones. It works for all database modes except

Re: [SR-Users] unregister user when kamailio looses TCP connection.

2013-08-28 Thread Vitaliy Aleksandrov
On 08/28/2013 06:45 PM, Juha Heinanen wrote: Vitaliy Aleksandrov writes: If anybody else except me need this It would be great to fix known problems and add it to kamailio. i don't know if this come already up, but why not use this in branch failure route: unregister(&quo

Re: [SR-Users] unregister user when kamailio looses TCP connection.

2013-08-27 Thread Vitaliy Aleksandrov
Also, if I didn't get it wrong, it works only with in-memory records, if the usrloc is configured in db-only mode, it does not work with current patch, right? To remove old contacts i've used delete_ucontact from usrloc api. This function checks db_mode and removes contact from db in case of

Re: [SR-Users] unregister user when kamailio looses TCP connection.

2013-08-27 Thread Vitaliy Aleksandrov
On 08/27/2013 11:57 AM, Daniel-Constantin Mierla wrote: Hello, thanks for the patch. Some remarks. As you highlighted that the solution is not very efficient (due to no direct mapping between records and tcp connection), it should have a way to disable it (maybe via mod param for usrloc). A

Re: [SR-Users] unregister user when kamailio looses TCP connection.

2013-08-27 Thread Vitaliy Aleksandrov
On 08/27/2013 10:22 AM, Olle E. Johansson wrote: Let's work on a description on the logic needed and see if Vitally's code is close: 1. Connection dies (tcp, tls, sctp) 2. Event-route activates 3. Check if there's a outbound flow with reg-id associated with the flow 4. If not, is there a regist

[SR-Users] unregister user when kamailio looses TCP connection.

2013-08-26 Thread Vitaliy Aleksandrov
Hello, I've made a patch to kamailio-4.0.3 which removes stale registration when kamailio looses an incoming tcp connection. Of course this patch needs more work. Since the are no direct references between user location contacts and tcp connections callback function uses linear search through

Re: [SR-Users] Finding Destination IP:Port for 200 OK

2013-08-25 Thread Vitaliy Aleksandrov
! Best Regards, Sammy On Sat, Aug 24, 2013 at 3:10 PM, Vitaliy Aleksandrov mailto:vitalik.v...@gmail.com>> wrote: How about next config snippet: /route[GET_NEXT_HOP]// //{// //$var(next_hop) = $null;// //if (is_request()) {// //

Re: [SR-Users] Finding Destination IP:Port for 200 OK

2013-08-24 Thread Vitaliy Aleksandrov
How about next config snippet: /route[GET_NEXT_HOP]// //{// //$var(next_hop) = $null;// //if (is_request()) {// //$var(next_hop) = $sel(next_hop.host);// //} else if (is_reply()) {// // if ($sel(via[2].received) != $null)// //$var(next_hop) = $sel(via[

Re: [SR-Users] Kamailio v4.0.2, iPhone, TCP connection and PJLIB

2013-08-14 Thread Vitaliy Aleksandrov
On 08/14/2013 07:32 PM, Roberto Fichera wrote: On 08/14/2013 04:36 PM, Vitaliy Aleksandrov wrote: If you won't be able to disable SIP ALG on your router you can fill $avp(received) manually before calling save(): $avp(received) = "sip:" + $si + ":" + $sp + &q

Re: [SR-Users] Kamailio v4.0.2, iPhone, TCP connection and PJLIB

2013-08-14 Thread Vitaliy Aleksandrov
If you won't be able to disable SIP ALG on your router you can fill $avp(received) manually before calling save(): $avp(received) = "sip:" + $si + ":" + $sp + ";transport=" + $proto; In this case all user location records will have the "received" attribut even if a UA isn't behind NAT, but

Re: [SR-Users] Two servers with shared registration database

2013-08-01 Thread Vitaliy Aleksandrov
On 08/01/2013 03:30 PM, Eugene Prokopiev wrote: Hi, Is it possible to configure two Kamailio servers with shared registration database? Any SIP UA can be registered on any server but it must transparently call another SIP UA which can be registered on the same or on another Kamailio server. Is

Re: [SR-Users] Kamailio as a sip/rtp proxy

2013-07-31 Thread Vitaliy Aleksandrov
For example you can add dns records for customer{one,two,...}.whatever.com pointing to your proxy. Then proxy can forward requests from outside world to asterisks based on uri domain part (customerone -> 192.168.0.5, two-> .10). You can keep table of uri->ip conversions either in the kamailio.cfg

Re: [SR-Users] websocket double record_route()

2013-07-31 Thread Vitaliy Aleksandrov
On 07/31/2013 06:03 PM, Vitaliy Aleksandrov wrote: On 07/31/2013 04:18 PM, Vitaliy Aleksandrov wrote: It works. Thanks a lot. I'm going to test this with the latest master branch as Peter Dunkley proposed. Should I add this issue to Jira if this "behaviour" is not fixed in

Re: [SR-Users] websocket double record_route()

2013-07-31 Thread Vitaliy Aleksandrov
On 07/31/2013 04:18 PM, Vitaliy Aleksandrov wrote: It works. Thanks a lot. I'm going to test this with the latest master branch as Peter Dunkley proposed. Should I add this issue to Jira if this "behaviour" is not fixed in the master ?

Re: [SR-Users] websocket double record_route()

2013-07-31 Thread Vitaliy Aleksandrov
It works. Thanks a lot. ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Re: [SR-Users] websocket double record_route()

2013-07-31 Thread Vitaliy Aleksandrov
Hello, does it add two record route headers when calling to an UDP destination? IIRC, the condition for double route is that incoming socket is different than outgoing socket and I am not sure if Peter updated it to detect a different sub-protocol type (as ws/wss are on top of tcp/tls). C

Re: [SR-Users] websocket double record_route()

2013-07-31 Thread Vitaliy Aleksandrov
Ok, I will try rr module from 4.0 branch and if it won't help from master branch. Have you tried the latest code on the 4.0 branch as I am sure there are fixes that have been made since the last release? Also, if using WebSockets I do strongly recommend you try Git master if you have any probl

Re: [SR-Users] websocket double record_route()

2013-07-31 Thread Vitaliy Aleksandrov
you are I suggest trying git master rather than the 4.0 branch. Regards, Peter On 31 July 2013 10:53, Vitaliy Aleksandrov <mailto:vitalik.v...@gmail.com>> wrote: Hello. I'm trying to configure kamailio as a gateway between Websocket and TCP/TLS transports. When I ca

[SR-Users] websocket double record_route()

2013-07-31 Thread Vitaliy Aleksandrov
Hello. I'm trying to configure kamailio as a gateway between Websocket and TCP/TLS transports. When I call record_route() for an initial INVITE that comes via WS and will be forwarded via TCP to a registered UA kamailio inserts only a one record-route header with its IP and transport=ws inst

Re: [SR-Users] Replication problems Registration Using t_replicate ().

2013-07-27 Thread Vitaliy Aleksandrov
What protection you are talking about ? Do you have listen parameter for a virtual_ip at both master and backup servers ? Have you set ip_nonlocal_bind option ? I've used this scheme without any problems and it worked great. As I understand you need to add "sock_hdr_name" and "sock_flag" para

Re: [SR-Users] How to tie Registration with Client TCP connection

2013-07-24 Thread Vitaliy Aleksandrov
Hello, Is this option still not available ? I'm asking because there was a message from, if I recall right, Olle Johansson that removing stale registrations is on the todo list of someone from the dev team. So maybe someone already has this option in its devel branch ? On Fri, Apr 5, 2013 at 1

Re: [SR-Users] Asterisk cluster with Kamailio for load balancing.

2013-07-12 Thread Vitaliy Aleksandrov
Indeed, this is a very good suggestion. I can propose a little plan for the first step: 1. Learn how sip registration works 2. Configure kamailio as a sip registrar server. 3. Try to route calls between registered phones. 4. Read about in-dialog requests routing (record_route(), loose_route()) a

Re: [SR-Users] How to make BLF work

2013-05-30 Thread Vitaliy Aleksandrov
WITH_PRESENCE loadmodule "presence.so" loadmodule "presence_xml.so" loadmodule "presence_dialoginfo.so" loadmodule "pua.so" loadmodule "pua_dialoginfo.so" loadmodule "pua_usrloc.so

Re: [SR-Users] How to make BLF work

2013-05-30 Thread Vitaliy Aleksandrov
"presence_xml.so" loadmodule "presence_dialoginfo.so" loadmodule "pua.so" loadmodule "pua_dialoginfo.so" loadmodule "pua_usrloc.so" #!endif And of course: loadmodule "dialog.so" Atta

Re: [SR-Users] Why does Kamailio return many Contacts in Contact header in REGISTER response ?

2013-05-30 Thread Vitaliy Aleksandrov
Kamailio can do this but it doesn't by default. http://kamailio.org/docs/modules/4.0.x/modules/registrar.html#idp110136 ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.or

Re: [SR-Users] How to make BLF work

2013-05-28 Thread Vitaliy Aleksandrov
You didn't receive any NOTIFY requests because you didn't have a PUA client. rfc3903 describes what a PUA client is. To make BLF work you can try to use the next modules: 1. dialog - to enable dialog awareness 2. pua + pua_dialoginfo - to enable a PUA client based on active dialogs information

Re: [SR-Users] Serial forking

2013-05-10 Thread Vitaliy Aleksandrov
I missed that $branch(..) variable is r/w. I like this way more than playing with AVPs. According to documentation $branch(..) variable gives access to additional branches. Is it possible to change Q value for the first branch ? ___ SIP Express Route

[SR-Users] Serial forking

2013-05-09 Thread Vitaliy Aleksandrov
Hello. As I understand t_load_contacts() / t_next_contacts() can help only in case when branches have different "q" values. The only way I see is to get all contacts via reg_fetch_contacts(), save the list to an AVP and then iterate through the list in the way described in tm module docs. Do

Re: [SR-Users] var vs avp...

2013-04-30 Thread Vitaliy Aleksandrov
On 04/29/2013 03:52 PM, Victor V. Kustov wrote: В Mon, 29 Apr 2013 14:46:34 +0200 "Olle E. Johansson" пишет: All functions of this module load AVPs from SIP-AVP reply items received from RADIUS upon a successful request. Value of the SIP-AVP reply item must be a string of form: • valu

Re: [SR-Users] [SR-users] Radius AAA

2013-04-23 Thread Vitaliy Aleksandrov
radius_load_caller_avps() from misc_radius module can help you. Sorry can't find an example, but as I remember it's quite simple to use this function. Radius can insert next-hop to its Access-Accept reply and then you can use it to send an INVITE to right destination: $rd = $avp(s:next-hop); #

Re: [SR-Users] var vs avp...

2013-04-19 Thread Vitaliy Aleksandrov
On 04/19/2013 11:43 AM, Victor V. Kustov wrote: Hi! whats difference $var() and $avp()? $var() - is bound to a kamailio process. If you set $var(xxx) for a one request/reply, it will be available during processing other messages. $avp() - is bound to a transaction. If you set $avp(xxx) for an

Re: [SR-Users] Changing Domain in To URI

2013-04-05 Thread Vitaliy Aleksandrov
http://kamailio.org/docs/modules/3.2.x/modules_k/textops.html#id2495808 I use this subst("/^To:.*$/To: $var(new_to)\r/i") where $var(new_to) is a new value of the "To" header and it works fine on kamailio-3.2.4 Sorry if I repeat myself - I just subscribed properly to the list: if you don't n

Re: [SR-Users] What IP in REGISTER message does Kamalio use to store location ?

2013-04-03 Thread Vitaliy Aleksandrov
Save() function of the "registrar" module always saves Contact and can save real source to the "received" field of a location record. lookup() function uses Contact to form R-URI and puts ip:port from the received field to the $du. If $du is present t_relay() uses it to forward a request to a cor

Re: [SR-Users] Implementing encryption

2013-03-26 Thread Vitaliy Aleksandrov
It works pretty good. But when I was testing such an implementation with imitation of high latency (200ms) and packet loss(about 15%) voice over UDP worked much better since TCP was trying to retransmit lost segments. I think TCP_NODELAY must be always enabled to avoid packets concatenation at

Re: [SR-Users] KAMAILIO Config Hot/Live reload

2013-03-26 Thread Vitaliy Aleksandrov
On 03/25/2013 02:36 PM, Daniel-Constantin Mierla wrote: Hello, On 3/24/13 4:20 PM, Vitaliy Aleksandrov wrote: On 03/21/2013 12:59 AM, Daniel-Constantin Mierla wrote: Hello, On 3/18/13 7:09 PM, Omar wrote: Kamailio Team. Was this feature added already or we still need to restart kamailio

Re: [SR-Users] KAMAILIO Config Hot/Live reload

2013-03-24 Thread Vitaliy Aleksandrov
On 03/21/2013 12:59 AM, Daniel-Constantin Mierla wrote: Hello, On 3/18/13 7:09 PM, Omar wrote: Kamailio Team. Was this feature added already or we still need to restart kamailio after we modify the Kamailio.cfg. it is still required to restart after changing the config file. But some core an

Re: [SR-Users] SIP debug.

2013-03-18 Thread Vitaliy Aleksandrov
On 03/18/2013 01:14 PM, Victor V. Kustov wrote: В Mon, 18 Mar 2013 11:40:24 +0100 davy van de moere write: funny, but not usable :) debug=9 loaded debugger.so but in syslog no sip debugging info What exactly you want to debug ? Wireshark produces nice sip flows from captures made by tcpdump.

[SR-Users] DNS error

2013-02-12 Thread Vitaliy Aleksandrov
Hi, all Have a question about failure_routes. As I remember if kamailio statefuly sent a request and didn't receive a reply script writer can handle this situation at a failure_route[] block. But if kamailio can't resolve a destination from R-URI it sends back 478 reply and finishes current tra

Re: [SR-Users] Syslog

2013-02-05 Thread Vitaliy Aleksandrov
On 02/04/2013 06:07 PM, Klaus Darilion wrote: On 04.02.2013 11:26, Vitaliy Aleksandrov wrote: The problem was caused by memlog and memdbg options. So, how the problem is triggered and how did you solved it? regards Klaus Both memlog and memdbg were removed from a kamailio config as I don&#

Re: [SR-Users] Syslog

2013-02-04 Thread Vitaliy Aleksandrov
The problem was caused by memlog and memdbg options. ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Re: [SR-Users] Syslog

2013-02-01 Thread Vitaliy Aleksandrov
On 02/01/2013 11:38 AM, Vitaliy Aleksandrov wrote: Hi list. I have a strange problem with syslog. Kamailio doesn't send any messages to syslog from UDP workers that are bound to sock=127.0.0.1:5060. Neither LM_DBG() from a source code nor xlog("any level", "") wor

[SR-Users] Syslog

2013-02-01 Thread Vitaliy Aleksandrov
Hi list. I have a strange problem with syslog. Kamailio doesn't send any messages to syslog from UDP workers that are bound to sock=127.0.0.1:5060. Neither LM_DBG() from a source code nor xlog("any level", "") works. I use kamailio-3.2.4 with this opions: log_stderror=no debug=3. With log_std

Re: [SR-Users] How to rewrite "tu" in CANCEL message ?

2013-02-01 Thread Vitaliy Aleksandrov
I had the same problem with CANCEL requests for transactions created by an INVITE that was rewritten in a branch_route. I sent a small patch to dev list in October and didn't receive any comment. You can try to find it in sr-dev archive for October 2012. > Yes, we know it's wrong. > But if we real

Re: [SR-Users] TLS questions

2013-01-11 Thread Vitaliy Aleksandrov
On 01/11/2013 05:03 PM, Fabian Borot wrote: Hi, we need to implement TLS in our current setup and have some questions about it: 1- We have a farm of Asterisk servers behind our kamailio proxy. The call flow is Customers/Providers <--> Proxy <--> Asterisks. Is it possible to have TLS only be

Re: [SR-Users] Regarding Kamailio Registrar

2012-12-11 Thread Vitaliy Aleksandrov
You are right after reboot registrar module takes registrations from a db. If someone send UnRegister during outage, kamailio will keep active registration until occurence of expiration time that was calculated during registration. To speed up user location cleaning you can decrease the "expir

Re: [SR-Users] Kamailio 3.X.X + BLF configuration trouble

2012-11-27 Thread Vitaliy Aleksandrov
On 11/27/2012 06:30 AM, Hemanshu Patel wrote: Hi vitaliy, thank you very much for your reply. Here I am not talking about kamailio as Presence server, I am asking about BLF handling For SUBSCRIBE+NOTIFY+PUBLISH in case of presence, everything is working fine In case of BFL, once the phone/use

Re: [SR-Users] Kamailio 3.X.X + BLF configuration trouble

2012-11-26 Thread Vitaliy Aleksandrov
The NOTIFY without an XML body you received just after a subscription is correct. rfc3265 says: This SUBSCRIBE request will be confirmed with a final response. 200-class responses indicate that the subscription has been accepted, and that a NOTIFY will be sent immediately. You can disabl

Re: [SR-Users] check if the sent reply was local

2012-11-13 Thread Vitaliy Aleksandrov
||I thought t_any_replied() can be used for that purpose. For example in failure route I used: if (t_any_replied() && t_check_status("408") ) { xlog("L_DBG", "408 reply received\n"); } or if ( !(t_any_replied()) && t_check_status("408")) { xlog("L_DBG", "Local timeout\n"); } But I care

Re: [SR-Users] db_sqlite bugs

2012-10-29 Thread Vitaliy Aleksandrov
Hello, Have you found the way to run SELECT COUNT(*) ? I use kamailio 3.2.4 with sqlite 3.7.5-1 and it crashes on such queries too. As a workaround I use $dbr(res=>rows) with "SELECT some_field FROM table" query, but the bug is really exists. Hello Timo, We've done a basic test and it seems

Re: [SR-Users] Message Routing To/From Gateway

2012-10-26 Thread Vitaliy Aleksandrov
for a particular string (in this case the domain), changing it, and then forwarding it? Thanks, Ed On Sat, Oct 20, 2012 at 7:23 PM, Vitaliy Aleksandrov mailto:vitalik.v...@gmail.com>> wrote: "Permissions&qu

Re: [SR-Users] Message Routing To/From Gateway

2012-10-20 Thread Vitaliy Aleksandrov
d the gateway in any other settings besides the one you outlined? Thanks, Ed On Fri, Oct 19, 2012 at 6:17 AM, Vitaliy Aleksandrov mailto:vitalik.v...@gmail.com>> wrote: If I understood you right you just need to rewrite R-URI

Re: [SR-Users] Message Routing To/From Gateway

2012-10-19 Thread Vitaliy Aleksandrov
If I understood you right you just need to rewrite R-URI domain and forward MESSAGE if a user in not registered. if (!lookup("location")) { switch($retcode) { case -1: $rd = "gatewaydomain.com"; t_relay(); exit; default: sl_send

Re: [SR-Users] Kamailio 3.2.4 presence

2012-10-17 Thread Vitaliy Aleksandrov
to the new branch. Vitaliy Aleksandrov writes: db_mode is 0 (DB_MEMORY_ONLY) and according to comments in the presence.h kamailio holds subscription in memory and periodically updates to db, but retrieves from db only at startup. And it's true, I see that kamailio tries to update the activ

[SR-Users] Kamailio 3.2.4 presence

2012-10-16 Thread Vitaliy Aleksandrov
Hi all, I'm facing problems with active subscription restoration after sipproxy restart. db_mode is 0 (DB_MEMORY_ONLY) and according to comments in the presence.h kamailio holds subscription in memory and periodically updates to db, but retrieves from db only at startup. And it's true, I see

[SR-Users] Locate UA in usrloc table

2012-09-28 Thread Vitaliy Aleksandrov
Hi all. Is there any easy method to find if somebody with $si:$sp is registered (usrloc->received.ip == $si, usrloc->received.port == $sp) ? reg_fetch_contacts uses uri as search key, but in my case I don't have it. The only way I know is to write a module that will use "get_all_ucontacts" fu

Re: [SR-Users] [ ... ] operator

2012-09-07 Thread Vitaliy Aleksandrov
Hello, On 9/6/12 6:33 PM, Vitaliy Aleksandrov wrote: "Migrating kamailio v1.5.x to v.3.0.0" says that "test" operator no longer exists. But it is mentioned in Core Cookbook 3.2 (and 3.3) and can confuse someone. Can somebody remove it from the documentation ? Ind

[SR-Users] [ ... ] operator

2012-09-06 Thread Vitaliy Aleksandrov
"Migrating kamailio v1.5.x to v.3.0.0" says that "test" operator no longer exists. But it is mentioned in Core Cookbook 3.2 (and 3.3) and can confuse someone. Can somebody remove it from the documentation ? ___ SIP Express Router (SER) and Kamailio (O

[SR-Users] Why append_branch should be called in a failure route ?

2012-09-03 Thread Vitaliy Aleksandrov
Below is the example from http://kamailio.org/docs/modules/3.2.x/modules/tm.htm : failure_route[0]{ if (t_check_status("5[0-9][0-9]")){ # I do not like the 5xx responses, # so I give another chance to "foobar.com", # and I drop all the repl

[SR-Users] AVP string or integer ID

2012-08-28 Thread Vitaliy Aleksandrov
Hi all. I'm working with kamailio for about 1 year and still don't understand difference between integer and string IDs of AVPs. Is it just a question of usability ? ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-user

Re: [SR-Users] Request for advice, running SIP-Router in OpenVZ Container

2012-08-19 Thread Vitaliy Aleksandrov
On 08/17/2012 03:42 PM, JR Richardson wrote: Hi All, I'm considering running Kamailio as a virtual machine, with such low utilization, it doesn't seem to make sense to keep running it on a physical host server. I've been virtualizing Asterisk PBX's for years and run a host of other virtual

Re: [SR-Users] ACK and BYE messages uses wrong socket.

2012-07-03 Thread Vitaliy Aleksandrov
Have you specified interfaces with "listen" command ? I had a problem as you described and have fixed it by moving a listen directive with a "floating ip" to the top of the list. So you can try to specify interfaces you will use for SIP and set a "virtual ip" at the top of that list. Kamailio

[SR-Users] cfgutils lock / unlock + $sht() variables.

2012-06-29 Thread Vitaliy Aleksandrov
Hi all, I use $sht() pseudo-variabled provided by htable module for caching various information about sip customers. I thought that htable has some locking mechanism inside it and today while i was reading core-cookbook i payed attention to one example with the lock/unlock functions and $sht()

Re: [SR-Users] default kamailio configuration.

2012-06-26 Thread Vitaliy Aleksandrov
I have lost in Route and Record-Route headers. But now it's clear for me. Huge thanks. On 25.06.2012 14:44, Vitaliy Aleksandrov wrote: Hi All, After reading default kamailio configuration i can't understand why does kamailio remove preloaded route headers from the incoming init

  1   2   >