I've seen a lot of discussions about running rtpproxy behind NAT.
The fact is that standard vanilla rtpproxy can run behind NAT without
any issues (no patches required).
A few things must be addressed:
- the proper ports must be forwarded from the public IP to the private IP;
- when calling rtpproxy_offer/answer, the second parameter must be
properly populated with the external public IP for streams from public
network.
I hope this brings some light over this highly debated topic.
Regards,
Ovidiu Sas
--
VoIP Embedded, Inc.
http://www.voipembedded.com
Hi all,
I have a question about Control RTPProxy in Bridge mode with distributed
Kamalio topology, including a SIP Load Balance, RTPProxies and some SIP
Proxies behind. SIPProxies control RTPProxy by Route [NATMANAGE].
PUBLIC IP ---- Load Balance -----> SIP Proxies
|
| control socket
PUBLIC IP < ----- RTPProxy <-----------------|
In the standalone Kamailio solution (only one SIP Server - without Load
Balance), I configured RTPProxy bridge mode, works PERFECTLY!!! , BUT in the
distributed Kamailio solution (LoadBalance -> Proxies) has big issue with
RTP:
- UA in front of NAT has only upload direction (1 way RTP) but UA
behind NAT has both direction (2 ways RTP).
RTP stream from UAC ------ > NAT ------ > RTPProxy Public Interface ------ >
RTPProxy Local Interface -------> UAS in local area network
RTP stream from UAS in local area network ------ > RTPProxy Local Interface
-------> STOPs HERE!!!, NOT Transfers out
The RTPProxy control is performed on the SIP Proxy (Route NATMANAGE has many
cases with flags WFROCEE, WFROCEI, WFROCIE).
In the case the same UA in front of NAT call (RTPProxy mode "WEE"), the call
occurs normally, RTP Streams is OK on both sides, but the call in cases EI
and IE has problems above.
What could be going on?
Thanks,
Nguyen Anh Tuan
Hello!
/kamilio 4.1.0/
Can anyone suggest why "location" table is empty despite that user
registration works?
save("location") return positive value. kamctl shows online users but if I
look into kamailio.location it's empty anytime.
# ----- registrar params -----
modparam("registrar", "method_filtering", 0)
modparam("registrar", "append_branches", 1)
modparam("registrar", "max_contacts", 10)
modparam("registrar", "max_expires", 3600)
...
Other strange the strange thing is that $rU is <null>.
regards,
Alexey
Hello,
Is there a straight forward way of getting the duration of the call in
cnxcc-call-shutdown event. The $DLG_lifetime returns NULL as the dialog
does not exist. I dont get the value of $DLG_lifetime even in dialog:end
event when the call ends through cnxcc module. Even the cdr flag of acc
module doesn't get the duration and it logs, invalid values !!
Currently, I am storing the timestamp in htable when the call is answered
and then subtract it from the current timestamp in the cnxcc:shutdown event
route to get the duration. Something like this:
onreply_route[MANAGE_REPLY] {
xdbg("incoming reply\n");
if(status=="200") {
$sht(ts=>$ci) = $Ts;
}
}
event_route[cnxcc:call-shutdown] {
$var(duration) = $TS-$sht(ts=>$ci);
sht_rm_name_re("ts=>$ci");
xlog("L_INFO", "Duration of call was $var(duration)");
}
Any more correct way of doing this would be very helpful.
Thanks,
--- Jayesh
Hi,
fix_nated_contact() and fix_nated_register() don't appear to change the Contact at all when the source of the message is TCP. I log the value of $ct before and after, and there is no change. Kamailio tries to send to the original private IP, as well.
The transport=TCP attribute is present in the Contact header in all cases.
Is there something I should know about how to make these functions work with TCP? If not, what's the solution?
Thank you,
-- Alex
--
Sent from my mobile, and thus lacking in the refinement one might expect from a fully fledged keyboard.
Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
United States
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com
Hello,
On 7/11/13 1:50 PM, Tony Turner wrote:
>
> Hi
>
> I am fine with registered users sending and receiving calls from/to PSTN.
>
>
> Now I route registered users calls to/from PSTN fine
>
> Kamailailio<----->freeswitch<------------>IVR (PSTN)
>
> Best Practice for routing Trusted peers (inbound) to IVR/PSTN (SIP
> Trunking Service)
>
> Trusted peer1 -----> Kamailio -----> freeswitch ------------> IVR (PSTN)
>
> Where do I/ how do I route calls from trusted peers not to users but
> down to PSTN IVR?
>
> Say for example Trusted Peer 1 sends to my Kamailio IP
> sip:398998xxxx@xx.xx.xx.xx:5060
>
> As I add a Trusted peer I would like to add a route and insert prefix
> for when it routes to freeswitch --->
>
> Do I use carrier route or LCR etc, I want to be able to add trusted
> peers but add routes without editing the config file and restarting
> Kamailio.
>
> The reason I ask is I'd prefer to do it correct method at the start as
> it's a nightmare changing once I have lots of trusted peers.
>
one way to do it is to use permissions modules to match the trusted
peers using the address table (with allow_source_address(...)). In the
address table, you can set the tag column to a value that you check in
config and decide what to do further with routing. For example, the tag
can be the LCR id or dispatcher setid.
You don't need to restart with above solution, just issue mi/rpc reload
commands for address and lcr/dispatcher whenever you change records in
database.
Cheers,
Daniel
--
Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Hi everyone, currently i am running 2 Asterisk Servers that share the same
dialplan and sip users, also they connect through DUNDi. Right now i need
that the users on certain network register to one of the 2 servers and in
case it fails, then kamailio should tell the phone to log in to the backup
server. After the main server for that location is restored the phones
should connect again to the main server.
something like this:
Location A Location B
network: 192.168.1.0/24 network: 192.168.2.0/24
main asterisk server: 192.168.1.1 main asterisk server:
192.168.2.1
backup asterisk server: 192.168.2.1 backup asterisk server:
192.168.1.1
Unless there's a failover situation the phones on Location A (network:
192.168.1.0/24) should login to their main server, same with Location B ,
as soon the problem is fixed they should failback to their main server
again, as i said both asterisk server share the same dialplan and sip-users.
I don't want to let kamailio handle the user registration, i just need it
to tell the phones which asterisk server should they contact based on their
IP and main/backup server status. I tried to do it using DNS-SRV instead of
Kamalio, it worked, but the phones never failback, also, DNS-SRV doesn't
tell what server should be used based on the network the request came from.
I've been trying to do this and really need help, any example would be
appreciated, thanks in advance. Also i'd like to know if this is possible
using H.323 protocol suit instead of SIP.
*Hello,*
I have two servers in kamailio duality, I am using the function t_replicate
() for replication log as below:
Server 1 active
t_replicate ("xxx.xxx.xxx.2", "5060");
Server 2 reserves
t_replicate ("xxx.xxx.xxx.1", "5060");
But when the record is replicated to the standby server the parameter
received is being filled with the active server IP, where the IP would
Correro UAC, registry problems generating the backup server.
Example
Server 1 active xxx.xxx.xxx.1
$ Kamctl ul show
Domain :: location table = 512 records = 1 = 1 max_slot
AOR :: 4301
Contact :: sip: 4301(a)yyy.yyy.yyy.100; transport = udp Q =
Expires :: 4566
Callid :: ccd0431c-6a4c-1231-0a94-7356c4f466e6
CSeq :: 46740150
User-agent :: stepo_LITE
Received :: sip: yyy.yyy.yyy.100: 5060
State :: CS_SYNC
Flags :: 0
CFLAG :: 0
Socket :: udp: xxx.xxx.xxx.1: 5060
Methods :: 8159
Server 2 Reserve xxx.xxx.xxx.2
$ Kamctl ul show
Domain :: location table = 512 records = 1 = 1 max_slot
AOR :: 4301
Contact :: sip: 4301(a)yyy.yyy.yyy.100; transport = udp Q =
Expires :: 6665
Callid :: ec7cfd42-6a7c-1231-0f94-7356c4f466e6
CSeq :: 46750472
User-agent :: stepo_LITE
Received :: sip: xxx.xxx.xxx.1: 5060
State :: CS_SYNC
Flags :: 0
CFLAG :: 0
Socket :: udp: xxx.xxx.xxx.2: 5060
Methods :: 8159
Tkanks
Raphael