Hallo....
I have made a SER(SIP express router) server. i have try it in local network and it work. the client can call each other. when i try the server use IP public. a have a problem. i try using 2 client.one client uses static ip and other client uses ip public. local client can call and comunicate with the public client. but when public client call local client, it doesn't work. there some error message "408 : request time out". for information local client was under a firewall. Can you tell me the couse of error? is this because of the firewall? or there some script or other setting that must be added to the server.?
Sita Rosita
___________________________________________________
Have your own email and web address for life.
http://www.homemaster.net - Homemaster. Come Together. Online.
Hallo....
I have made a SER(SIP express router) server. i have try it in local network and it work. the client can call each other. when i try the server use IP public. a have a problem. i try using 2 client.one client uses static ip and other client uses ip public. local client can call and comunicate with the public client. but when public client call local client, it doesn't work. there some error message "408 : request time out". for information local client was under a firewall. Can you tell me the couse of error? is this because of the firewall? or there some script or other setting that must be added to the server.? thanks for help, i wait the answer as soon as possible.
---------------------------------
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
Hello
I have rtproxy and ser installed on one box. All of my SIP phones works
properly. I like to know how to make a transfer or call forwarding.
thank you in advance!
steven
Hello
My SER implementation includes Asterisk voicemail for unavailable
users, Radius Accounting, Digest Authentication and PSTN gateway
forwarding, everything works very well but now I am trying
NatHelper/rtpproxy for nated endpoints, nated clients are registering
with public IP but I cannot hear incoming audio in nated X-lite
clients even if I use Port Forwarding or enable DMZ in NAT device
(LinkSys), I am very confused because I can hear audio from
Asterisk... maybe I have some problem in ser, please take a look to my
configuration file and send me some advice, thanks
rafael
PS: myser.cfg based on
http://cvs.berlios.de/cgi-bin/viewcvs.cgi/ser/sip_router/etc/nathelper.cfg?…
/usr/local/etc/ser/Ser_VM_RadAcc_NatHelp-Test1.cfg
# Version: We are using: Sip EXpress router (0.8.99-dev1 (i386/linux))
(Agosto 2004)
# This default script includes nathelper support. To make it work
# you will also have to install Maxim's RTP proxy. The proxy is enforced
# if one of the parties is behind a NAT.
#
# If you have an endpoing in the public internet which is known to
# support symmetric RTP (Cisco PSTN gateway or voicemail, for example),
# then you don't have to force RTP proxy. If you don't want to enforce
# RTP proxy for some destinations than simply use t_relay() instead of
# route(1)
#
# Sections marked with !! Nathelper contain modifications for nathelper
# ----------- global configuration parameters ------------------------
#/* Uncomment these lines to enter debugging mode
debug=9
fork=yes
log_stderror=yes
#*/
listen=100.110.*.*
listen=127.0.0.1
port=5060
# hostname matching an alias will satisfy the condition uri==myself".
alias=my.domain.com.pe
alias=100.110.*.*
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
children=4
fifo="/tmp/ser_fifo"
# sip_warning - Should replies include extensive warnings?
# By default yes, it is good for trouble-shooting.
sip_warning=yes
# ------------------ module loading ----------------------------------
loadmodule "/usr/local/lib/ser/modules/mysql.so"
loadmodule "/usr/local/lib/ser/modules/sl.so"
loadmodule "/usr/local/lib/ser/modules/tm.so"
loadmodule "/usr/local/lib/ser/modules/rr.so"
loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
loadmodule "/usr/local/lib/ser/modules/usrloc.so"
loadmodule "/usr/local/lib/ser/modules/registrar.so"
loadmodule "/usr/local/lib/ser/modules/group.so"
loadmodule "/usr/local/lib/ser/modules/uri.so"
loadmodule "/usr/local/lib/ser/modules/uri_db.so"
loadmodule "/usr/local/lib/ser/modules/acc.so"
loadmodule "/usr/local/lib/ser/modules/textops.so"
# digest authentication
loadmodule "/usr/local/lib/ser/modules/auth.so"
loadmodule "/usr/local/lib/ser/modules/auth_db.so"
# !! Nathelper
loadmodule "/usr/local/lib/ser/modules/nathelper.so"
# ----------------- setting module-specific parameters ---------------
modparam("usrloc", "db_mode", 2)
# storing passwords in our database in plain text:
# modparam("auth_db", "calculate_ha1", yes)
# modparam("auth_db", "password_column", "password")
# For Rad Accounting
modparam("acc", "radius_config","/usr/local/etc/radiusclient/radiusclient.conf")
modparam("acc", "service_type", 15)
modparam("acc", "radius_flag", 1)
modparam("acc", "radius_missed_flag", 3)
modparam("acc", "report_ack", 0) # 1 reporta dos starts en acc
modparam("tm", "fr_timer", 20 )
modparam("tm", "fr_inv_timer", 30 )
modparam("tm", "wt_timer", 20 )
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
modparam("group", "db_url", "mysql://ser:heslo@localhost/ser") #
"mysql" in cvs head version
# modparam("uri", "db_url", "sql://ser:heslo@localhost/ser") # "sql" in ser0814
modparam("uri_db", "db_url", "mysql://ser:heslo@localhost/ser") #
"mysql" in cvs head version
# ------------- registration parameters
modparam("registrar", "nat_flag", 6)
modparam("registrar", "min_expires", 60)
modparam("registrar", "max_expires", 86400)
modparam("registrar", "default_expires", 3600)
modparam("registrar", "desc_time_order", 1)
modparam("registrar", "append_branches", 1)
# !! Nathelper
# modparam("registrar", "nat_flag", 6)
modparam("nathelper", "natping_interval", 30) # Ping interval 30 s
modparam("nathelper", "ping_nated_only", 1) # Ping only clients behind NAT
# -------------------------- request routing logic --------------------------
route {
log(1, "-------------------------------------------\n");
log(1, "entering main loop\n");
# 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;
};
# !! Nathelper
# 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 is used); also,
# the received test should, if completed, should check all
# vias for rpesence 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 enough to be symmetric. In some phones it
takes a configuration
# option. With Cisco 7960, it is called
NAT_Enable=Yes, with kphone it is
# called "symmetric media" and "symmetric signalling".
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
};
};
# 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
if (!method=="REGISTER") record_route();
# subsequent messages withing a dialog should take the
# path determined by record-routing
if (loose_route()) {
# mark routing logic in request
append_hf("P-hint: rr-enforced\r\n");
# t_relay(); ### use If don't want to enforce RTP proxy
route(1); ### Nathelper!!
break;
};
# set Flag for Radius Accounting:
if (method=="INVITE") {
log(1, "INVITE MESSAGE RECEIVED - START ACC\n");
setflag(1); /* set for accounting (the same value as
in log_flag!) */
};
if (method=="BYE") {
log (1, "BYE - STOP ACCOUNTING\n");
setflag(1);
};
if (method=="CANCEL") {
log (1, "CANCEL - STOP ACCOUNTING\n");
setflag(1);
};
setflag(3); # Set Radius Missed Flag (radius_missed_flag
param...)
if (!uri==myself) {
# mark routing logic in request
append_hf("P-hint: outbound\r\n");
# t_relay();
route(1);
break;
};
if (uri==myself) {
if (method == "REGISTER") {
log(1, "ANALYZING REGISTER REQUEST\n");
# to use digest authentication
if (!www_authorize("my.domain.com.pe", "subscriber")) {
www_challenge("my.domain.com.pe", "0");
break;
};
if (!save("location")) {
sl_reply_error();
};
break;
};
/* ***************** very insecure Dial out to PSTN
logic ****************** */
### Pendiente agregar seguridad a esta etapa, usar
Digest-Auth o "credentials"
### ver http://www.voip-info.org/wiki-SER+example+pstn
# forward n digit requests to gateway AS5350
if(uri=~"^sip:9"){
log(1,"n digit expression match - Celulares Lima");
rewritehostport("100.110.*.*:5060");
route(2);
break;
};
# forward international calls to Asterisk (using Oh323
module to connect with H323 GWs)
if(uri=~"^sip:00"){
rewritehostport("100.110.*.*:5060");
log(1,"n digit expression match - LDI");
route(2);
break;
};
/*
********************************************************************
*/
lookup("aliases");
if (!uri==myself) {
append_hf("P-hint: outbound alias\r\n");
# t_relay();
route(1);
break;
};
# does the user wish redirection on no availability?
(i.e., is he
# in the voicemail group?) -- determine it now and store it in
# flag 4, before we rewrite the flag using UsrLoc
if (is_user_in("Request-URI", "voicemail")) {
log(1, "requested user is in voicemail group");
setflag(4);
};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
log(1,"unable to locate user");
# handle user which was not found
route(4);
break;
};
}; # End of "if(uri==myself)"
append_hf("P-hint: usrloc applied\r\n");
route(1);
# if user is on-line and is in Voicemail group, enable redirection
if (method == "INVITE" && isflagset(4)) {
log(1, "invite for voicemail user->initiate failureroute[1]\n");
t_on_failure("1");
};
# t_relay();
}
route[1]
{
# !! Nathelper
if (uri=~"[@:](192\.168\.)" && !search("^Route:")){
sl_send_reply("479", "We don't forward to private IP addresses");
break;
};
# if client or server know to be behind a NAT, enable relay
if (isflagset(6)) {
force_rtp_proxy();
};
# NAT processing of replies; apply to all transactions (for example,
# re-INVITEs from public to private UA are hard to identify as
# NATed at the moment of request processing); look at replies
t_on_reply("1");
# send it out now; use stateful forwarding as it works reliably
# even for UDP2TCP
if (!t_relay()) {
sl_reply_error();
};
}
# !! Nathelper
onreply_route[1] {
# NATed transaction ?
if (isflagset(6) && status =~ "(183)|2[0-9][0-9]") {
fix_nated_contact();
force_rtp_proxy();
# otherwise, is it a transaction behind a NAT and we did not
# know at time of request processing ? (RFC1918 contacts)
} else if (nat_uac_test("1")) {
fix_nated_contact();
};
}
# ----------------- SIP-to-PSTN call routed -------------------
route[2]{
log(1,"route[2]:SIP-to-GW call routed");
if(!t_relay()){
sl_reply_error();
};
}
# --------------- Handling of Unavailable user ----------------
route[4] {
# non-Voip -- just send "off-line"
if (!(method=="INVITE" || method=="ACK" || method=="CANCEL" ||
method=="BYE")) {
sl_send_reply("404", "Not Found");
acc_rad_request("404 Not Found");
break;
};
# not voicemail subscriber
if (!isflagset(4)) {
sl_send_reply("404", "Not Found and no voicemail turned on");
acc_rad_request("404 Not Found");
break;
};
### Forward to * voicemail adding prefix "vm" to simplify *
"extension.conf" to this:
### exten => _vmXXXXXXX,1,Voicemail(u${EXTEN:2})
### exten => _vmXXXXXXX,2,Hangup
prefix("vm");
rewritehostport("100.110.**.**:5060");
t_relay_to_udp("100.110.**.**","5060");
}
# if forwarding downstream did not succeed, try voicemail running at Asterisk
failure_route[1]{
if (t_check_status("485")){
revert_uri ();
prefix("vm");
rewritehostport ("100.110.**.**:5060");
append_branch();
t_relay();
break;
}
}
Since I'm able to modify the URI for relaying, I would assume there
would be a way to modify the FROM_URI as well. Has anyone managed to do
this with SER acting as a proxy? Any other possible avenues to modify
the CALLID?
Best regards
Nope... it wont because that will be executed upon REGISTER for both calling
and called (where they register) and SER will KNOW from flag that one of
parties behind then NAT after lookup(location) upon INVITE, it doen not
matter caller or called.. if one of then behind then nat (flag 4 set) - do
rtpproxy
_____
From: Tina [mailto:kramarv@yahoo.com]
Sent: Wednesday, February 23, 2005 4:15 PM
To: Vitaly Nikolaev
Subject: RE: [Serusers] User ser+nathelper+rtppoxy as outbound server
Thank you, I'll try this
(though I think nat_uac_test() will fail, because the calling party not
behind the NAT).
BRs,
Tina
Vitaly Nikolaev <vitaly(a)voipsonic.com> wrote:
That where u need to use flags
Example:
If register -
if (nat_uac_test("4")) {
setflag(4);
force_rport();
};
if (nat_uac_test("1")) {
setflag(4);
fix_nated_contact();
};
Now you will have flag set in location database.
Now when u have INVITE regardless of from nat to non nat or from non nat to
nat client you wil do lookup("location")
And then if any contact has flag set it will do _OR_ for it.. and then you
can do:
if (isflagset(4))
do rtp proxy
do not forget do rtp proxy in onreplay and do all usual stuff flike:
fix_nated_contact();fix_nated_sdp
_____
From: serusers-bounces(a)iptel.org [mailto:serusers-bounces@lists.iptel.org] On
Behalf Of Tina
Sent: Wednesday, February 23, 2005 3:00 PM
To: serusers(a)lists.iptel.org
Subject: [Serusers] User ser+nathelper+rtppoxy as outbound server
========================================================
----Original Message-----
From: Jiang zhou [mailto:zjiang at sipod.com
<http://lists.iptel.org/mailman/listinfo/serusers> ]
Sent: Thursday, September 02, 2004 6:06 PM
To: Richard; serusers <http://lists.iptel.org/mailman/listinfo/serusers> at
iptel.org
Subject: Re: [Serusers] User ser+nathelper+rtppoxy as outbound server
I think the normal Nathelper+rtpproxy will have a bug for public ua call a
nated ua.
ua1(pblic ip) ------->ser(nathelper+rtpproxy)----->nat----->ua2
ua2 can call ua1.
The ua2's invite sdp can be modified by nathelper and rewrite the ip/port to
rtpproxy's ip/port . So ua1 send voice to rtpproxy to ua1
Ua1 can't call ua2.
Ua1's Invite message will fail in nat_uac_test("3") test. So ser dos't
setflag for this invite and don't use the rtpproxy.
Ua2's reply can't be modified by nathelper. So Ua1 find the reply with a
private ip.
So ua2 can't send voice to ua1, only ua1 send voice to ua2.
Is it right?
If use a ser+rtppoxy as a outbound server, I can resovle this issue.
===========================================================
I encountered into exactly the same problem:
UA1 ->SER->NAT->UA2
nathelper does not forces RTP relay upon INVITE (because there is no need),
and 200 OK SDP won't be rewrited (lookup mode). Help me please whether I can
resolve this problem in configuration file.
Thanks a lot,
Tina
_____
Do you Yahoo!?
Take
<http://us.rd.yahoo.com/mail_us/taglines/mobile/*http:/mobile.yahoo.com/mail
demo> Yahoo! Mail with you! Get it on your mobile phone.
_____
Do you Yahoo!?
Yahoo! Mail - 250MB free storage. Do
<http://us.rd.yahoo.com/evt=29915/*http:/info.mail.yahoo.com/mail_250>
more. Manage less.
========================================================
----Original Message-----
From: Jiang zhou [mailto:zjiang at sipod.com]
Sent: Thursday, September 02, 2004 6:06 PM
To: Richard; serusers at iptel.org
Subject: Re: [Serusers] User ser+nathelper+rtppoxy as outbound server
I think the normal Nathelper+rtpproxy will have a bug for public ua call a
nated ua.
ua1(pblic ip) ------->ser(nathelper+rtpproxy)----->nat----->ua2
ua2 can call ua1.
The ua2's invite sdp can be modified by nathelper and rewrite the ip/port to
rtpproxy's ip/port . So ua1 send voice to rtpproxy to ua1
Ua1 can't call ua2.
Ua1's Invite message will fail in nat_uac_test("3") test. So ser dos't
setflag for this invite and don't use the rtpproxy.
Ua2's reply can't be modified by nathelper. So Ua1 find the reply with a
private ip.
So ua2 can't send voice to ua1, only ua1 send voice to ua2.
Is it right?
If use a ser+rtppoxy as a outbound server, I can resovle this issue.
===========================================================
I encountered into exactly the same problem:
UA1 ->SER->NAT->UA2
nathelper does not forces RTP relay upon INVITE (because there is no need), and 200 OK SDP won't be rewrited (lookup mode). Help me please whether I can resolve this problem in configuration file.
Thanks a lot,
Tina
---------------------------------
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
Charles,
I'm not a real expert with RPID, but basically when you send a SIP
call to a PSTN gateway, the RPID header, if present, should be honored
by the PSTN gateway and it should use the values of the RPID header
for things like Caller ID or Caller ID Blocking.
RPID may also have other functionality- but like I said, I'm not an
expert on the subject.
Regards,
Paul
On Thu, 24 Feb 2005 01:40:06 +0800, Charles Wang <lazy.charles(a)gmail.com> wrote:
> Dear Paul:
>
> I am a new user of SER sip. And would you please tell me an explain
> about what the RPID is??
>
> I want to control the call to PSTN with B2BUA of vovida or Asterisk.
>
> Best Regard
> Charles
>
> On Wed, 23 Feb 2005 10:33:26 -0500, Java Rockx <javarockx(a)gmail.com> wrote:
> > Vitaly,
> >
> > I believe you are correct that RPID is only helpful during SIP->PSTN calls.
> >
> > I'm not real familiar with B2BUA, but if I were to introduce one in to
> > my system, does that mean I need to have all the RTP traffic pass
> > through my network as well, or does the B2BUA only deal with SIP
> > messaging?
> >
> > Regards,
> > Paul
> >
> > On Wed, 23 Feb 2005 10:14:18 -0500, Vitaly Nikolaev
> > <vitaly(a)voipsonic.com> wrote:
> > >
> > > The answer is B2BUA
> > >
> > > There actually two ways,
> > >
> > > First is b2bua which is nice (for me ok.. I like it :)
> > >
> > > Second if you assign the CallerID number to device.. the real callerid, (for
> > > example in my network we use some fake numbers into devices and then change
> > > it do real callerid (did) in b2bua), then some devices, for example SIPURA,
> > > can send Anonymous as name in From and Contact and some GWs, will use it and
> > > hide callerid on outgoing call.
> > >
> > > And third:
> > >
> > > And there are also Remote-Party-Id: field in SIP that partially supported by
> > > SER and supported by most of GW and carriers, and that is probably RIGHT way
> > > to do that.
> > >
> > > When PSTN GW sends call to outside of ur network, it no just skip callerid,
> > > u can do it but it is wrong, it make it private, so usual ppl will not see
> > > it but for example 911 and some toll free subscriber will see. That right
> > > way and that how everybody should do cli blocking.
> > >
> > > What is wrong in this method is that if you call goes from SIP to SIP and
> > > you use as me fake CLI on devices, customers will see fake numbers because
> > > as far as I know SIP devices does not support RPID (please correct me if I
> > > am wrong) so in my case I will have to use combination of N1 and N3..
> > >
> > >
> > > -----Original Message-----
> > > From: serusers-bounces(a)iptel.org [mailto:serusers-bounces@lists.iptel.org] On
> > > Behalf Of Java Rockx
> > > Sent: Wednesday, February 23, 2005 7:20 AM
> > > To: Klaus Darilion
> > > Cc: serusers(a)lists.iptel.org
> > > Subject: Re: [Serusers] Manipulate from_uri
> > >
> > > Klaus,
> > >
> > > I realize that RFC3261 says do not modify the From header, however, my
> > > question is this;
> > >
> > > When making SIP-to-SIP calls between two subscribers on the same SIP
> > > proxy, how can one implement Caller ID Block when RPID is not usually
> > > honored by SIP UAs - since this is really for PSTN gateways?
> > >
> > > It seems that altering the From header in this case is the only
> > > option. Have I missed something?
> > >
> > > Regards,
> > > Paul
> > >
> > > On Wed, 23 Feb 2005 12:00:14 +0100, Klaus Darilion
> > > <klaus.mailinglists(a)pernau.at> wrote:
> > > > Hi Mik!
> > > >
> > > > Do not modify the From: or To: URI - this is not allowed (RFC 3261) and
> > > > will cause problems.
> > > >
> > > > regards,
> > > > klaus
> > > >
> > > > Mik Cheez wrote:
> > > > > Since I'm able to modify the URI for relaying, I would assume there
> > > > > would be a way to modify the FROM_URI as well. Has anyone managed to do
> > > > > this with SER acting as a proxy? Any other possible avenues to modify
> > > > > the CALLID?
> > > > >
> > > > > Best regards
> > > > >
> > > > > _______________________________________________
> > > > > Serusers mailing list
> > > > > serusers(a)lists.iptel.org
> > > > > http://lists.iptel.org/mailman/listinfo/serusers
> > > > >
> > > > >
> > > >
> > > > _______________________________________________
> > > > Serusers mailing list
> > > > serusers(a)lists.iptel.org
> > > > http://lists.iptel.org/mailman/listinfo/serusers
> > > >
> > >
> > > _______________________________________________
> > > Serusers mailing list
> > > serusers(a)lists.iptel.org
> > > http://lists.iptel.org/mailman/listinfo/serusers
> > >
> > >
> >
> > _______________________________________________
> > Serusers mailing list
> > serusers(a)lists.iptel.org
> > http://lists.iptel.org/mailman/listinfo/serusers
> >
>