Hi all,
I set up ser + asterisk.
Asterisk is registred as gateway(a)home.net and listen
port 5070 (same box).
two hard phones are registred as bob(a)home.net and
alice(a)home.net .
from alice or bob i want to call 01013 to PSTN without
success.
ser lookup location and aliases and so reply not found
thought i set forward ?
Thanks for your help
Harry
# ----------- global configuration parameters
------------------------
debug=5 # 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)
listen=192.168.0.1
alias="home.net"
#alias="192.168.0.1"
port=5060
children=4
fifo="/tmp/ser_fifo"
# ------------------ module loading
----------------------------------
# Uncomment this if you want to use SQL database
loadmodule "/usr/lib/ser/modules/mysql.so"
loadmodule "/usr/lib/ser/modules/sl.so"
loadmodule "/usr/lib/ser/modules/tm.so"
loadmodule "/usr/lib/ser/modules/rr.so"
loadmodule "/usr/lib/ser/modules/maxfwd.so"
loadmodule "/usr/lib/ser/modules/usrloc.so"
loadmodule "/usr/lib/ser/modules/registrar.so"
loadmodule "/usr/lib/ser/modules/group.so"
loadmodule "/usr/lib/ser/modules/uri.so"
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
loadmodule "/usr/lib/ser/modules/auth.so"
loadmodule "/usr/lib/ser/modules/auth_db.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)
# ------------------------- request routing logic
-------------------
# main routing logic
route{
# initial sanity checks -- messages with
# max_forwards==0, or excessively long requests
if (!mf_process_maxfwd_header("15")) {
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("home.net", "subscriber")) {
www_challenge("home.net", "0");
break;
};
save("location");
break;
};
# native SIP destinations are handled using our
USRLOC DB or ALIASES
if (!lookup("location") | !lookup("aliases")) {
sl_send_reply("404", "Not Found");
break;
};
} else {
t_relay();
};
# 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();
};
# forward to PSTN
if (uri=~"sip:01013@home.net") {
if (method=="INVITE") {
route(1);
break;
};
};
}
route[1] {
# forward to PSTN
if (uri=~"sip:01013@home.net") {
if (method=="INVITE") {
forward(192.168.0.1, 5070);
break;
};
};
}
Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de
stockage pour vos mails !
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/
Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails !
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/
Hi
In my ser.cfg I seem to have lots of segments which are repeated in each
route, is there anyway...or would/can it be included in a later realease
a method of including these
i.e
include_segment[1] {
Check if authorised
}
route [1] {
include_segment(1)
rest of stuff
}
Iqbal
Hi Lucas,
Would mind sending your ser.cfg file, i am facing the same problems with NAT traversal
I have already read > <http://www.informatik.uni-bremen.de/~prelle/terena/cookbook/Co> okbook_D2/
but it still does not working
This is my ser.cfg file:
#
# $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 ----------------------------------
loadmodule "/usr/local/lib/ser/modules/nathelper.so"
# Uncomment this if you want to use SQL database
loadmodule "/usr/lib/ser/modules/mysql.so"
loadmodule "/usr/lib/ser/modules/sl.so"
loadmodule "/usr/lib/ser/modules/tm.so"
loadmodule "/usr/lib/ser/modules/rr.so"
loadmodule "/usr/lib/ser/modules/maxfwd.so"
loadmodule "/usr/lib/ser/modules/usrloc.so"
loadmodule "/usr/lib/ser/modules/registrar.so"
loadmodule "/usr/lib/ser/modules/textops.so"
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
loadmodule "/usr/lib/ser/modules/auth.so"
loadmodule "/usr/lib/ser/modules/auth_db.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)
# We will you 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;
};
# 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("200.151.192.13", "subscriber")) {
www_challenge("200.151.192.13", "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();
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
Paulo
I am using ser-0.9.0 and freeradius-0.9.1, i install free radius
succefull but when i try to recompile ser the auth_radius.so module
doest not create and i get the following errors.
/***************************************************************************************************************************************************/
make[1]: Entering directory `/usr/ser-0.9.0/modules/group_radius'
gcc -fPIC -DPIC -g -O9 -funroll-loops -Wcast-align -Wall
-minline-all-stringops -malign-double -falign-loops -mcpu=i686
-DNAME='"ser"' -DVERSION='"0.9.0"' -DARCH='"i386"' -DOS='"linux"'
-DCOMPILER='"gcc 3.3"' -D__CPU_i386 -D__OS_linux
-DCFG_DIR='"/usr/local/etc/ser/"' -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP
-DDNS_IP_HACK -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE
-DDBG_QM_MALLOC -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024
-DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD
-DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H
-I/usr/local/include -c group.c -o group.o
In file included from ../../parser/parse_uri.h:38,
from group.c:42:
../../parser/msg_parser.h: In function `get_body':
../../parser/msg_parser.h:314: warning: comparison between signed and
unsigned
../../parser/msg_parser.h:316: warning: comparison between signed and
unsigned
group.c: In function `radius_is_user_in':
group.c:194: warning: passing arg 2 of `rc_avpair_add' makes integer
from pointer without a cast
group.c:194: warning: passing arg 3 of `rc_avpair_add' makes pointer
from integer without a cast
group.c:194: warning: passing arg 4 of `rc_avpair_add' makes integer
from pointer without a cast
group.c:194: error: too many arguments to function `rc_avpair_add'
group.c:203: warning: passing arg 2 of `rc_avpair_add' makes integer
from pointer without a cast
group.c:203: warning: passing arg 3 of `rc_avpair_add' makes pointer
from integer without a cast
group.c:203: warning: passing arg 4 of `rc_avpair_add' makes integer
from pointer without a cast
group.c:203: error: too many arguments to function `rc_avpair_add'
group.c:209: warning: passing arg 2 of `rc_avpair_add' makes integer
from pointer without a cast
group.c:209: warning: passing arg 3 of `rc_avpair_add' makes pointer
from integer without a cast
group.c:209: warning: passing arg 4 of `rc_avpair_add' makes integer
from pointer without a cast
group.c:209: error: too many arguments to function `rc_avpair_add'
group.c:215: warning: passing arg 1 of `rc_auth' makes integer from
pointer without a cast
group.c:215: warning: passing arg 3 of `rc_auth' from incompatible
pointer type
group.c:215: warning: passing arg 4 of `rc_auth' from incompatible
pointer type
group.c:215: error: too many arguments to function `rc_auth'
make[1]: *** [group.o] Error 1
/***************************************************************************************************************************************************/
Any Help.
Hello, All!
There is some questions about subj.
With what loads SER+Asterisk can be used? I need to know, what number of
simultaneous registrations and simultaneous calls can handle this
conplex? It'll be very good, if someone can say his success story about
SER+Asterisk.
Now, we're planning 1000-10000 clients... can SER handle this number of
registrations? And can SER+Asterisk (assume that almost all users are
using NAT) can handle calls of 0.1-1% of above clients base?
Great thanks to all for answers.
--
/Scoundrel
Hi all.
We have a partner with a Sonus box that we use for PSTN termination.
Their Sonus box produces suspect Record-Route headers. Can anyone tell
me if it is compliant with RFC3261?
A sample header that I receive looks like this:
Record-Route: <sip:xxx.xxx.xxx.xxx:5060;lr>
And I discovered that Asterisk-1.0.2 seems to not properly handle
these messages so it does strict routing rather than loose routing.
Greg greger(a)teigre.com was kind enough to point me to RFC3261 Section
19.1.1 which seems to indicate that ;lr> should be ;lr=on> for
complance.
Is this correct?
Regards,
Paul
My SER is running behind NAT with rtpproxy.
I was able to send and receive message via Windows Messenger. Both
clients were outside my network and they were also behind NAT.
Problem is,
I can't communicate with a client (outside my network) from my internal
network.
Here is my iptables rules
-A PREROUTING -p tcp -d 66.92.x.y --dport 5060 -j DNAT --to-destination
192.168.71.2
-A PREROUTING -p udp -d 66.92.x.y --dport 5060 -j DNAT --to-destination
192.168.71.2
-A POSTROUTING -s 192.168.71.0/24 -d 192.168.71.2 -p tcp --dport 5060 -j
SNAT --to 192.168.71.1
-A POSTROUTING -s 192.168.71.0/24 -d 192.168.71.2 -p udp --dport 5060 -j
SNAT --to 192.168.71.1
-A POSTROUTING -s 192.168.71.0/24 -o eth0 -j SNAT --to-source 66.92.x.y
my rtpproxy is running without any argument.
Would anybody please give me hint, how to overcome this problem.
Thanks,
Mohammad
hello there,
I am new to SER, just want to configure it with two NIC interfaces (for
global network. calls from external network (global network) should be
routed to a sip-endpoint in internal network. and I need rtp proxied
with it. I have tried but rtpproxy is crashing or SER is crashing.
can some one please tell me the stable version of SER or rtpproxy to use
and can some one please send me his configuration file working in a
similar schema.
*sip-endpoint in internal network is not registered on the SER.
thanks
Atif
Just got a reply from a fellow SER user to add append_branch() fuction, but I still cannot see the INVITE from my SER.
onreply_route[1] {
xlog("L_NOTICE", "Reply status %rs: Reason %rr\n");
if (t_check_status("302")) {
xlog("L_NOTICE", "We got a 302!!!!!\n");
## Used to send INVITE message? ##
append_branch();
};
}
-----Original Message-----
From: Martin Koenig [mailto:martin.koenig@toplink-plannet.de]
Sent: Tuesday, February 22, 2005 11:33 AM
To: Paul Belanger
Cc: serusers(a)lists.iptel.org
Subject: Re: [Serusers] Turn 3xx into new Invite
Hello,
see: http://lists.iptel.org/pipermail/serusers/2004-December/014107.html
looks like Juha Heinänen has a patch for this available somewhere, maybe
he would like to share this?
Regards,
Martin
Paul Belanger schrieb:
>Ya, I have looked at that one, but I can see how it sends out the
>INVITE.
>
>-----Original Message-----
>From: Martin Koenig [mailto:martin.koenig@toplink-plannet.de]
>Sent: Tuesday, February 22, 2005 11:09 AM
>To: Paul Belanger
>Cc: serusers(a)lists.iptel.org
>Subject: Re: [Serusers] Turn 3xx into new Invite
>
>
>Hello,
>
>there is this one so far:
>
>http://lists.iptel.org/pipermail/serusers/2004-August/010977.html
>
>Didn't really help...
>
>Regards,
>Martin
>
>Paul Belanger schrieb:
>
>
>
>>Rumor has it yes, but I have not been successful. I posted a question
>>last week, and was told to search the archives. I did, but not much
>>came up!
>>
>>http://www.google.ca/search?hl=en&q=302+site%3Amail.iptel.org&btnG=Goo
>>g
>>le+Search&meta=
>>
>>I think I'm on the right track, but don't have time today to play with
>>it. Here is what I got so far:
>>
>>#
>># $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)
>>
>>debug=3
>>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"
>>loadmodule "/usr/local/lib/ser/modules/xlog.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 ---------------
>>
>># -- 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)
>>
>>modparam("tm", "fr_inv_timer", 15 )
>>modparam("tm", "fr_timer", 10 )
>>
>># ------------------------- 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;
>> };
>>
>> # 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") {
>> save("location");
>> break;
>> };
>> };
>>
>>
>> if (method=="INVITE") {
>> rewritehostport("216.143.130.70:5060");
>> t_on_reply("1");
>> t_on_failure("1");
>> t_relay();
>> break;
>> }
>>
>>}
>>
>>onreply_route[1] {
>> xlog("L_NOTICE", "Reply status %rs: Reason %rr\n");
>> if (t_check_status("302")) {
>> xlog("L_NOTICE", "We got a 302!!!!!\n");
>> ## ADD CODE TO SEND OUT INVITE!! ###
>> };
>>}
>>
>>failure_route[1] {
>> xlog("L_NOTICE", "Failure status %rs: Reason %rr\n"); }
>>
>>Let me know if you find any information.
>>
>>Paul
>>
>>-----Original Message-----
>>From: serusers-bounces(a)iptel.org [mailto:serusers-bounces@lists.iptel.org]
>>On
>>Behalf Of Martin Koenig
>>Sent: Tuesday, February 22, 2005 11:00 AM
>>To: serusers(a)lists.iptel.org
>>Subject: [Serusers] Turn 3xx into new Invite
>>
>>
>>Hello,
>>
>>is it possible to take 3xx-responses in a reply_route and turn them
>>into
>>a new INVITE on Ser using append_branch or simliar?
>>
>>Regards,
>>Martin
>>
>>_______________________________________________
>>Serusers mailing list
>>serusers(a)lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
>>
>>
>>
>>
>>
>
>
>
Hi guys,
I tried to make aliases w/ trigger but something goes wrong.
Trigger is made on insert in the database. If user logins with
username 123 alias 0123 is created. But if I call 0123 I get
"404 Not found" any idea?
P.S. in ser.cfg I have :
if (uri==myself) {
if (method=="REGISTER") {
if (!www_authorize("193.193.162.71", "subscriber")) {
www_challenge("193.193.162.71", "0");
break;
};
save("location");
lookup("aliases");
Thanks!