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.