Hi mailing,
I installed kamailio 3.2, rtpproxy 1.2.1, callcontrol 2.0.15 on a vz, and cdrtool 8.2.5 and freeradius 2.1.10 on another vz.
The 2 vz container have public ip address, and the UAC have private ip address.
I want to use rtpproxy, and the following are what ps and netstat command returns about rtpproxy: teddy@kamailio:~$ ps aux | grep rtpproxy teddy 22866 0.0 0.0 3312 800 pts/0 S+ 11:08 0:00 grep rtpproxy teddy 31326 0.0 0.0 11360 804 ? Ssl Apr06 0:02 /usr/sbin/rtpproxy -F -l our_public_ip -s udp:localhost 22222
teddy@kamailio:~$ sudo netstat -pln | grep rtp udp 0 0 127.0.0.1:22222 0.0.0.0:* 31326/rtpproxy
And my problem is: when I make calls, for example the UAC1 calls UAC2, with ngrep I see the UAC1 calls UAC1 and not UAC2, and I don't know why.
In kamailio config file, there are directive WITH_NAT for everything related to rtpproxy (loadmodule, routing logic, etc) as you can see in the attached conf file.
I try disable the use of this directive WITH_NAT so I disable the use of rtpproxy in kamailio and it works: when UAC1 calls UAC2, the UAC2 is ringing.
Please tell me what am I doing wrong, or to use rtpproxy without NAT is not possible ?
In attached file the kamailio config file, the diff between rtpproxy enable and rtpproxy disable, and the result of ngrep and what is in syslog when I made calls.
Thanks in advance.
Hello,
from ngrep, if 00900223 is same as 900223, then it is the incoming call that has caller==callee. This is before the call gets to SIP server, so it has nothing to do with SIP server itself, no matter it does rtpproxy or not.
Here is the head part of the incoming INVITE:
INVITE sip:00900223@sip.malagasy.com:5060;user=phone SIP/2.0. Via: SIP/2.0/UDP 192.168.18.74:5060;branch=z9hG4bK8031929703792643643-157087377. From: "900223"sip:900223@sip.malagasy.com:5060;user=phone;tag=c0a80101-95cf690. To: sip:00900223@sip.malagasy.com:5060;user=phone.
RTPProxy itself can be used without any nat involved in a call, simply for proxying the media stream.
If you use latest 3.2.x, to enable nat-traversal/rtpproxy, just add
#!define WITH_NAT
after the first line in config. You don't need to remove the lines with '#!ifdef WITH_NAT'.
Cheers, Daniel
On 4/10/12 12:58 PM, Rabary wrote:
Hi mailing,
I installed kamailio 3.2, rtpproxy 1.2.1, callcontrol 2.0.15 on a vz, and cdrtool 8.2.5 and freeradius 2.1.10 on another vz.
The 2 vz container have public ip address, and the UAC have private ip address.
I want to use rtpproxy, and the following are what ps and netstat command returns about rtpproxy: teddy@kamailio:~$ ps aux | grep rtpproxy teddy 22866 0.0 0.0 3312 800 pts/0 S+ 11:08 0:00 grep rtpproxy teddy 31326 0.0 0.0 11360 804 ? Ssl Apr06 0:02 /usr/sbin/rtpproxy -F -l our_public_ip -s udp:localhost 22222
teddy@kamailio:~$ sudo netstat -pln | grep rtp udp 0 0 127.0.0.1:22222 0.0.0.0:* 31326/rtpproxy
And my problem is: when I make calls, for example the UAC1 calls UAC2, with ngrep I see the UAC1 calls UAC1 and not UAC2, and I don't know why.
In kamailio config file, there are directive WITH_NAT for everything related to rtpproxy (loadmodule, routing logic, etc) as you can see in the attached conf file.
I try disable the use of this directive WITH_NAT so I disable the use of rtpproxy in kamailio and it works: when UAC1 calls UAC2, the UAC2 is ringing.
Please tell me what am I doing wrong, or to use rtpproxy without NAT is not possible ?
In attached file the kamailio config file, the diff between rtpproxy enable and rtpproxy disable, and the result of ngrep and what is in syslog when I made calls.
Thanks in advance.
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
Le 10/04/2012 14:19, Daniel-Constantin Mierla a écrit :
from ngrep, if 00900223 is same as 900223, then it is the incoming call that has caller==callee. This is before the call gets to SIP server, so it has nothing to do with SIP server itself, no matter it does rtpproxy or not.
thanks Daniel,
Sorry I make mistake, I was calling the same UAC which called, even if I am a newbie, this error is very ridiculous I restest, 900123 call 00900223, the result is in attached file "ngrep not working" And yes, 900223 and 00900223 are the same SIP account, I add 00 before the destination when I dial because with only 900223, I couldn't debit balance when I installed callcontrol and cdrtool, to make it works I insert in dbaliases table of kamailio database the following lines: mysql> use kamailio_db Database changed mysql> select * from dbaliases; +----+----------------+--------------+----------+------------------+ | id | alias_username | alias_domain | username | domain | +----+----------------+--------------+----------+------------------+ | 1 | 00900223 | | 900223 | sip.malagasy.com | | 2 | 00900123 | | 900123 | sip.malagasy.com | +----+----------------+--------------+----------+------------------+ 2 rows in set (0.00 sec) and just with kamailio+cdrtool+callconrol enabled and with this configuration in mysql table, I can debit balance for SIP account which is prepaid but maybe it's not the right method too, I'll re-check the documentation of cdrtool/callcontrol
So, I change the values of alias user_name column to be like in username column, I enable in kamailio conf all the WITH_NAT directive so I enable the use of rtpproxy too, I restart kamailio, make a test call and still not working, from ngrep (in attached file) I see not enough credit but in my tables of cdrtool's database I still have this: mysql> select * from prepaid; +----+-------------+-------------------------+-----------+---------------------+-----------------+-----------------+--------------+ | id | reseller_id | account | balance | change_date | active_sessions | session_counter | max_sessions | +----+-------------+-------------------------+-----------+---------------------+-----------------+-----------------+--------------+ | 1 | 0 | 900223@sip.malagasy.com | 1900.8635 | 2012-04-10 09:51:24 | [] | 0 | 1 | | 2 | 0 | 900123@sip.malagasy.com | 100.9790 | 2012-04-10 16:28:16 | [] | 0 | 1 | +----+-------------+-------------------------+-----------+---------------------+-----------------+-----------------+--------------+ mysql> select * from billing_rates; +----+-------------+------+-------------+-------------+-------------+--------------+---------------+----------------+ | id | reseller_id | name | destination | application | connectCost | durationRate | connectCostIn | durationRateIn | +----+-------------+------+-------------+-------------+-------------+--------------+---------------+----------------+ | 1 | 0 | 4G | 900 | audio | 0 | 1 | | | +----+-------------+------+-------------+-------------+-------------+--------------+---------------+----------------+
Last, I re-do an update at table dbaliases and for alias_username column I re-put 00, in kamailio configuration file I commented out the following lines: [...] ##!define WITH_NAT [...] remove_hf("Route"); if (is_method("INVITE|SUBSCRIBE")) { [...] #rtpproxy_offer(); [...] } [...] route[RELAY] { if (is_method("INVITE|SUBSCRIBE")) { #rtpproxy_offer(); #t_on_reply("1"); [...] } #onreply_route[1] { # if (status=~"[12][0-9][0-9]") # #force_rtp_proxy(); # rtpproxy_offer(); #}
I don't kill rtpproxy process, I restart kamailio, make a test call, and it works again, so I don't know what to do to have rtpproxy works
Regards.