Hi Bogdan,
Goodmorning,
Please forgive in My english,..........
I install the openser server ( with public ip as xx.xxx.xxx.xxx. ) and the
System ip ( private ip openser) is 192.168.2.2 which is located In some
other place for UAs. And SIP_Domain as xx.xxx.xxx.xxx.
I installed the X-lite 3.0 and testing with that only...
Missed calls and Ignore calls are working fine........Here ACK is working,
When the softphone Rings , and lefted up , after 32 seconds the callee is
hunging ups and Caller is still in establishing the call ( not hung up)
Problem in , After the Invite request send , then it will to send ACk to
callee , to maintain the session alive ,
For example :- UA1 ( caller) -------------------> UA2 (callee )
::::::::::::::-----------> Both are in OutSide the NAT , in other network
)
Here Callee is Hungs up the calls automaticall,
IS the Problem in Router logic or in Router (Switches ) where is openser
located , or where X-lite is there.
Router ( switches) is stoppning the ACK ,
Bogdan, Help in this ,, here is my openser.cfg......
*************************************************************************************
route{
# -----------------------------------------------------------------
# Sanity Check Section
# -----------------------------------------------------------------
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
exit;
};
if (msg:len >= 2048 ) {
sl_send_reply("513", "Message too big");
exit;
};
# -----------------------------------------------------------------
# NAT detection
# -----------------------------------------------------------------
route(2);
# -----------------------------------------------------------------
# Record Route Section
# -----------------------------------------------------------------
if (!method=="REGISTER")
record_route();
# -----------------------------------------------------------------
# Loose Route Section
# -----------------------------------------------------------------
if (loose_route()) {
append_hf("P-hint: rr-enforced\r\n");
if ((method=="INVITE" || method=="REFER") && !has_totag()) {
sl_send_reply("403", "Forbidden");
return;
};
if (method=="INVITE") {
if (!proxy_authorize("xx.xxx.xxx.xxx","subscriber")) {
proxy_challenge("xx.xxx.xxx.xxx","0");
return;
} else if (!check_from()) {
sl_send_reply("403", "Use From=ID");
return;
};
consume_credentials();
};
route(1);
};
# -----------------------------------------------------------------
# Call Type Processing Section
# -----------------------------------------------------------------
if (!is_uri_host_local()) {
if (is_from_local() || allow_trusted()) {
route(4);
route(1);
} else {
sl_send_reply("403", "Forbidden");
};
};
if (method=="ACK") {
route(1);
return;
} else if (method=="CANCEL") {
route(1);
return;
} else if (method=="INVITE") {
route(5);
return;
} else if (method=="REGISTER") {
route(4);
return;
};
lookup("aliases");
if (!is_uri_host_local()) {
route(4);
route(1);
return;
};
if (!lookup("location")) {
sl_send_reply("404", "User Not Found");
exit;
};
append_hf("P-hint: usrloc applied\r\n");
route(1);
}
route[1] {
if (subst_uri('/(sip:.*);nat=yes/\1/')){
setflag(6);
};
if (isflagset(5)||isflagset(6)) {
route(3);
}
if (!t_relay()) {
sl_reply_error();
};
exit;
}
route[2]{
force_rport();
if (nat_uac_test("19")) {
if (method=="REGISTER") {
fix_nated_register();
} else {
fix_nated_contact();
};
setflag(5);
};
}
route[3] {
if (is_method("BYE|CANCEL")) {
unforce_rtp_proxy();
} else if (is_method("INVITE")){
force_rtp_proxy();
t_on_failure("1");
};
if (isflagset(5))
search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');
t_on_reply("1");
}
route[4] {
if (!www_authorize("xx.xxx.xxx.xxx", "subscriber")) {
www_challenge("xx.xxx.xxx.xxx", "0");
exit;
};
if (isflagset(5)) {
setflag(6);
# if you want OPTIONS natpings uncomment next
# setflag(7);
};
save("location");
if (!lookup("location")) {
sl_send_reply("401", "Unauthorized");
};
append_hf("P-hint: usrloc applied\r\n");
}
route[5] {
# -----------------------------------------------------------------
# INVITE Message Handler
# -----------------------------------------------------------------
if (!allow_trusted()) {
if (!proxy_authorize("xx.xxx.xxx.xxx","subscriber")) {
proxy_challenge("xx.xxx.xxx.xxx","0");
return;
} else if (!check_from()) {
sl_send_reply("403", "Use From=ID");
return;
};
};
lookup("aliases");
if (!is_uri_host_local()) {
route(1);
return;
};
if (uri=~"^sip:[0-9]@") {
lookup("aliases");
lookup("location");
route(1);
return;
};
if(!lookup("location")){
sl_send_reply("404", "User Not Found");
return;
};
route(1);
}
failure_route[1] {
if (isflagset(6) || isflagset(5)) {
unforce_rtp_proxy();
}
}
onreply_route[1] {
if ((isflagset(5) || isflagset(6)) && status=~"(183)|(2[0-9][0-9])") {
force_rtp_proxy();
}
search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');
if (isflagset(6)) {
fix_nated_contact();
}
exit;
}
--
Thanks and Regards with cheers
Sunkara Ravi Prakash (Voip Developer)
Hyperion Technology
Kondapur, Hi-tech city,
Hyderabad.
www.hyperion-tech.com
+91-9985077535
Hi,
The docs state that if drop() is called in onreply_route[], any
provisional replies are discarded. How about final replies?
What I want to achieve is to rewrite some reply codes, like:
onreply_route[x] {
if(status=="302") {
t_reply("480", "Something");
drop();
}
}
Would this work as intended?
Thanks,
Andy
Hi Joao,
No I was not able to solve the issue.
It seems (this is my guess tough) that the Portaone RTP proxy assumes that it has one public IP adress, so the valid configuration to use it is Public Nt-Private Nt. I was not able to make it work in other configurations (neiher I got feedback from Portaone to do so).
Nevertheless the code is available, so it could be modified...as long as you have the time and will to do so. I did not ;).
Best regards,
josé
-----Original Message-----
From: Joao Pereira [mailto:joao.pereira@fccn.pt]
Sent: 19. oktober 2005 20:17
To: Jose Soler; serusers(a)lists.iptel.org
Subject: Re: [Serusers] RTP proxy between two subnetworks with private @s
Hello, did you made it to put the clients of networks A and B to call
each other?
I want to do the same, and tried a lot of SER/RTPproxy configurations,
including the one in: /ser-0.9.0/modules/nathelper/examples/alg.cfg
and also tried to run rtpproxy with the "-l 10.0.0.135/193.136.2.2" option. But I just was able to ring the phones (wen calling between networks),
but the RTP doesnt pass...
If you found the solution, please tell me.
Thanks
Joao Pereia
www.fccn.pt
Jose Soler wrote:
> Hi,
>
> I am trying to figure out how to solve the follwoing problem. I have
> two subnetworks, A and B, with different private ip adressing schemes
> (IP@A <mailto:IP@A>) and (IP@B <mailto:IP@B>).
>
> SER is installed in a computer with network interfaces towards both
> subnetworks.
> SER's SIP signalling proxying operation works properly within the
> subnetworks and when trying to set up a communication between users in
> A and B. But in that last case, obviously there is no media at all
> circulating among the subnetworks.
>
> Portaone's RTP proxy has been installed and configured in the computer
> with interfaces towards both subnetworks where SER is installed.
>
> I am trying to configure SER so that, based on the nathelper module,
> when communication between both subnetworks occurs, the RTP proxy is
> involved and the communication (also media and not only signalling) is
> possible. BUT I am making something wrong, becouse it does not work ...
>
> Can anyone give me a hand /hint?
> Thanks a lot in advance / in any case.
>
> My SER config file is the following:
>
>
> #
>
> # ----------- global configuration parameters ------------------------
>
> /* Uncomment these lines to enter debugging mode
>
> debug=7
>
> fork=no
>
> log_stderror=yes
>
> */
>
> check_via=no # (cmd. line: -v)
>
> dns=no # (cmd. line: -r)
>
> rev_dns=no # (cmd. line: -R)
>
> fifo="/tmp/ser_fifo"
>
> fifo_mode=0662
>
> alias=wirelessip.x.x.x
>
> alias=sip..x.x.x
>
> alias=x.x.x
>
> log_stderror=no
>
> debug=3
>
> children=3
>
> mhomed=1
>
> # ------------------ module loading ----------------------------------
>
> # Uncomment this if you want to use SQL database
>
> loadmodule "/lib/ser/modules/mysql.so"
>
> loadmodule "/lib/ser/modules/sl.so"
>
> loadmodule "/lib/ser/modules/tm.so"
>
> loadmodule "/lib/ser/modules/rr.so"
>
> loadmodule "/lib/ser/modules/maxfwd.so"
>
> loadmodule "/lib/ser/modules/usrloc.so"
>
> loadmodule "/lib/ser/modules/textops.so"
>
> loadmodule "/lib/ser/modules/registrar.so"
>
> # Uncomment this if you want digest authentication
>
> # mysql.so must be loaded !
>
> loadmodule "/lib/ser/modules/auth.so"
>
> loadmodule "/lib/ser/modules/auth_db.so"
>
> # For NAT support / media proxying
>
> loadmodule "/lib/ser/modules/nathelper.so"
>
> # ----------------- setting module-specific parameters ---------------
>
> # -- usrloc params --
>
> #modparam("usrloc", "db_mode", 0)
>
> # Uncomment this if you want to use SQL database
>
> # for persistent storage and comment the previous line
>
> modparam("usrloc", "db_mode", 2)
>
> # -- auth params --
>
> # Uncomment if you are using auth module
>
> modparam("auth_db", "calculate_ha1", yes)
>
> # If you set "calculate_ha1" parameter to yes (which true in this
> config),
>
> # uncomment also the following parameter)
>
> modparam("auth_db", "password_column", "password")
>
> # -- rr params --
>
> # add value to ;lr param to make some broken UAs happy
>
> modparam("rr", "enable_full_lr", 1)
>
> # For NAT
>
> # We will use flag 6 to mark NATed contacts
>
> modparam("registrar", "nat_flag", 6)
>
> # Enable NAT pinging
>
> modparam("nathelper", "natping_interval", 60)
>
> # Ping only contacts that are known to be
>
> # behind NAT
>
> modparam("nathelper", "ping_nated_only", 1)
>
> # ------------------------- request routing logic -------------------
>
> # main routing logic
>
> route{
>
> # initial sanity checks -- messages with
>
> # max_forwards==0, or excessively long requests
>
> if (!mf_process_maxfwd_header("10")) {
>
> sl_send_reply("483","Too Many Hops");
>
> break;
>
> };
>
> if ( msg:len > max_len ) {
>
> sl_send_reply("513", "Message too big");
>
> break;
>
> };
>
> # special handling for NATed clients; first, nat test is
>
> # executed: it looks for via!=received and RFC1918 addresses
>
> # in Contact (may fail if line-folding used); also,
>
> # the received test should, if complete, should check all
>
> # vias for presence of received
>
> if (nat_uac_test("3")) {
>
> # allow RR-ed requests, as these may indicate that
>
> # a NAT-enabled proxy takes care of it; unless it is
>
> # a REGISTER
>
> if (method == "REGISTER" || ! search("^Record-Route:")) {
>
> log("LOG: Someone trying to register from private IP, rewriting\n");
>
> # This will work only for user agents that support symmetric
>
> # communication. We tested quite many of them and majority is
>
> # smart smart enough to be symmetric. In some phones, like
>
> # it takes a configuration option. With Cisco 7960, it is
>
> # called NAT_Enable=Yes, with kphone it is called
>
> # "symmetric media" and "symmetric signaling". (The latter
>
> # not part of public released yet.)
>
> fix_nated_contact(); # Rewrite contact with source IP of signalling
>
> if (method == "INVITE") {
>
> fix_nated_sdp("1"); # Add direction=active to SDP
>
> };
>
> force_rport(); # Add rport parameter to topmost Via
>
> setflag(6); # Mark as NATed
>
> };
>
> };
>
> # we record-route all messages -- to make sure that
>
> # subsequent messages will go through our proxy; that's
>
> # particularly good if upstream and downstream entities
>
> # use different transport protocol
>
> record_route();
>
> # loose-route processing
>
> if (loose_route()) {
>
> t_relay();
>
> break;
>
> };
>
> lookup("aliases");
>
> # if the request is for other domain use UsrLoc
>
> # (in case, it does not work, use the following command
>
> # with proper names and addresses in it)
>
> if (uri==myself) {
>
> if (method=="REGISTER") {
>
> # Uncomment this if you want to use digest authentication
>
> if (!www_authorize("com.dtu.dk", "subscriber")) {
>
> www_challenge("com.dtu.dk", "0");
>
> break;
>
> };
>
> save("location");
>
> break;
>
> };
>
> # native SIP destinations are handled using our USRLOC DB
>
> if (!lookup("location")) {
>
> sl_send_reply("404", "Not Found");
>
> break;
>
> };
>
> };
>
> # forward to current uri now; use stateful forwarding; that
>
> # works reliably even if we forward from TCP to UDP
>
> if (!t_relay()) {
>
> sl_reply_error();
>
> };
>
> }
>
> #
>
> # Forcing media relay if necessary
>
> #
>
> route[1] {
>
> #if (uri=~"[@:](192\.168\.|10\.|172\.16)" && !search("^Route:")){
>
> # sl_send_reply("479", "We don't forward to private IP addresses");
>
> # break;
>
> #};
>
> #if (isflagset(6)) {
>
> force_rtp_proxy(); # I force everything through the proxy
>
> t_on_reply("1");
>
> append_hf("P-Behind-NAT: Yes\r\n");
>
> #};
>
> if (!t_relay()) {
>
> sl_reply_error();
>
> break;
>
> };
>
> }
>
> onreply_route[1] {
>
> if (status =~ "(183)|2[0-9][0-9]") {
>
> fix_nated_contact();
>
> force_rtp_proxy();
>
> };
>
> }
>
>
>
>
>
>
>
>
>-----------------------------------------------------------------------
>-
>
>_______________________________________________
>Serusers mailing list
>serusers(a)lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
>
>
Hi,
I'm using SER with nathelper and rtpproxy as a proxy to guard a PSTN gateway
( calls can only be generated by SIP client and terminated to PSTN, no SIP
to SIP or PSTN to SIP calls allowed, REGISTER is not needed ).
PSTN gateway and SER eth0 have pubblic internet IP address ( SER eth0
x.x.x.246, PSTN gateway with two interfaces, x.x.x.243 for SIP and
x.x.x.244 for RTP ), SER is setted to force rtpproxy for every call and
rtpproxy is started in standard mode: this is running fine, every client
from internet ( behind a NAT box or not ) is able to place calls.
Now the problem is that I need to collect SIP traffic from another non
routable network to the PSTN gateway ( es. 10.0.0.0 )
I have connected SER interface eth1 to this network ( ip 10.0.0.1 ) and I am
trying to connect to the PSTN from a client in the network 10.0.0.0: SIP
signaling seems to be ok, but I'm unable to setup RTP stream.
With this configuration it appears that RTPproxy try to connect to PSTN
gateway on x.x.x.243 and not x.x.x.244.
I have tryied to set RTP proxy in bridge mode ( rtpproxy -l
x.x.x.246/10.0.0.1 ) without succes, but documentation is not very clear
about this case (I think it has been designed for client to client, not
client to PSTNgateway ).
...
if (dst_ip == x.x.x.246) { #!! Internet IP address
force_rtp_proxy("FI");
t_on_reply("1");
} else if (dst_ip == 10.0.0.1) { #!! Private IP address
force_rtp_proxy("FE");
t_on_reply("1");
};
...
Now the question is: what is the correct design to implement this ?
RTPproxy in standard mode ?
RTPproxy in bridge mode ? ( how ??? )
Mediaproxy ?
Any help would be appreciated, many thanks in advance.
Fabio
Hi All
Pls. guide me how can we implement failover on SIP Server located globally, Like one server in USA another in UK.
Ritesh Jalan
Mobile: 91-9818616329
MSN: ritesh_jalan(a)hotmail.com
Is anyone working on a document to show the steps required to upgrade from SER
0.9.x to SER 0.10.x? There appear to be MASSIVE changes to the structure of
the DB as well as to the way the config is handled in some areas. Serctl has
vanished and been replaced with three programs (a bit of a step backward
there, but I'm assuming they'll be reintegrated into one solid command at some
point), acc has vanished and been replaced with three modules (another step
backward in usability/readability, but I'm sure there was a reason for it
somewhere), etc.
It would be nice if all the changes one would have to make in order to go from
a 0.9.x release to a 0.10.x release were listed somewhere (in one place,
please... not in three separate files ;) ).
Is this being worked on, or is this something we should start to compile for
the good of those who come after? :)
N.
Hello, I'm using Openser 1.0.1 with PA module and eyebeam clients. When
eyebeam receives a presence NOTIFY to a SUBSCRIBE, it responds with a "481
Call/Transaction Does Not Exist". Why? I've read that PA is unstable, but I
suspect that this module doesn't work properly.
This is a piece of the cfg file:
loadmodule "mysql.so"
loadmodule "sl.so"
loadmodule "tm.so"
loadmodule "rr.so"
loadmodule "maxfwd.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "textops.so"
loadmodule "avpops.so"
loadmodule "uri.so"
loadmodule "jabber.so"
loadmodule "pa.so"
loadmodule "auth.so"
loadmodule "xlog.so"
...
modparam("pa","use_db",0)
...
route{
...
if (method=="SUBSCRIBE")
{
if (t_newtran())
{
handle_subscription("registrar");
};
return;
};
if (method=="PUBLISH")
{
if (t_newtran())
{
xlog("L_ERR", ">>>>>>>>>>>>>>> PUBLISH REGISTRAR SIP");
handle_publish("registrar");
};
return;
};
...
}
Hi!
I just found out that xten offers a new xlite, based on eyebeam. AFAIK
this is the first free available Windows SIP client with video and IM.
As IMO eyebeam is the best client for testing and debugging purposes
(because you can configure everything) I think this is interesting for
you too.
regards
Klaus
Hello!
May be my question is very stupid, but i cant solve one problem.
I need to join 2 values in avps into one
for example, i have
avp("i:70") = '12345'
avp("i:80") = '67890'
how can i join i:70 and i:80 into i:90 with value '1234567890'?