Hello All,
I recenlty installed ser stable version (0.8.14) and I use it with a
couple of Cisco IP Phones and a Cisco 36xx voice Gateway. I installed it
using mediaproxy because some phones are behind a nat and it works fine
for "basic calls" (IP-IP, IP-PSTN and PSTN-IP).
However I have a problem when I try to transfer (using attended
transfer) a call coming from PSTN to a phone that is behind nat. The
problem is the following:
The phone originating the transfer sends correctly the REFER method to
the Voice gateway through SER server containing the refer-to:
number@publicIPaddress but the Gateway sends the INVITE method "directly
to the publicIPaddress of the NAT", and doesn't pass through the SIP
server (that "manages" the messages for the NATed phones) even if I
configured a dial peer voip matching the voip strings and specifying the
server where I have to send the INVITE requests.
My question is: is there any way to configure SER changing the REFER
message in order to "force" the gateway to send the INVITEs through the
server?
Or, anyone knows if something more than dial-peers has to be configured
on Cisco gateways?
Thanks a lot in advance,
Raffaele.
I've noticed most scripts checking from and to parts are somewhat flawed.
Eg:
# if sender claims to be in our domain in From header field....
if (search("(f|From): .*(a)mydomain.com)) {
....
};
Looks ok right? Not really - I'll explain why.
I wanted my REGISTER request's host part to match my realm exactly to
avoid uri==myself matching and then the above example not
matching. A user could register @sipserver.mydomain.com and it would be
accepted. They'd be from our domain but without a check. So I did this:
if (method=="REGISTER") {
if (search("^To: .*(a)mydomain.com"))
{ authenticate }
else { no thanks }
But, this can be spoofed by setting a name (eg in kphone) with a domain
part.
The To part of the sip register message will then look like this:
To: "Hello @mydomain.com" <sip:2001@sipserver.mydomain.com>
And it will match. Bummer. Use check_to (I hope the parsing of this field is
accurate,
I might take a look at the source!), or use a regexp like:
search("^To: .*sip:[^@]+@mydomain.com");
Hope that does it.
Conor.
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
Hi,
I know that ser can be used to set up sms gateway. Does it mean that I
can send SMS through PSTN line without using GSM modem?
Thank you.
Thomas
--
Cybertel Works Ltd.
Unit 12, 6/F, Tower B, New Trade Plaza,
6 On Ping Street, Shatin, N.T., Hong Kong
Tel. : 852 - 2637 2221
Fax.: 852 - 2541 1535
Email : support(a)cybertel.biz
Website : www.cybertel.biz
hello friends,
iam trying to run the sems along with ivr enabled
in that my sems.conf ,ser.cfg and my debug of the sems
are as followed can any body tell me why am i getting
the error message like this
iam useing the stable version of SER and sems
and another doubt is i have compiled and got the
binary
file of IVR.so .
should i need to load the IVR.so in the modules of
ser.cfg
with regards
ser.cfg
-------
[root@server ser]# cat ser.cfg
#
# $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=7 # debug level (cmd line: -dddddddddd)
fork=no
log_stderror=yes # (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"
loadmodule "/usr/local/lib/ser/modules/vm.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")
modparam("usrloc","db_url","mysql://ser:heslo@localhost:3306/ser")
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
#voicemail
modparam("voicemail","db_url","mysql://ser:heslo@localhost:3306/ser")
modparam("voicemail","subscriber_table","subscriber")
modparam("voicemail","email_column","email_address")
# ------------------------- 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") {
# Uncomment this if you want to use digest
authentication
# if
(!www_authorize("iptel.org", "subscriber")) {
#
www_challenge("iptel.org", "0");
# break;
# };
save("location");
break;
};
if ( method=="ACK" || method=="INVITE" ||
method=="BYE" || method=="CANCEL" )
{
if (!t_newtran())
{
sl_send_reply("500","could not create transaction");
break;
};
t_reply("100","Trying - just wait
a minute !");
if (method=="INVITE")
{
log("in to the invite");
if(!vm("/tmp/am_fifo","ivr"))
{
log("could not contact announcement server");
t_reply("500","error contacting sems");
};
break;
}
else if (method=="BYE" ||
method=="CANCEL")
{
if(!vm("/tmp/am_fifo","bye"))
{
t_reply("500","error
contacting sems");
};
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();
};
}
sems.conf
---------
[root@server sems]# cat sems.conf
# $Id: sems.conf.sample,v 1.1.2.1 2003/08/28 19:13:25
rco Exp $
#
# sems.conf.sample
#
# Sip Express Media Server (sems)
#
# sample configuration file
#
#
# whitespaces (spaces and tabs) are ignored
# comments start with a "#" and may be used inline
#
# example: option=value1, value2 # i like this option
#
##################################
# global parameters #
##################################
# optional parameter: fork={yes|no}
#
# - specifies if sems should run in daemon mode
(background)
fork=yes
# optional parameter: stderr={yes|no}
#
# - debug mode: do not fork and log to stderr
stderr=no
# optional parameter: loglevel={0|1|2|3}
#
# - sets log level (error=0, warning=1, info=2,
debug=3)
loglevel=1
# optional parameter: fifo_name=<filename>
#
# - path and file name of our fifo file
fifo_name=/tmp/am_fifo
# optional parameter: ser_fifo_name=<filename>
#
# - path and file name of Ser's fifo file
ser_fifo_name=/tmp/ser_fifo
# optional parameter: plugin_path=<path>
#
# - sets the path to the plug-ins
# - may be absolute or relative to CWD
plugin_path=/usr/local/lib/sems/plug-in
##################################
# voicemail specific parameters #
##################################
# optional parameter: announce_path=<path>
#
# - sets the path where announce files are searched
for
announce_path=/usr/local/lib/sems/audio/
# optional parameter: default_announce=<filename>
#
# - sets the name of the default announce WAV file
default_announce=default_en.wav
# optional parameter: max_record=<seconds>
#
# - maximum record time
max_record=30
# optional parameter: smtp_server=<hostname>
#
# - sets address of smtp server
smtp_server=localhost
# optional parameter: smtp_port=<port>
#
# - sets port of smtp server
smtp_port=25
##################################
# module specific parameters #
##################################
# add more module configurations here (inline or
external):
#
# config.mymodule=<filename>
# or
# config.mymodule=inline
# ...
# config.mymodule=end
config.ivr=inline
python_scrit_path=/root/answer_machine/plugin/ivr/
python_script_file=ivr.py
config.ivr=end
debug of sems
-------------
Configuration:
configuration file: /etc/sems/sems.conf
Ser's FIFO: /tmp/ser_fifo
our FIFO: /tmp/am_fifo
plug-in path:
/usr/local/lib/sems/plug-in
daemon mode: 0
local IP: 202.*.*.*
(15559) DEBUG: main (sems.cpp:386): Loading
application plug-ins
(15559) DEBUG: load (AmPlugIn.cpp:83): loading
/usr/local/lib/sems/plug-in/apps/announcement.so ...
(15559) ERROR: loadPlugIn (AmPlugIn.cpp:97):
AmPlugIn::loadPlugIn:
/usr/local/lib/sems/plug-in/apps/announcement.so:
undefined symbol:
_ZN13AmDialogState18onUACRequestStatusEP23AmRequestUACStatusEvent
(15559) ERROR: load (AmPlugIn.cpp:85): while loading
plug-in
'/usr/local/lib/sems/plug-in/apps/announcement.so'
(15558) WARNING: sig_usr_fifo (sems.cpp:84): signal 17
received
(15558) INFO: sig_usr_fifo (sems.cpp:93): finished
when i make any call iam not getting any message or
ivr
as expected.
i highly appreciate you r help in this
with regards
rama kanth
__________________________________
Do you Yahoo!?
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com
Dear ser users,
Originally, I have a ser worked correctly for me.
We also implemented the www authentigation function.
But when we change our domain name, the server can't work properly.
We encountered the following strange stuation:
We clear the mysql database, but users from the original database can login with proper username and password.
The users now can login.
But each time they make a call, ser send 200 OK directly to my client SJphone without asking the receiver.
So ACK sent by the caller can't reach the receiver.
My ser always sends 483 too many hops :(
I'm really messed about such strange things.
Hope that someone would be kind enough to give some hints.
Sincerely,
Kun
Hi,
I register two gateways successfully to ser. I can see the URI addresses
appeared in admin login. However, when I try to dial from one gateway to
another one, it fails.
When I click the "show on line users" in serweb, there is no user listed
there. However, I have seen the registrations of the two gateways
successfully.
Do anyone of you have encounter such problems?
Thomas
This is my problem.
I've got a Router 2651XM [IOS: 12.3(8)T3], with a Voice Module NM-HD-2V and
a BRI card VIC2-2BRI-NT/TE.
The Router is attached to a PBX card which simulate a ISDN flux and to a
CallManager 3.3.
This ISDN answers to the number 0x-xxxxx-990.
It means that if I call this number, an IP-phone attested on the CallManager
rings.
Everything seems to be allright if I call that number from the phones
attested on the same PBX. From one of them I digit "0x-xxxxx-990#1111111".
The code "#1111111" is used from us to go on the PSTN.
But If i call that number from a mobile-phone like xxx-xxxxxxx, the call
arrives to the voice module (I saw it by the debug isdn q931) but it seems
to be redirect outside, going to the PBX again. WHY ???
This is a "debug isdn q931" for a call which did the right way:
*Jun 4 13:31:44.918: ISDN BR1/0 Q931: RX <- SETUP pd = 8 callref = 0x3D
Sending Complete
Bearer Capability i = 0x8090A3
Standard = CCITT
Transer Capability = Speech
Transfer Mode = Circuit
Transfer Rate = 64 kbit/s
Channel ID i = 0x81
Calling Party Number i = 0x0083, '666397'
Plan:Unknown, Type:Unknown
Called Party Number i = 0x80, '590'
Plan:Unknown, Type:Unknown
*Jun 4 13:31:44.950: ISDN BR1/0 Q931: TX -> CALL_PROC pd = 8 callref = 0xBD
Channel ID i = 0x89
*Jun 4 13:31:45.070: ISDN BR1/0 Q931: TX -> ALERTING pd = 8 callref = 0xBD
*Jun 4 13:31:45.130: ISDN BR1/0 Q931: TX -> CONNECT pd = 8 callref = 0xBD
Channel ID i = 0x89
And this is the "debug isdn q931" for a call which didn't do the right way:
*Jun 4 13:33:17.922: ISDN BR1/0 Q931: RX <- SETUP pd = 8 callref = 0x11
Sending Complete
Bearer Capability i = 0x8090A3
Standard = CCITT
Transer Capability = Speech
Transfer Mode = Circuit
Transfer Rate = 64 kbit/s
Channel ID i = 0x81
Calling Party Number i = 0x0081, '3479264055'
Plan:Unknown, Type:Unknown
Called Party Number i = 0x80, '590'
Plan:Unknown, Type:Unknown
High Layer Compat i = 0x9181
*Jun 4 13:33:17.954: ISDN BR1/0 Q931: TX -> CALL_PROC pd = 8 callref = 0x91
Channel ID i = 0x89
*Jun 4 13:33:18.078: ISDN BR1/0 Q931: Applying typeplan for sw-type 0x1 is
0x0
0x0, Calling num 3479264055
*Jun 4 13:33:18.082: ISDN BR1/0 Q931: Applying typeplan for sw-type 0x1 is
0x0
0x0, Called num #1111111200
*Jun 4 13:33:18.082: ISDN BR1/0 Q931: TX -> SETUP pd = 8 callref = 0x5F
Bearer Capability i = 0x8090A3
Standard = CCITT
Transer Capability = Speech
Transfer Mode = Circuit
Transfer Rate = 64 kbit/s
Channel ID i = 0x82
Calling Party Number i = 0x0081, '3479264055'
Plan:Unknown, Type:Unknown
Called Party Number i = 0x80, '#1111111200'
Plan:Unknown, Type:Unknown
Sending Complete
High Layer Compat i = 0x9181
*Jun 4 13:33:18.154: ISDN BR1/0 Q931: RX <- CALL_PROC pd = 8 callref = 0xDF
Channel ID i = 0x8A
*Jun 4 13:33:18.170: ISDN BR1/0 Q931: RX <- ALERTING pd = 8 callref = 0xDF
*Jun 4 13:33:18.183: ISDN BR1/0 Q931: TX -> ALERTING pd = 8 callref = 0x91
To complete the post here's the "Show Running-config" of the Router:
Current configuration : 3594 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname ro_lab_off
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$XA5Z$vC3P.6/g5hcssnI6GfMX31
!
no network-clock-participate slot 1
voice-card 0
dspfarm
no local-bypass
!
voice-card 1
no dspfarm
!
no aaa new-model
ip subnet-zero
ip cef
!
!
!
!
no ip domain lookup
no ftp-server write-enable
isdn switch-type basic-net3
!
!
!
!
voice class codec 1
codec preference 1 g711ulaw
codec preference 2 g729r8
codec preference 3 g711alaw
!
!
!
voice class h323 1
h225 timeout tcp establish 3
!
!
!
!
!
!
!
!
!
class-map match-any AutoQoS-VoIP-RTP-Trust
match ip dscp ef
class-map match-any AutoQoS-VoIP-Control-Trust
match ip dscp cs3
match ip dscp af31
!
!
policy-map AutoQoS-Policy-Trust
class AutoQoS-VoIP-RTP-Trust
priority percent 70
class AutoQoS-VoIP-Control-Trust
bandwidth percent 5
class class-default
fair-queue
!
!
translation-rule 999
Rule 0 5 #1111111
!
!
!
!
interface FastEthernet0/0
ip address 172.18.4.62 255.255.255.192
service-policy output AutoQoS-Policy-Trust
duplex auto
speed auto
auto qos voip trust
h323-gateway voip interface
h323-gateway voip h323-id ro_lab_off
h323-gateway voip tech-prefix 1#
h323-gateway voip bind srcaddr 172.18.4.62
!
interface FastEthernet0/1
no ip address
service-policy output AutoQoS-Policy-Trust
duplex auto
speed auto
auto qos voip trust
!
interface FastEthernet0/1.100
description voice vlan subif
encapsulation dot1Q 100
ip address 172.18.4.126 255.255.255.192
!
interface FastEthernet0/1.200
description pc vlan subif
encapsulation dot1Q 200
ip address 172.18.4.190 255.255.255.192
!
interface BRI1/0
no ip address
isdn switch-type basic-net3
isdn tei-negotiation preserve
isdn incoming-voice voice
!
interface BRI1/1
no ip address
isdn switch-type basic-net3
isdn tei-negotiation preserve
isdn incoming-voice voice
!
ip classless
ip route 0.0.0.0 0.0.0.0 172.18.4.1
ip http server
!
!
!
!
control-plane
!
rmon event 33333 log trap AutoQoS description "AutoQoS SNMP traps for Voice
Drop
s" owner AutoQoS
rmon alarm 33335 cbQosCMDropBitRate.1171.1173 30 absolute rising-threshold 1
333
33 falling-threshold 0 owner AutoQoS
rmon alarm 33336 cbQosCMDropBitRate.1207.1209 30 absolute rising-threshold 1
333
33 falling-threshold 0 owner AutoQoS
!
!
voice-port 1/0/0
compand-type a-law
cptone IT
timeouts interdigit 3
timeouts ringing infinity
connection plar 5200
!
voice-port 1/0/1
compand-type a-law
cptone IT
timeouts interdigit 3
timeouts ringing 10
connection plar 5100
!
!
!
!
!
dial-peer voice 1000 pots
description Connessione a PSTN
destination-pattern T
translate-outgoing called 999
port 1/0/0
!
dial-peer voice 1001 pots
description Connessione a PSTN
preference 1
destination-pattern T
port 1/0/1
!
dial-peer voice 6000 voip
description Chiamate al CM 3.3
destination-pattern 5..
voice-class codec 1
session target ipv4:172.18.4.21
dtmf-relay h245-signal h245-alphanumeric
!
dial-peer voice 6100 voip
description Chiamate al CM 3.3
preference 1
destination-pattern 5..
voice-class codec 1
session target ipv4:172.18.4.22
dtmf-relay h245-signal h245-alphanumeric
!
Please... HELP!!!
Merpeia
Hi guys,
I'm trying to build windows software SIP client for SER but there are some things that I don't know:
Is it NAT related to SIP client and if yes how to implement it?
Or nat handling is done only by ser?
Another thing is G729 handling - where I can find libraries for windows?
Thanks in advance,
Pavel
Anyone got any help on this issue?
Windows Messeneger doesn't deliver messages to other users, and voice calls
only have one way audio dependant on who initiated the call!
I have rtpproxy running and ser says support for it is enabled clients sign
in behind NAT and all of that is ok with mysql auth etc
Here is my ser.cfg file
debug=9 # debug level (cmd line: -dddddddddd)
fork=yes
log_stderror=no # (cmd line: -E)
/* Uncomment these lines to enter debugging mode
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"
listen=83.245.0.21
alias="xstreamip.net"
fifo_mode=0777
# ------------------ 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/textops.so"
loadmodule "/usr/local/lib/ser/modules/uri.so"
#loadmodule "/usr/local/lib/ser/modules/uri_db.so"
loadmodule "/usr/local/lib/ser/modules/group.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"
# !! Nathelper
loadmodule "/usr/local/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)
modparam("usrloc", "db_url", "mysql://ser:xxxx@localhost/ser")
modparam("group", "db_url", "mysql://ser:xxxx@localhost/ser") # "mysql"
instead of "sql" in cvs head vs.
modparam("uri", "db_url", "mysql://ser:xxxx@localhost/ser") # instead of
"uri"
# -- 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)
# !! 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
modparam("nathelper","rtpproxy_sock", "/var/run/rtpproxy.sock")
# ------------------------- 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;
};
# !! 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("3"); # 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
if (!method=="REGISTER") record_route();
log(1,"route messages");
# 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");
route(1);
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=~"xstreamip.net") {
if (method=="REGISTER") {
# Uncomment this if you want to use digest authentication
if (!www_authorize("xstreamip.net", "subscriber")) {
www_challenge("xstreamip.net", "0");
t_on_reply("1");
append_hf("P-Behind-NAT: Yes\r\n");
if (!t_relay()) {
sl_reply_error();
break;
};
log(1, "www_challenge sent\n");
break;
};
save("location");
break;
};
lookup("aliases");
save("aliases");
log(1,"log messages");
if (!uri==myself) {
append_hf("P-hint: outbound alias\r\n");
route(1);
break;
};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
break;
};
};
append_hf("P-hint: usrloc applied\r\n");
route(1);
}
route[1]
{
# !! Nathelper
if (uri=~"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)" &&
!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();
};
}
And the last few lines of debug
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10795]: DEBUG: init_mod_child (7):
uri
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10797]: DEBUG: init_mod_child (-4):
usrloc
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10774]: DEBUG: init_mod_child (0):
usrloc
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10794]: DEBUG: init_mod_child (6):
uri
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10796]: DEBUG: init_mod_child (8):
usrloc
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10793]: DEBUG: init_mod_child (5):
group
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10792]: DEBUG: init_mod_child (-1):
auth_db
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10795]: DEBUG: init_mod_child (7):
group
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10797]: DEBUG: init_mod_child (-4):
uri
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10774]: DEBUG: init_mod_child (0):
uri
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10794]: DEBUG: init_mod_child (6):
group
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10796]: DEBUG: init_mod_child (8):
uri
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10793]: DEBUG: init_mod_child (5):
auth_db
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10792]: DEBUG: init_mod_child (-1):
nathelper
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10795]: DEBUG: init_mod_child (7):
auth_db
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10797]: DEBUG: init_mod_child (-4):
group
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10774]: DEBUG: init_mod_child (0):
group
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10794]: DEBUG: init_mod_child (6):
auth_db
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10796]: DEBUG: init_mod_child (8):
group
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10793]: DEBUG: init_mod_child (5):
nathelper
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10792]: rtpp_test: RTP proxy found,
support for it enabled
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10795]: DEBUG: init_mod_child (7):
nathelper
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10797]: DEBUG: init_mod_child (-4):
auth_db
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10774]: DEBUG: init_mod_child (0):
auth_db
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10794]: DEBUG: init_mod_child (6):
nathelper
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10796]: DEBUG: init_mod_child (8):
auth_db
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10793]: rtpp_test: RTP proxy found,
support for it enabled
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10795]: rtpp_test: RTP proxy found,
support for it enabled
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10797]: DEBUG: init_mod_child (-4):
nathelper
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10774]: DEBUG: init_mod_child (0):
nathelper
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10794]: rtpp_test: RTP proxy found,
support for it enabled
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10796]: DEBUG: init_mod_child (8):
nathelper
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10797]: rtpp_test: RTP proxy found,
support for it enabled
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10774]: rtpp_test: RTP proxy found,
support for it enabled
Dec 10 11:36:24 ns1 /usr/local/sbin/ser[10796]: rtpp_test: RTP proxy found,
support for it enabled
Hi everybody,
At this moment I have ser configured (remember, i'm very new to ser and sip servers), MySQL server is running with all his and ser tables created. I've added some users to the tables by typing
# serctl add testuser 1234 testuser(a)sipproxy.mundivox.com
After that, I put two sip routers to auth at my sipserer. They've manage to auth at it but with any password. I looked for the mysql auth configuration at 'ser's admin guide' and 'ser.cfg' adn discovered that for this auth support I must configure the line above at ser.cfg:
modparam("usrloc", "db_url", "sql://ser:<password>@localhost/ser")
So my line became:
modparam("usrloc", "/usr/local/mysql/data/ser", "sql://ser:heslo@localhost/ser")
But it returns the following Error Message:
ERROR: bad config file (3 errors)
When I comment this line, ser server runs OK.
What am I doing wrong ?
What is usrloc ?
--
Felipe Martins
Linux System Administrator
Tep Solution Provider
Mundivox Communications
Rua Lauro Muller, 116/Sala 505
RJ - Brasil - 22290-906
Tel.: 55 21 3820-8839
Fax.: 55 21 3820-8844