Hi,
I am have managed to create the zone file, (sipserver.ipaxiom.com) and have
tried running the command
[root@sipserver saber]# dig -t SRV _sip._udp.sipserver.ipaxiom.com
; <<>> DiG 9.2.1 <<>> -t SRV _sip._udp.sipserver.ipaxiom.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 38430
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;_sip._udp.sipserver.ipaxiom.com. IN SRV
;; Query time: 19 msec
;; SERVER: 81.86.193.6#53(81.86.193.6)
;; WHEN: Sun Apr 25 23:08:32 2004
;; MSG SIZE rcvd: 49
as you can see u I do not get the answer from the server. I am may have done
something wrong, I have included the sipserver.ipaxiom.com.zone file
You may be able to point me in the right direction.
below is the zone file
[root@sipserver saber]# more /var/named/sipserver.ipaxiom.com.zone
sipserver.ipaxiom.com 86400 IN SOA
sipserver.ipaxiom.com. customercare.ipaxiom.com (
1998111908 ; serial
36000 ; refresh
900 ; retry
36000 ; expire
28800 ; minimum
)
IN NS sipserver.ipaxiom.com.
IN A 81.86.193.8
;
_sip._udp SRV 0 0 5060 gateway.sipserver.ipaxiom.com.
gateway IN A 81.86.193.8
www IN CNAME gateway.sipserver.ipaxiom.com.
Hope to hear from you soon.
many thanks
Best Regards
Saber
email: saber(a)ipaxiom.com
IPaXiom Communications
Due to a known limitation in the Cisco IOS, it is not possible to restrict the duration of a call on a Cisco gateway. Since I have been hit by this a couple of times - one time having 6 timeslots on an E1 open for 3 days - I would like to hear any suggestions on how to remedy this utilizing the SER.
Feel free... :-)
Sincerely,
Peter
Hi :
I have download the latest ser and all modules with CVS (2004/04/21)
i still testing the same environment with nathelper , rtpproxy
UA 1(kphone 3.14) -> NAT -> Ser <- UA 2 (kphone
3.14)
UA1 can register to ser with public (after NAT ) correctly ,
but when UA 2 INVITE UA1
When UA1 reply 200 OK with SDP
Ser seems not modify the SDP to public ip and port
so when UA2 receive SDP , it still can't know or should say it can't send
rtp to correct IP:port
it seems my config has some bug , so sdp has not been modify ??
can any one give my any ideas?
and
in this scenario , is ser modify the sdp to force UA to send rtp to ser
then rtpproxy will handle the both UAs' rtp to transport to the both UAs?
these are my ser.cfg refered from
(http://www.informatik.uni-bremen.de/~prelle/terena/cookbook/main/ch04s07.ht
ml )
============================================================================
#
# $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 andrei Exp $
#
# simple quick-start config script
#
# ----------- global configuration parameters ------------------------
#debug=3 # debug level (cmd line: -dddddddddd)
#fork=yes
#log_stderror=no # (cmd line: -E)
#/* 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)
#port=5060
#children=4
fifo="/tmp/ser_fifo"
# ------------------ module loading ----------------------------------
# Uncomment this if you want to use SQL database
#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"
#++++++++++ jimmy added ++++++++++++++++++
loadmodule "/usr/local/lib/ser/modules/textops.so"
loadmodule "/usr/local/lib/ser/modules/nathelper.so"
#----------------------------------------------------
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
#loadmodule "/usr/local/lib/ser/modules/auth.so"
#loadmodule "/usr/local/lib/ser/modules/auth_db.so"
# ----------------- setting module-specific parameters ---------------
#++++++++++ jimmy added ++++++++++++++++++
#we will you flag 6 to mark NATed contacts
modparam("registrar","nat_flag",6)
#Enable NAT pinging
modparam("nathelper","natping_interval",3)
#ping only contacts that are known to be behind NAT
modparam("nathelper","ping_nated_only",1)
#----------------------------------------------------
# -- 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)
# ------------------------- request routing logic -------------------
# main routing logic
route{
#++++++++++ jimmy added ++++++++++++++++++
if(nat_uac_test("3"))
{
if((method == "REGISTER") || !(search("^Record-Route:")))
{
log("LOG:Someone trying to register from private IP, rewriting\n");
fix_nated_contact();
if(method == "INVITE")
{
#+++++
log("+++++++++++++++++++++++++++++++++++++\n");
log("method==invite , so fix+nated_sdp\n");
log("+++++++++++++++++++++++++++++++++++++\n");
#-----
fix_nated_sdp("1");
};
force_rport();
setflag(6);
};
};
#----------------------------------------------------
# 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;
};
# 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;
};
# 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("iptel.org", "subscriber")) {
# www_challenge("iptel.org", "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();
};
}
#++++++++++ jimmy added +++++++++++++++++++++
route[1]
{
if(uri=~"[@:](192\.168\.|10\.|172\.16)" && !search("^Route:"))
{
sl_send_reply("479","we don't forward to private IP address");
break;
};
if(isflagset(6))
{
force_rtp_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();
};
}
#----------------------------------------------------
============================================================================
thanks
Jimmy
In the current CVS unstable version there seams to be a bug in the
ser_mysql.sh:
I have tried to upgrade from my stable 0.8.12 to the CVS unstable and
found the following issues:
bhoeneis@wil:~/ser/sip_router$ scripts/ser_mysql.sh reinstall
MySql password for root:
creating backup database
dumping table content (ser)
dropping table (ser)
creating new structures
creating database ser ...
restoring table content
ERROR 1054 at line 42: Unknown column 'usernamename' in 'field list'
reinstall: restoring table failed
I solved this by commenting out the following line in ser_mysql.sh
# sed "s/[uU][sS][eE][rR]/$USERCOL/g" |
But then thow following error came as next after running the
"fixed" ser_mysql.sh:
ERROR 1054 at line 108: Unknown column 'perms' in 'field list'
This one I circumvented by inserting a line, which does replace all the
strings perms by rpid as follows:
sed "s/[uU][sS][eE][rR]_[iI][dD]/user/g" $tmp_file |
# sed "s/[uU][sS][eE][rR]/$USERCOL/g" |
sed "s/[pP][eE][rR][mM][sS]/rpid/g" |
sed "s/[rR][eE][aA][lL][mM]/domain/g"> ${tmp_file}.2
After running it again I executed the following in the mysql client:
update subscriber set rpid="NULL" where rpid !="NULL"
I hope someone can fix this once...
and that my fix really helps...;-)
cheers,
Bernie
PS: Here the diff for a quick and dirty fix:
bhoeneis@wil:~/ser/sip_router$ cvs diff -u scripts/ser_mysql.sh
Index: scripts/ser_mysql.sh
===================================================================
RCS file: /cvsroot/ser/sip_router/scripts/ser_mysql.sh,v
retrieving revision 1.52
diff -u -r1.52 ser_mysql.sh
--- scripts/ser_mysql.sh 13 Apr 2004 19:14:32 -0000 1.52
+++ scripts/ser_mysql.sh 20 Apr 2004 17:39:49 -0000
@@ -697,7 +697,8 @@
exit 1
fi
sed "s/[uU][sS][eE][rR]_[iI][dD]/user/g" $tmp_file |
- sed "s/[uU][sS][eE][rR]/$USERCOL/g" |
+ # sed "s/[uU][sS][eE][rR]/$USERCOL/g" |
+ sed "s/[pP][eE][rR][mM][sS]/rpid/g" |
sed "s/[rR][eE][aA][lL][mM]/domain/g"> ${tmp_file}.2
#3 drop original database
echo "dropping table ($DBNAME)"
Hi,
I managed to get rid of the Wrong FIFO Interface version. Now I'm getting
these errors on /var/log/messages and in sems debug mod, when making a
call with the same configuration. Is it again due to a problem in
versrion? The the sems is downloaded from ftp site and is
sems_2004_01_04.tar.gz. I tried this with ser downloaded via cvs and the
one from the ftp site. Any ideas?
Apr 25 09:16:06 compaq2 ser[30320]: ERROR: fifo_server: command vm_reply
is not available
Apr 25 09:16:06 compaq2 ser[30320]: ERROR: fifo_server: command must have
at least 3 chars
Apr 25 09:16:06 compaq2 ser[30320]: ERROR: fifo_server: command must begin
with :: 000076B70A6C036D
Apr 25 09:16:06 compaq2 ser[30320]: ERROR: fifo_server: command must begin
with :: Content-Type: application/sdp
Apr 25 09:16:06 compaq2 ser[30320]: ERROR: fifo_server: command must begin
with :: v=0
Apr 25 09:16:06 compaq2 ser[30320]: ERROR: fifo_server: command must begin
with :: s=session
Apr 25 09:16:06 compaq2 ser[30320]: ERROR: fifo_server: command must begin
with :: t=0 0
Apr 25 09:16:06 compaq2 ser[30320]: ERROR: fifo_server: command must begin
with :: a=rtpmap:3 gsm/8000
Apr 25 09:16:06 compaq2 ser[30320]: ERROR: fifo_server: command vm_reply
is not available
Apr 25 09:16:06 compaq2 ser[30320]: ERROR: fifo_server: command must begin
with :: could not send response.
Apr 25 09:16:06 compaq2 ser[30320]: ERROR: fifo_server: command must begin
with :: 000076B70A6C036D
Apr 25 09:16:06 compaq2 ser[30320]: ERROR: fifo_server: command must have
at least 3 chars
---------------------------------------------------------------------
sems debug mode shows this
---------------------------------------------------------------------
v=0
o=username 0 0 IN IP4 24.248.99.200
s=session
c=IN IP4 24.248.99.200
t=0 0
m=audio 39340 RTP/AVP 3
a=rtpmap:3 gsm/8000
.
>
(30452) DEBUG: openReplyFifo (AmRequest.cpp:358): flags=800
(30452) DEBUG: openReplyFifo (AmRequest.cpp:360): flags=0
(30452) DEBUG: write_to_fifo (AmRequest.cpp:702): Write to fifo: completed
(30452) DEBUG: getReturnCode (AmRequest.cpp:413): response from Ser: 500
command 'vm_reply' not available
(30452) DEBUG: sendToFIFO (AmRequest.cpp:213): sendToFifo returns
ret=getReturnCode=0
(30452) ERROR: reply (AmRequest.cpp:309): AmRequestUAS::reply: 500 command
'vm_reply' not available
(30452) ERROR: run (AmSession.cpp:155): 500 could not send response.
(30452) DEBUG: sendToFIFO (AmRequest.cpp:194):
msg=<:vm_reply:000076F4226615DC
500
could not send response.
58537:73151574
000076B70A6C036D
Contact: <sip:1001@24.248.99.200:5090>
.
.
>
(30452) DEBUG: openReplyFifo (AmRequest.cpp:358): flags=800
(30452) DEBUG: openReplyFifo (AmRequest.cpp:360): flags=0
(30452) DEBUG: write_to_fifo (AmRequest.cpp:702): Write to fifo: completed
(30452) DEBUG: getReturnCode (AmRequest.cpp:413): response from Ser: 500
command 'vm_reply' not available
(30452) DEBUG: sendToFIFO (AmRequest.cpp:213): sendToFifo returns
ret=getReturnCode=0
(30452) ERROR: reply (AmRequest.cpp:309): AmRequestUAS::reply: 500 command
'vm_reply' not available
(30452) DEBUG: sadSession (AmSession.cpp:305): searching for session to
destroy
(hash=AF821C77-9705-11D8-AA55-00A0C9703D22(a)203.143.58.1931664479517,sess_key=000076B70A6C036D)
(30452) DEBUG: findSession (AmSession.cpp:369): session found with key
(30452) DEBUG: destroySession (AmSession.cpp:327): sess_it !=
a_sessions.end()
(30452) DEBUG: destroySession (AmSession.cpp:330): it !=
sess_it->second.end()
(30452) DEBUG: destroySession (AmSession.cpp:337): session found: stopping
session
(30452) DEBUG: stopAndQueue (AmSession.cpp:285): session cleaner trying to
stop 80c7b30
(30452) DEBUG: postEvent (AmEventQueue.cpp:47): AmEventQueue: trying to
post event
(30452) DEBUG: postEvent (AmEventQueue.cpp:55): AmEventQueue: event posted
(30452) DEBUG: destroySession (AmSession.cpp:339): session stopped and
destroyed (#sessions=0)
(30394) DEBUG: run (AmSession.cpp:238): Session cleaner starting its work
(30394) DEBUG: run (AmSession.cpp:252): session 80c7b30 has been destroyed'
(30394) DEBUG: run (AmSession.cpp:275): Session cleaner finished
-----------------------------------------------------------------------
Regards,
Lakmal
Lankacom Services (Pvt) Ltd.
65C, Dharmapala Mawatha,
Colombo 07.
Sri Lanka.
Tel: +94-1-437545
www.lankacom.net
Hi,
I've tried to test the pa module (ser 0.8.12) in conjunction with the
SCS Client.
The SCS Client appends a special generic param: 'ScsId=ch' at the
From: header in the subscribe message. And the NOTIFY answer from
ser contains this param but omits the semicolon. So the NOTIFY message
will be treated as wrong.
The ser config for SUBSCRIBE method is straight forward:
if (method=="SUBSCRIBE")
{
if (t_newtran())
{
handle_subscription("registrar");
};
}; # subscribe
The ngrep output for this transaction is:
#
U 195.4.20.71:5060 -> 194.97.99.50:5060
SUBSCRIBE sip:snom@fn-sip.mcbone.net SIP/2.0..Via: SIP/2.0/UDP 195.4.20.71.
.To: sip:snom@fn-sip.mcbone.net..From: <sip:aboeger@fn-sip.mcbone.net>;tag
=11b78ed1b717552;ScsId=ch..Call-ID: dc8b5b893e68391d9b2dfc807f8e3ba2..CSeq:
1325665313 SUBSCRIBE..Max-Forwards: 70..Contact: sip:195.4.20.71..Event: p
resence..Expires: 3600..Content-Length: 0..User-Agent: SCS/v3.1.12.33....
#
U 194.97.99.50:5060 -> 195.4.20.71:5060
SIP/2.0 200 OK..Via: SIP/2.0/UDP 195.4.20.71..To: sip:snom@fn-sip.mcbone.ne
t;tag=91083b2aa33cb6d5c9260125dc95d5f0-efd4..From: <sip:aboeger@fn-sip.mcb
one.net>;tag=11b78ed1b717552;ScsId=ch..Call-ID: dc8b5b893e68391d9b2dfc807f8
e3ba2..CSeq: 1325665313 SUBSCRIBE..Server: Sip EXpress router (0.8.12a (i38
6/linux))..Content-Length: 0..Warning: 392 194.97.99.50:5060 "Noisy feedbac
k tells: pid=26439 req_src_ip=195.4.20.71 req_src_port=5060 in_uri=sip:sno
m(a)fn-sip.mcbone.net out_uri=sip:snom@fn-sip.mcbone.net via_cnt==1"....
#
U 194.97.99.50:5060 -> 195.4.20.71:5060
NOTIFY sip:195.4.20.71 SIP/2.0..Via: SIP/2.0/UDP 194.97.99.50;branch=z9hG4b
K6d55.e01a2e91.0..To: <sip:aboeger@fn-sip.mcbone.net>ScsId=ch;tag=11b78ed1b
717552..From: sip:snom@fn-sip.mcbone.net;tag=91083b2aa33cb6d5c9260125dc95d5
f0-efd4..CSeq: 1 NOTIFY..Call-ID: dc8b5b893e68391d9b2dfc807f8e3ba2..Content
-Length: 302..User-Agent: Sip EXpress router(0.8.12a (i386/linux))..Event:
presence..Content-Type: application/xpidf+xml..Subscription-State: active;e
xpires=3600....<?xml version="1.0"?>..<!DOCTYPE presence PUBLIC "//IETF//DT
D RFCxxxx XPIDF 1.0//EN" "xpidf.dtd">..<presence>..<presentity uri="sip:sno
m(a)fn-sip.mcbone.net;method=SUBSCRIBE"/>..<atom id="9r28r49">..<address uri=
"sip:snom@fn-sip.mcbone.net">..<status status="closed"/>..</address>..</ato
m>..</presence>..
#
U 195.4.20.71:5060 -> 194.97.99.50:5060
SIP/2.0 400 Syntax Error..Call-ID: dc8b5b893e68391d9b2dfc807f8e3ba2..CSeq:
1 NOTIFY..From: sip:snom@fn-sip.mcbone.net;tag=91083b2aa33cb6d5c9260125dc95
d5f0-efd4..Via: SIP/2.0/UDP 194.97.99.50;branch=z9hG4bK6d55.e01a2e91.0..Con
tent-Length: 136..Content-Type: text/plain....While parsing "To": header ex
pected CRLF.. Missing or invalid To header.. Missing or invalid To header..
Missing or invalid To header..
#
For me it seems to be an error in ser. Have anyone an idea for a workaround?
Regards,
Axel
Hello.
There is a mess with 'prefix' argument to 'make install' (as
suggested by INSTALL text) in stable CVS version. SER is installed in
correct place, but is still trying to search ser.cfg in
/usr/local/etc/ser/ by default.
This happens due to the fact that the default value of $prefix
(/usr/local) is used (CFG_DIR = $cfg-target = $prefix/$cfg-dir) during
compilation (when no prefix is given). So, installing to different
location with 'make prefix=xxx install' produces the mess.
Probably, the described issue affects other pieces of software.
Workaround: always use make command with your prefix=xxx argument,
i.e. $ make prefix=/my/prefix all; sudo make prefix=/my/prefix install
Could anybody fix the problem? (At least in INSTALL file.)
...Bye..Dmitry.
Please always CC the list, comments inline:
On 25-04 18:42, Saber Fakih wrote:
> Thanks Jan,
>
> I traced where the problem was, with regards to the ser.cfg ser restarts
> fine thanks.
>
> I am now trying to work on the zone file, quick question; would I be
> editing, the localhost.zone file in /var/named using vi or is there an
> easy way of doing it, how would I set this, any ideas. I am looking for
> this info.
>
> _sip._udp SRV 0 0 5060 gateway.mydomain.com
>
Why don't you read the documentation first ?, See
http://iptel.org/ser/doc/ser-howto/ser-Howto.html#AEN132
> Another thing I tried logging in using WM 4.7, does not recognise my
> server (sipserver.ipaxiom.com), hence entered the IP and it found the
> server, however when enter the user details I get is signing in session
> for a while which then times out. Is what I should be expecting?? Any
> ideas.
This is a known issue with WM, digest realm must be equal to the domain
part of From/To URI, this is not the case when you use IP address.
Jan.
Hi,
I'm trying to implement voicemail with ser_0.8.12 and sems_0.1.0 on the
same machine. All servers seem to be running alright, but when I dial a
user who's voicemail option is enabled, and is offline, the xlite displays
"trying" for a while and then 408 request timeout.
The logs in /var/log/messages says
Error: ## Wrong FIFO Interface version ##
Any idea about this?
Configurations are as follows.
voicemail.cfg
-------------------------------------------------------------------------------------
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
port=5090
children=4
fifo="/tmp/vm_ser_fifo"
fifo_mode=438
alias=eagle.lankacom.net
alias=203.143.0.120
# ------------------ module loading ----------------------------------
loadmodule "/usr/local/lib/ser/modules/sl.so"
loadmodule "/usr/local/lib/ser/modules/tm.so"
loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
loadmodule "/usr/local/lib/ser/modules/mysql.so"
loadmodule "/usr/local/lib/ser/modules/vm.so"
# ----------------- setting module-specific parameters ---------------
modparam("voicemail", "db_url","mysql://ser:heslo@localhost/ser")
# ------------------------- request routing logic -------------------
# main routing logic
route{
# initial sanity checks -- messages with
# max_forwars==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;
};
if (!uri==myself) {
sl_send_reply("404", "not reponsible for host in r-uri");
break;
};
# Voicemail specific configuration - begin
if(method=="ACK" || method=="INVITE" || method=="BYE"){
if (!t_newtran()) {
log("could not create new transaction\n");
sl_send_reply("500","could not create new
transaction");
break;
};
t_reply("100","Trying -- just wait a minute !");
if(method=="INVITE"){
log("**************** vm start - begin ******************\n");
if (uri=~"sip:*@*" || uri=~"sip:*@*") {
if (!vm("/tmp/am_fifo", "announcement")) {
log("couldn't contact announcement
server\n");
t_reply("500", "couldn not contact
announcement server");
};
} else {
if(!vm("/tmp/am_fifo","voicemail")){
log("could not contact the answer
machine\n");
t_reply("500","could not contact
the answer machine");
};
};
log("**************** vm start - end
******************\n");
} else if(method=="BYE"){
log("**************** vm end - begin
******************\n");
if(!vm("/tmp/am_fifo","bye")){
log("could not contact the answer
machine\n");
t_reply("500","could not contact the
answer machine");
};
log("**************** vm end - end
******************\n");
};
break;
};
if (method=="CANCEL") {
sl_send_reply("200", "cancels are junked here");
break;
};
sl_send_reply("501", "method not understood here");
}
---------------------------------------------------------------------------------------
vm_proxy.cfg
---------------------------------------------------------------------------------------
alias=eagle.lankacom.net
alias=203.143.0.120
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/mysql.so"
loadmodule "/usr/local/lib/ser/modules/group.so"
loadmodule "/usr/local/lib/ser/modules/usrloc.so"
loadmodule "/usr/local/lib/ser/modules/registrar.so"
# time to give up on ringing -- global timer, applies to
# all transactions
modparam("tm", "fr_inv_timer", 90)
# database with user group membership
modparam("group", "db_url", "mysql://ser:heslo@localhost/ser")
# --------------------- request routing logic ------------------- route {
if (!mf_process_maxfwd_header("10")) {
log("LOG: Too many hops\n");
sl_send_reply("483", "Alas Too Many Hops");
break;
};
if (!(method=="REGISTER")) record_route();
if (loose_route()) {
t_relay();
break;
};
if (!uri==myself) {
t_relay();
break;
};
if (method == "REGISTER") {
if (!save("location")) {
sl_reply_error();
};
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")) {
setflag(4);
};# native SIP destinations are handled using our USRLOC DB if
(!lookup("location")) {
# handle user which was not found
route(4);
break;
};
# if user is on-line and is in voicemail group, enable redirection
if (method == "INVITE" && isflagset(4)) {
t_on_failure("1");
};
t_relay();
}
# ------------- handling of unavailable user ------------------
route[4] {
# non-Voip -- just send "off-line"
if (!(method == "INVITE" || method == "ACK" || method ==
"CANCEL")) {
sl_send_reply("404", "Not Found");
break;
};
# not voicemail subscriber
if (!isflagset(4)) {
sl_send_reply("404", "Not Found and no voicemail turned
on");
break;
};
# forward to voicemail now
# rewritehostport("eagle.lankacom.net:5090");
# t_relay_to_udp("eagle.lt_relay_to_udp( "eagle.lankacom.net",
"5090" );
break;
}
failure_route[1] {
revert_uri();
rewritehostport("eagle.lankacom.net:5090");
append_branch();
t_relay_to_udp("eagle.lankacom.net", "5090");
}
Regards,
Lakmal
Lankacom Services (Pvt) Ltd.
65C, Dharmapala Mawatha,
Colombo 07.
Sri Lanka.
Tel: +94-1-437545
www.lankacom.net
Hi,
I looked at the archieve and tried to find a solution
for natted clients in a carrier environment. I have to
say I am clear as mud. In our senario, some clients
are behind nat, while others are not. Clients may move
between nat and no-nat. What's the best approach to
rtpproxy/mediaproxy. In rtpproxy's readme, it uses
"search" to find certain client. It has issues to
support other clients. Is nat_uac_test/client_nat_test
sufficient to test either src or dest is behind nat
and should go through media proxy? What if some
clients have stun support? What if some are behind
symmetric NAT and some are not?
Thanks for your help.
Richard
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25�
http://photos.yahoo.com/ph/print_splash