Re: [SR-Users] Kamailio behind NAT
Am 21.01.2014 17:33, schrieb John Smith: The next test has been to comment out the rtpproxy_manage at NATMANAGE function and to put it both at route[RELAY] and onreply(route) following your post in this list from January 2013:http://lists.sip-router.org/pipermail/sr-users/2013-January/076254.html. Now the media flows from Phone1 to Kamailio, from Kamailio to Asterisk and back, but it gets stuck at Kamailio. I cannot see it flow towards the public IP of the Phone2. The force_send_socket you used could be of any use here? That's what I recommend: - use 2 sockets, one for communication with internal nodes, one for external clients - in your Kamailio config check the direction of every message: i-e or e-i (for requests and responses). Depending on the direction set the proper IP when calling manage_rtpproxy and force the send socket: regards Klaus ___ 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] SIP Update multi-homed
Hello, On 21/01/14 13:23, Keith wrote: Hi, Thanks for the replies so far, good news is I got it working by switching off mhomed (mhomed=0). However this seems to have broken my dispatcher as the SIP OPTIONS probing is being sent from the wrong interface! Any ideas how to set where dispatcher sends these from?? maybe you can enforce the socket via event_route[tm:local-request] { ... } Not sure how you can decide which socket, maybe by target IP. Also, I haven't tried to see if the socket can really be enforced in this event route, but worth a try. Cheers, Daniel -- Daniel-Constantin Mierla - http://www.asipto.com http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda ___ 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] kamailio-4.0.2 core issue
Hello, can you give the output in gdb for: bt full Also, do you have 'listen' parameters or kamailio is listening on all interfaces? It is recommended to upgrade to latest version 4.0.x, to be sure there is not a side effect of a fixed issues. Cheers, Daniel On 17/01/14 13:50, Surendra wrote: Hi, We are facing a core issue in 4.0.2 version. Please find the GDB trace below #0 udp_rcv_loop () at udp_server.c:471 471 fromlen=sockaddru_len(bind_address-su); (gdb) bt #0 udp_rcv_loop () at udp_server.c:471 #1 0x00475c14 in main_loop () at main.c:1851 #2 0x0047a98b in main (argc=value optimized out, argv=value optimized out) at main.c:2939 We have simulated this so many times in load mode. Machine details: Linux PLT-RA-RD-W167A.localdomain 2.6.18-308.el5 #1 SMP Fri Jan 27 17:17:51 EST 2012 x86_64 x86_64 x86_64 GNU/Linux Can anyone help me on this Regards Surendra ___ 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 -- Daniel-Constantin Mierla - http://www.asipto.com http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda ___ 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] Kamailio behind NAT
Hello Klaus, I had already two sockets bound each to two independent physical interfaces. I have added the force_send_socket at each rtpproxy It is necessary to use the cwie / cwei flags in the rtpproxy_manage call? Currently audio does not flow back to the softphones, it gets lost at Kamailio. Thank you for your help - Original Message - From: Klaus Darilion Sent: 01/23/14 12:26 AM To: Kamailio (SER) - Users Mailing List Subject: Re: [SR-Users] Kamailio behind NAT Am 21.01.2014 17:33, schrieb John Smith: The next test has been to comment out the rtpproxy_manage at NATMANAGE function and to put it both at route[RELAY] and onreply(route) following your post in this list from January 2013:http://lists.sip-router.org/pipermail/sr-users/2013-January/076254.html. Now the media flows from Phone1 to Kamailio, from Kamailio to Asterisk and back, but it gets stuck at Kamailio. I cannot see it flow towards the public IP of the Phone2. The force_send_socket you used could be of any use here? That's what I recommend: - use 2 sockets, one for communication with internal nodes, one for external clients - in your Kamailio config check the direction of every message: i-e or e-i (for requests and responses). Depending on the direction set the proper IP when calling manage_rtpproxy and force the send socket: regards Klaus ___ 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 ___ 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] LCR help
On Wednesday 22 January 2014 23:19:09 Juha Heinanen wrote: prefix column cannot hold a regular expression. lcr routing is based on longest match, which cannot be efficiently implemented using regular expressions. If lcr is based on longest prefix, Pete could just use a little logic to implement longest match with alias_db_lookup (his original question). I store either a full number, a 10 number block or 100 block (by leaving off the last 1 or 2 digits) and do the following: $avp(callednumber)=$rU; if(!alias_db_lookup(dbaliases)) { strip_tail(1); if(!alias_db_lookup(dbaliases)) { strip_tail(1); if(!alias_db_lookup(dbaliases)) { $rU=$avp(callednumber); } } } If you give bigger numberblocks to endusers just add a level (of make a decent loop that checks the remaining length of $rU). -- POCOS B.V. - Croy 9c - 5653 LC Eindhoven Telefoon: 040 293 8661 - Fax: 040 293 8658 http://www.pocos.nl/ - http://www.sipo.nl/ K.v.K. Eindhoven 17097024 ___ 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] FW: Regd. t_suspend() and t_continue()
Hi Shankar, I will setup and test case and try to reproduce as soon as I can. I suspect I will be able to get back to you early next week only Cheers Jason On Thu, Jan 23, 2014 at 8:48 AM, Shankar shankar...@plintron.com wrote: Hi, From our repeated load tests what we can conclude irrespective of the number of simultaneous calls, there is always this error “t_continue: transaction not found” occurring. If I run say 20 cps, then after running 5000 calls, we observe exactly 20 calls failing with the above error. We doubt that there is something happening during a particular point in time (for a second) which impacts the saving of those new transactions into shared memory. For 10 cps run, we observe exactly 10 call failures. We repeated with different cps and found that error is exactly equal to the cps being run. Any configuration we are missing. Anyone can help? Regards, Shankar *From:* Shankar [mailto:shankar...@plintron.com] *Sent:* Tuesday, January 21, 2014 3:09 PM *To:* 'Jason Penton'; 'SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List' *Subject:* FW: [SR-Users] FW: Regd. t_suspend() and t_continue() Hi Jason, Below is our config, route[LOCATION] { if(is_method(INVITE)) { if(!route(FROMCSCF)) { setflag(FLT_ACC); setflag(FLT_ACCFAILED); dlg_manage(); dlg_setflag(4); async_route(RESUME, 1); exit; } } } route[RESUME] { route(TO_LOCATION);// here t_relay to REGISTRAR is done for user lookup. exit; } Regards, Shankar Date: Tue, 21 Jan 2014 11:14:21 +0200 From: Jason Penton jason.pen...@smilecoms.com To: Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Subject: Re: [SR-Users] FW: Regd. t_suspend() and t_continue() Message-ID: CAE=KcrghqJHgnGDxqS1fYvUzM=hqrackwfeasnjjm8xudcq...@mail.gmail.com Content-Type: text/plain; charset=iso-8859-1 We use it heavily, but not using the async module - we use it directly from the IMS code. Can you please provide your config (or a relevant snippet) file so I can see what exactly you are testing/trying to do Cheers jason *From:* Shankar [mailto:shankar...@plintron.com shankar...@plintron.com] *Sent:* Tuesday, January 21, 2014 2:25 PM *To:* 'SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List' *Subject:* RE: [SR-Users] FW: Regd. t_suspend() and t_continue() Hi, Anyone who had used t_suspend() and t_continue() can share the performance details? I tried async module with one sec sleep time. I tried only 5 calls per second but still it was not successful. After sometime I see below logs, Jan 21 13:51:55 PLT-RA-RD-W167A PCscf[16520]: ERROR: tm [t_suspend.c:128]: t_continue(): ERROR: t_continue: transaction not found Jan 21 13:52:49 PLT-RA-RD-W167A last message repeated 15 times Jan 21 13:59:38 PLT-RA-RD-W167A last message repeated 12 times Jan 21 14:13:03 PLT-RA-RD-W167A last message repeated 5 times Any configuration changes can help here? Regards, Shankar *From:* Shankar [mailto:shankar...@plintron.com shankar...@plintron.com] *Sent:* Wednesday, January 15, 2014 1:26 PM *To:* 'Jason Penton' *Cc:* 'SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List' *Subject:* RE: [SR-Users] FW: Regd. t_suspend() and t_continue() Hi Jason, I am using 4.0.2 Regards, Shankar *From:* Jason Penton [mailto:jason.pen...@smilecoms.comjason.pen...@smilecoms.com] *Sent:* Wednesday, January 15, 2014 1:21 PM *To:* Shankar *Cc:* SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List *Subject:* Re: [SR-Users] FW: Regd. t_suspend() and t_continue() Hi Shankar, What version of Kamailio are you running? Kamailio -V Cheers Jason On Wed, Jan 15, 2014 at 6:58 AM, Shankar shankar...@plintron.com wrote: Hi Jason, Please find below my response inline, I have some questions for you as we have used suspend/continue quite a lot in the IMS code and don't have any leaks. Firstly, why are you using pkg_mem for your hash_id and label? Remember that you will be in 2 different processes in the suspend and continue portions of the code... so pkg_mem will not work - you should use shm_mem instead. [Shankar] We use pkg_mem because we are invoking t_continue from the same process ( using thread ). Secondly, how are you using top to tell that you have a leak? Kamailio's memory is internally managed. [Shankar] After running for say 20minutes, we get out of shared memory error. Also in top output we observed incremental increase in the shared usage of shared memory for the process.
[SR-Users] Kamailio with extern Presence and XCAP server
Hi all, Since 2 weeks I am trying to get Kamailio presence and xcap servers working. I am testing with RCS clients (native android clients). Somehow the presence server of kamailio doesn't like some subscribe events of RCS for example Event: xcap-diff;path=resource-lists/users/sip:22...@kamailio.test/index, when RCS sends subscribe with this event, kamailio returns Bad Event... Another problem is some AUIDs used by RCS in the HTTP GETs for example ext-resource-lists. Kamailio doesn't support such as AUIDs and replies with not supported auid error Now I want to use extern presence and xdms servers, which run on the same virtual machine, where Kamailio is running. What should I do to achieve this? Any advice would be appreciated... Thanks Medo ___ 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
[SR-Users] P_usrloc - expired locations
Hi All, I am testing the p_usrloc module in order to write the location information of my kamailo server (Kamailio is on version 4.0.2) in two db As first test both DB are on the same machine, as well as the master db. On final version master and one db would probably be on the same machine and the second db on a different one. I have read on the p_usrloc module the following note: The p_usrloc module still has some missing feature, like automatic expiry of contacts and dumping of all users via the fifo cmd. And I can sadly see that the locations are not being deleted automatically after expiring. My users are mobile apps, that are programmed to be always logged in, and reconnecting to sip and IM servers if the devices detects a drop on the connection (bad wi-fi connection), or the user just move between different 3G cells. So the locations are most likely not going to be properly unregistered (expire 0) Have anyone found a solution or can give me some advice on how can I force the expired locations to be erased from the db, just as the usrloc module does? Thanks in advanced! Helena ___ 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] P_usrloc - expired locations
Am Donnerstag, 23. Januar 2014, 16:59:30 schrieb Helena Garcia-Nieto: I am testing the p_usrloc module in order to write the location information of my kamailo server (Kamailio is on version 4.0.2) in two db As first test both DB are on the same machine, as well as the master db. On final version master and one db would probably be on the same machine and the second db on a different one. I have read on the p_usrloc module the following note: The p_usrloc module still has some missing feature, like automatic expiry of contacts and dumping of all users via the fifo cmd. And I can sadly see that the locations are not being deleted automatically after expiring. [..] Have anyone found a solution or can give me some advice on how can I force the expired locations to be erased from the db, just as the usrloc module does? Hallo Helena, we use just a simple regular job (started with linux standard tools like cron etc..) that deletes regularly all old registrations on the databases. Use plain SQL, DELETE FROM $table WHERE expires NOW() or similar. Best regards, Henning Westerholt ___ 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] P_usrloc - expired locations
Hello Henning Thanks for the advice! We probably need to do that! But... there is no module configuration or simple kamailio configuration to do it? Thanks again!! Helena -Original Message- From: Henning Westerholt [mailto:h...@kamailio.org] Sent: jueves, 23 de enero de 2014 17:05 To: sr-users@lists.sip-router.org Cc: Helena Garcia-Nieto Subject: Re: [SR-Users] P_usrloc - expired locations Am Donnerstag, 23. Januar 2014, 16:59:30 schrieb Helena Garcia-Nieto: I am testing the p_usrloc module in order to write the location information of my kamailo server (Kamailio is on version 4.0.2) in two db As first test both DB are on the same machine, as well as the master db. On final version master and one db would probably be on the same machine and the second db on a different one. I have read on the p_usrloc module the following note: The p_usrloc module still has some missing feature, like automatic expiry of contacts and dumping of all users via the fifo cmd. And I can sadly see that the locations are not being deleted automatically after expiring. [..] Have anyone found a solution or can give me some advice on how can I force the expired locations to be erased from the db, just as the usrloc module does? Hallo Helena, we use just a simple regular job (started with linux standard tools like cron etc..) that deletes regularly all old registrations on the databases. Use plain SQL, DELETE FROM $table WHERE expires NOW() or similar. Best regards, Henning Westerholt ___ 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] P_usrloc - expired locations
Am Donnerstag, 23. Januar 2014, 17:13:11 schrieb Helena Garcia-Nieto: Ok! Thank you very much for the advice, I'll set up some crontab job for that! Hello Helena, ok, you could implement it with the help of the timer and sqlops module as well. Just before somebody else correct me here. ;-) But its probably easier for you as cron, if you don't know the details of the mentioned modules. Best regards Henning Westerholt ___ 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] P_usrloc - expired locations
Am Donnerstag, 23. Januar 2014, 17:06:12 schrieb Helena Garcia-Nieto: Thanks for the advice! We probably need to do that! But... there is no module configuration or simple kamailio configuration to do it? Hello Helena, no, there is no module configuration for that. I a big distributed setup there are some scenarios where you e.g. want to stop the deletion of old user contacts. Therefore the isolated solution, as a simple script, to gives you the flexiblity you need. And besides that, its just easier to implement, as you don't need to keep state with regards to the location data deletion process in Kamailio. Henning Westerholt ___ 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] P_usrloc - expired locations
Ok! Thank you very much for the advice, I'll set up some crontab job for that! Helena -Original Message- From: Henning Westerholt [mailto:h...@kamailio.org] Sent: jueves, 23 de enero de 2014 17:11 To: Helena Garcia-Nieto Cc: sr-users@lists.sip-router.org Subject: Re: [SR-Users] P_usrloc - expired locations Am Donnerstag, 23. Januar 2014, 17:06:12 schrieb Helena Garcia-Nieto: Thanks for the advice! We probably need to do that! But... there is no module configuration or simple kamailio configuration to do it? Hello Helena, no, there is no module configuration for that. I a big distributed setup there are some scenarios where you e.g. want to stop the deletion of old user contacts. Therefore the isolated solution, as a simple script, to gives you the flexiblity you need. And besides that, its just easier to implement, as you don't need to keep state with regards to the location data deletion process in Kamailio. Henning Westerholt ___ 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] Kamailio behind NAT
On 23.01.2014 10:29, John Smith wrote: Hello Klaus, I had already two sockets bound each to two independent physical interfaces. I have added the force_send_socket at each rtpproxy Just for clarity: force_send_socket is for near_end NAT traversal of the SIP signaling, whereas manage_rtpproxy() is for the NAT traversal (near end and far end) of the RTP stream. It is necessary to use the cwie / cwei flags in the rtpproxy_manage call? If rtpproxy uses only a single listen-IP, then these flags are not needed. Only if you operate rtpproxy in bridge mode, then you need these flags. Bridge mode is necessary if you do not have IP routing between the internal network and the virtual external network, or if you want to bridge between IPv4 and IPv6. Currently audio does not flow back to the softphones, it gets lost at Kamailio. Actually it should get lost at rtpproxy. Please post a SIP trace: ngrep -Wbyline -q -t -P port 5060 and post the setup (external + internal IP addresses) (you can send it privately to me or mangle the IP addresses if they are sensitive) regards Klaus ___ 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] Replicate registration
First of all thank you for your replies. I think I am quite close to solution. But still have NAT issues in some cases. I have added a bunch of code to the standard kamailio script. I defined a new flag #!define SOCK_FLAG 8 added these parameters to registrar module. modparam(registrar, sock_flag, SOCK_FLAG) modparam(registrar, sock_hdr_name, Sock-Info) set this flag in the nat test section if (nat_uac_test(19)) { if (is_method(REGISTER)) { fix_nated_register(); } else { fix_nated_contact(); } setflag(FLT_NATS); setflag(SOCK_FLAG); } and send it to the peer proxy to replicate client registration. I also added received parameter to the replicated packet. if ($si!=$sel(cfg_get.peer.srv_ip)) { add_rcv_param(); t_replicate(sip:10.173.187.226:5060 ;transport=udp); } Now, the issue is, the original proxy that receives the registration works as expected.Replicated proxy, has the location data as expected. But if I sent a call over second proxy, UA does not respond. I can see the INVITE packet that comes from replicated proxy on my client PC, but UA does not respond to INVITE that comes from second proxy. AOR:: 1...@test.example.net Contact:: sip:1002@10.173.191.72:1031;transport=udp;registering_acc=test_ example_net Q= Expires:: 544 Callid:: 443bb84315de2e2b637a55ab44c0b759@0:0:0:0:0:0:0:0 Cseq:: 256 User-agent:: Jitsi2.4.4997Linux Received:: sip:10.173.191.72:1024 State:: CS_NEW Flags:: 0 Cflag:: 192 Socket:: udp:10.192.208.194:5060 Methods:: 4294967295 Ruid:: uloc-52de6613-3dd4-28 Reg-Id:: 0 Last-Keepalive:: 1390512267 Last-Modified:: 1390512267 This is the ul show output on original proxy. Replicated proxy has nearly same values except Cflag and Socket. On replicated proxy, Cflag is 0 and Socket points to the original proxy. Is this output normal? Do I have anything missing in the setup? Thanks. /Volkan 2014/1/21 Daniel-Constantin Mierla mico...@gmail.com Hello, run with debug=3 in config file and see if there are log messages that gives you more details about what happens. Typically, when doing replication, you may need to replicate received and sometime socket information -- that can be done via headers and then added to avps before saving to location in the second peer. Look at the readme of registrar module for those parameters. Cheers, Daniel On 19/01/14 14:05, Volkan Oransoy wrote: Hi all, I am trying to setup an active-active pair of sip proxies. I have connected two kamailio boxes to the same PostgreSQL database and my usrloc db_mode is 3. I can see the registration data in the database but ul show outputs of two device is not same. I think writing registration data to the same db is not enough. I have found a method to replicate the registraiton process. With t_replicate, I synchronize REGISTER requests to both boxes. But I had to disable shared database because of uniqe id validations. route[REGISTRAR] { if (is_method(REGISTER)) { if(isflagset(FLT_NATS)) { setbflag(FLB_NATB); } if (!save(location)) sl_reply_error(); t_replicate(sip:10.1.1.2:5060;transport=udp); exit; } } My media servers randomly sends calls to SIP proxies. If Media server send the call to the original registrar then the replicated, call initiates normally. But when UA registered in first proxy, and Media server sends the call to the send one, even if second one has UA in location table, call does not initiate. Does anyone have an idea about this kind of an active active setup? Thanks in advance. Best regards, /Volkan ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda ___ 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 ___ 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] LCR help
On 01/22/2014 03:19 PM, Juha Heinanen wrote: Pete Ashdown writes: 2) How do I populate the rest of the LCR database? It appears that using kamctl lcr has been depreciated. Am I supposed to use Siremis? Is there any way to do this via shell? Does anyone have any scripts that digest csv rate decks from trunkers into the db for creation and update? you need to populate lcr tables manually unless you find a tool to do it for you. Thank you Juha. I'm muddling through this. One thing that is puzzling to me is that LCR entries are ranked by weight and priority, both integers. When I have a rate deck of costs like .003211 per minute per prefix, translating thousands of those to integers between 0 255 seems obtuse and inflexible. I would presume that least cost routing would have a column for cost. Am I seeing this wrong or using the wrong module? ___ 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] Replicate registration
Hi Volkan, You probably should take a look at the Path module. For UACs behind NAT, the INVITEs should be proxied via the server with which the client is registered. Best regards, Charles On 23 January 2014 21:41, Volkan Oransoy voran...@gmail.com wrote: First of all thank you for your replies. I think I am quite close to solution. But still have NAT issues in some cases. I have added a bunch of code to the standard kamailio script. I defined a new flag #!define SOCK_FLAG 8 added these parameters to registrar module. modparam(registrar, sock_flag, SOCK_FLAG) modparam(registrar, sock_hdr_name, Sock-Info) set this flag in the nat test section if (nat_uac_test(19)) { if (is_method(REGISTER)) { fix_nated_register(); } else { fix_nated_contact(); } setflag(FLT_NATS); setflag(SOCK_FLAG); } and send it to the peer proxy to replicate client registration. I also added received parameter to the replicated packet. if ($si!=$sel(cfg_get.peer.srv_ip)) { add_rcv_param(); t_replicate(sip:10.173.187.226:5060 ;transport=udp); } Now, the issue is, the original proxy that receives the registration works as expected.Replicated proxy, has the location data as expected. But if I sent a call over second proxy, UA does not respond. I can see the INVITE packet that comes from replicated proxy on my client PC, but UA does not respond to INVITE that comes from second proxy. AOR:: 1...@test.example.net Contact:: sip:1002@10.173.191.72:1031;transport=udp;registering_acc=test_ example_net Q= Expires:: 544 Callid:: 443bb84315de2e2b637a55ab44c0b759@0:0:0:0:0:0:0:0 Cseq:: 256 User-agent:: Jitsi2.4.4997Linux Received:: sip:10.173.191.72:1024 State:: CS_NEW Flags:: 0 Cflag:: 192 Socket:: udp:10.192.208.194:5060 Methods:: 4294967295 Ruid:: uloc-52de6613-3dd4-28 Reg-Id:: 0 Last-Keepalive:: 1390512267 Last-Modified:: 1390512267 This is the ul show output on original proxy. Replicated proxy has nearly same values except Cflag and Socket. On replicated proxy, Cflag is 0 and Socket points to the original proxy. Is this output normal? Do I have anything missing in the setup? Thanks. /Volkan 2014/1/21 Daniel-Constantin Mierla mico...@gmail.com Hello, run with debug=3 in config file and see if there are log messages that gives you more details about what happens. Typically, when doing replication, you may need to replicate received and sometime socket information -- that can be done via headers and then added to avps before saving to location in the second peer. Look at the readme of registrar module for those parameters. Cheers, Daniel On 19/01/14 14:05, Volkan Oransoy wrote: Hi all, I am trying to setup an active-active pair of sip proxies. I have connected two kamailio boxes to the same PostgreSQL database and my usrloc db_mode is 3. I can see the registration data in the database but ul show outputs of two device is not same. I think writing registration data to the same db is not enough. I have found a method to replicate the registraiton process. With t_replicate, I synchronize REGISTER requests to both boxes. But I had to disable shared database because of uniqe id validations. route[REGISTRAR] { if (is_method(REGISTER)) { if(isflagset(FLT_NATS)) { setbflag(FLB_NATB); } if (!save(location)) sl_reply_error(); t_replicate(sip:10.1.1.2:5060;transport=udp); exit; } } My media servers randomly sends calls to SIP proxies. If Media server send the call to the original registrar then the replicated, call initiates normally. But when UA registered in first proxy, and Media server sends the call to the send one, even if second one has UA in location table, call does not initiate. Does anyone have an idea about this kind of an active active setup? Thanks in advance. Best regards, /Volkan ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda ___ 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 ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org