Hi all,
I have a problem with fetching rpid value from DB. I read the auth_db module and I put in ser.cfg file the new exported parameters:
modparam("auth_db", "avps_column_int", "domn")
modparam("auth_db", "avps_column_str", "uuid|rpid")
and I have deleted use_rpid=1.
but when the script insert Remote-Party HF (after challenge INVITE/407/ACK/INVITE w/credentials), the rpid value is NULL/wrong....what I'm forgetting/wrong???
Regards,
Verbal
Hello.
Is possible to have a table with one avp and two values?. For
example:
Domain Attribute Value1 Value2
domain1 "Code" 0056 192.168.0.10
domain1 "Code" 0054 192.168.0.20
domain1 "Code" 001 192.168.0.30
So when i load the table with
avp_db_load("$ruri/domain","s:Code/Table_Name") to use the
valu1 or value2 to check and push?
Thanks in advance.
Best Regards,
Ricardo.-
-----Mensaje original-----
De: Ricardo Martinez [mailto:rmartinez@redvoiss.net]
Enviado el: Miércoles, 12 de Enero de 2005 18:16
Para: 'serusers(a)lists.iptel.org'
Asunto: [Serusers] AVPOPS Module Usage Help.
Hello.
I was wondering if anyone could help me to understand how can i use
avpops module to make dynamic rounting. First. I was looking the examples
in the webpage and i saw the tables have just one "ATTRIBUTE" column and one
"VALUE" column, suppose that i created a table like this.
+------+----------+--------+-----------+---------------+------+-------------
---+
| uuid | username | domain | attribute | value | type | modified
|
+------+----------+--------+-----------+---------------+------+-------------
---+
| | | domain1| 00562 | 192.168.1.254 | 0
|20050111152728 |
+------+----------+--------+-----------+---------------+------+-------------
---+
| | | domain1| 00511 | 192.168.1.230 | 0
|23123123123213 |
+------+----------+--------+-----------+---------------+------+-------------
---+
I was thinking in something like this, but is still a first approach..
if (method="INVITE") {
if (!(avp_db_load("NOTE1") && avp_check("NOTE2"))) {
........... };
};
t_relay( )
NOTE1 : I don't know which (source, name) use here, i was hopping that
someone could give me a clue.
NOTE2: How can i check the attribute "00562" with the R-URI from INVITE?
I really hope that someone could give me a hand here.
Thanks in advance.
Best Regards,
Ricardo Martinez Ogalde.-
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers
Pls. pls. If any body have the solution pls. do provide me..
Thanks & Regards
Ritesh Jalan
Senior Engineer - Test & Audit
Net4india Ltd.
504, Bhikaji Cama Bhawan
11, Bhikaji Cama Place
New Delhi 110066
Tel: 91 (011) (26160129 - 131) (Extn 131)
URL: http://www.net4india.com
----- Original Message -----
From: Ritesh Jalan
To: serusers(a)lists.iptel.org
Sent: Wednesday, January 12, 2005 4:52 PM
Subject: [Serusers] Problem in calling and Accounting
Hi All
I have installed Ser 0.8.14 with mysql.so. My aim is to authenticate users and then forward all the request to destination cisco router, and also to maintain accounting for billing purpose.
I am facing two problems, my all call gets disconnected after few secs of its own and I dont get call records also for any calls
My ser.cfg is as below. Pls help me in this matter.
#
# $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
*/
listen=202.71.135.193
listen=127.0.0.1
alias=jalan.com
alias=202.71.135.193
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/acc.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"
# 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")
# ------Acc Params ------
modparam("acc", "log_level", 1)
modparam("acc", "log_flag", 1)
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
modparam("usrloc", "db_url", "sql://ser:heslo@localhost/ser")
# ------------------------- 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("202.71.135.193", "subscriber")) {
www_challenge("202.71.135.193", "0");
break;
};
save("location");
break;
};
if (method == "INVITE"){
if (uri=~"sip:[0-9]*@*"){
prefix("1234");
rewritehostport("64.45.47.231:5060");
forward(64.45.47.231, 5060);
};
if (!t_relay()) {
sl_reply_error();
break;
};
};
setflag(1);
# 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
}
Thanks & Regards
Ritesh Jalan
Senior Engineer - Test & Audit
Net4india Ltd.
504, Bhikaji Cama Bhawan
11, Bhikaji Cama Place
New Delhi 110066
Tel: 91 (011) (26160129 - 131) (Extn 131)
URL: http://www.net4india.com
--------------------------------------------------------------------------------
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers
Hello,
The three hours are over, and I had to redo the job. Sorry for not answering
so late, but i wanted to thank you.
I came to the same problem again. I modified the code to verify "Digest" to
"DIGEST"
It passed the problem after changing the line like
if ((begin=strstr(auth, "DIGEST"))==NULL) {
but it started to error like :
error: authorization failed
request already contains (Proxy-) Authorization, but received 40[1|7], see
above
I had to manually modify the code like:
/* if (!password) */
password = "VS56sNZxs";
At the beginning of the MD5 hashing to bypass the problem. (I hadcoded the
password. The password looks like the one i gave you, with some undisclosed
modifications, it is not my proxy after all)
Now it works. ????
I do not have to time to see why after changing that i have to hardcode the
password, it just works like this and I integrated with nagios, I am very
pleased that i solved the damn problem after all.
About Case sensitive/insensitive
As far as I know there is a implementation of POSIX.2 regular expressions in
the glibc 3.+. And another older implementation that glibc have had for many
years.
Code should like (with posix regex-es):
#include <regex.h> << this is the library
......
const char *regex="(([D][I][G][E][S][T]))";
if (firsttime) {
if ( regcomp(&r,regex,REG_EXTENDED|REG_ICASE) ) { << here is the
I(gnore)CASE Flag
fprintf(stderr,"Error compiling regular expression for parsing\n");
exit(1);
}
firsttime=0;
}
if (regexec(&r,message,10,pm,REG_NOTBOL)!=0) {
return(NULL);
}
Something like that should match even dIgeSt :).
I am not a C programmer (not even a programmer), and this code is out of my
stomach, and a copypaste from google.
Maybe you will put regexes on all other matches. Mostly i saw that you use
strstr to check the existence of a string. Regexes can do more. I do not
guarantee that the code works (i can actually bet that it won't), but is an
idea that it can be done. Some googleing should do the job ;). I bet it can
be done easier.
I am not very good at programming as i said, but maybe it helps. If i was
good at it I would modify it myself, but I am very busy and I do not have
the time to properly learn C or another language.
(If you use regexes I wolud greatly enjoy my name at the thanks section,
maybe i get a raise :P ... i would really need it)
Thank you again for your software and your support.
I wish you a happy new year and good archevements in the following year.
And I am sorry for answering so late. But later is better than never.
Dragos Chiriac
dragos(a)pattco.ro
---------------
Hello Dragos,
I guess it is too late, the three hours are over, but you should read the
sipsak homepage: please contact me directly with questions about sipsak,
because I do not have the time any more to read the iptel mailing lists all
over (not to think about real time).
I do not understand your first problem report. If you resend the output of
sipsak with -vvv I will take a look at output. BTW -f does not help you
because with that parameter you can only load a SIP request from the given
file, no options.
The 401 from below has simply the problem that the word 'Digest' is in
capital
letters and sipsak searches only for Digest with the first character as
capital. Unfortunately this is not easy to fix, as there are no
case-insensitive string search methods in glibc available (AFAIK).
Greetings
Nils
Hi guys,
I would like to know how can I make, when a certain user logs on to my sip server, if it is that user, I route it to another server with another uri, username and password.
Is it possible to do with ser, or if its not, how could I do that ?
--
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
I am trying to install SER on a a red-hat linux 9
machine. But when I compile, I am having problem on
compilation. I even have mysql installed on my pc and
I can see libclientmysql.so file in LD_LIBRARY_PATH.
Following is the errorneos section:
In file included from dbase.c:39:
con_mysql.h:33:25: mysql/mysql.h: No such file or
directory
In file included from dbase.c:39:
con_mysql.h:39: parse error before "MYSQL_RES"
con_mysql.h:39: warning: no semicolon at end of struct
or union
con_mysql.h:40: warning: type defaults to `int' in
declaration of `con'
con_mysql.h:40: warning: data definition has no type
or storage class
con_mysql.h:41: parse error before "row"
con_mysql.h:41: warning: type defaults to `int' in
declaration of `row'
con_mysql.h:41: warning: data definition has no type
or storage class
In file included from dbase.c:40:
db_val.h:31:25: mysql/mysql.h: No such file or
directory
In file included from dbase.c:40:
db_val.h:43: parse error before '*' token
dbase.c: In function `connect_db':
dbase.c:89: dereferencing pointer to incomplete type
dbase.c:89: `MYSQL' undeclared (first use in this
function)
dbase.c:89: (Each undeclared identifier is reported
only once
dbase.c:89: for each function it appears in.)
dbase.c:89: parse error before ')' token
dbase.c:90: dereferencing pointer to incomplete type
dbase.c:96: warning: implicit declaration of function
`mysql_init'
dbase.c:96: dereferencing pointer to incomplete type
dbase.c:98: warning: implicit declaration of function
`mysql_real_connect'
dbase.c:98: dereferencing pointer to incomplete type
dbase.c:99: warning: implicit declaration of function
`mysql_error'
dbase.c:99: dereferencing pointer to incomplete type
dbase.c:99: dereferencing pointer to incomplete type
dbase.c:99: warning: format argument is not a pointer
(arg 3)
dbase.c:99: dereferencing pointer to incomplete type
dbase.c:99: warning: format argument is not a pointer
(arg 3)
dbase.c:99: dereferencing pointer to incomplete type
dbase.c:99: warning: format argument is not a pointer
(arg 3)
dbase.c:99: dereferencing pointer to incomplete type
dbase.c:99: warning: format argument is not a pointer
(arg 3)
dbase.c:99: dereferencing pointer to incomplete type
dbase.c:99: warning: format argument is not a pointer
(arg 3)
dbase.c:99: dereferencing pointer to incomplete type
dbase.c:99: warning: format argument is not a pointer
(arg 3)
dbase.c:99: dereferencing pointer to incomplete type
dbase.c:99: warning: format argument is not a pointer
(arg 3)
dbase.c:100: warning: implicit declaration of function
`mysql_close'
dbase.c:100: dereferencing pointer to incomplete type
dbase.c:102: dereferencing pointer to incomplete type
dbase.c: In function `disconnect_db':
dbase.c:127: dereferencing pointer to incomplete type
dbase.c:129: dereferencing pointer to incomplete type
dbase.c: In function `submit_query':
dbase.c:151: warning: implicit declaration of function
`mysql_query'
dbase.c:151: dereferencing pointer to incomplete type
dbase.c:152: dereferencing pointer to incomplete type
dbase.c:152: dereferencing pointer to incomplete type
dbase.c:152: warning: format argument is not a pointer
(arg 3)
dbase.c:152: dereferencing pointer to incomplete type
dbase.c:152: warning: format argument is not a pointer
(arg 3)
dbase.c:152: dereferencing pointer to incomplete type
dbase.c:152: warning: format argument is not a pointer
(arg 3)
dbase.c:152: dereferencing pointer to incomplete type
dbase.c:152: warning: format argument is not a pointer
(arg 3)
dbase.c:152: dereferencing pointer to incomplete type
dbase.c:152: warning: format argument is not a pointer
(arg 3)
dbase.c:152: dereferencing pointer to incomplete type
dbase.c:152: warning: format argument is not a pointer
(arg 3)
dbase.c:152: dereferencing pointer to incomplete type
dbase.c:152: warning: format argument is not a pointer
(arg 3)
dbase.c: At top level:
dbase.c:187: parse error before '*' token
dbase.c: In function `print_values':
dbase.c:191: `_c' undeclared (first use in this
function)
dbase.c:191: `_b' undeclared (first use in this
function)
dbase.c:191: `_l' undeclared (first use in this
function)
dbase.c:191: `_v' undeclared (first use in this
function)
dbase.c:191: `_n' undeclared (first use in this
function)
dbase.c: At top level:
dbase.c:216: parse error before '*' token
dbase.c: In function `print_where':
dbase.c:222: `_c' undeclared (first use in this
function)
dbase.c:222: `_b' undeclared (first use in this
function)
dbase.c:222: `_l' undeclared (first use in this
function)
dbase.c:222: `_k' undeclared (first use in this
function)
dbase.c:222: `_v' undeclared (first use in this
function)
dbase.c:222: `_n' undeclared (first use in this
function)
dbase.c:228: `_o' undeclared (first use in this
function)
dbase.c: At top level:
dbase.c:247: parse error before '*' token
dbase.c: In function `print_set':
dbase.c:253: `_c' undeclared (first use in this
function)
dbase.c:253: `_b' undeclared (first use in this
function)
dbase.c:253: `_l' undeclared (first use in this
function)
dbase.c:253: `_k' undeclared (first use in this
function)
dbase.c:253: `_v' undeclared (first use in this
function)
dbase.c:253: `_n' undeclared (first use in this
function)
dbase.c: In function `db_init':
dbase.c:287: sizeof applied to an incomplete type
dbase.c:292: sizeof applied to an incomplete type
dbase.c:292: sizeof applied to an incomplete type
dbase.c:292: sizeof applied to an incomplete type
dbase.c:292: sizeof applied to an incomplete type
dbase.c:292: sizeof applied to an incomplete type
dbase.c:292: sizeof applied to an incomplete type
dbase.c: In function `db_close':
dbase.c:318: dereferencing pointer to incomplete type
dbase.c:319: warning: implicit declaration of function
`mysql_free_result'
dbase.c:319: dereferencing pointer to incomplete type
dbase.c: In function `get_result':
dbase.c:346: dereferencing pointer to incomplete type
dbase.c:346: warning: implicit declaration of function
`mysql_store_result'
dbase.c:346: dereferencing pointer to incomplete type
dbase.c:347: dereferencing pointer to incomplete type
dbase.c:348: warning: implicit declaration of function
`mysql_field_count'
dbase.c:348: dereferencing pointer to incomplete type
dbase.c:353: dereferencing pointer to incomplete type
dbase.c:353: dereferencing pointer to incomplete type
dbase.c:353: warning: format argument is not a pointer
(arg 3)
dbase.c:353: dereferencing pointer to incomplete type
dbase.c:353: warning: format argument is not a pointer
(arg 3)
dbase.c:353: dereferencing pointer to incomplete type
dbase.c:353: warning: format argument is not a pointer
(arg 3)
dbase.c:353: dereferencing pointer to incomplete type
dbase.c:353: warning: format argument is not a pointer
(arg 3)
dbase.c:353: dereferencing pointer to incomplete type
dbase.c:353: warning: format argument is not a pointer
(arg 3)
dbase.c:353: dereferencing pointer to incomplete type
dbase.c:353: warning: format argument is not a pointer
(arg 3)
dbase.c:353: dereferencing pointer to incomplete type
dbase.c:353: warning: format argument is not a pointer
(arg 3)
dbase.c: In function `db_free_query':
dbase.c:391: dereferencing pointer to incomplete type
dbase.c:392: dereferencing pointer to incomplete type
dbase.c: In function `db_query':
dbase.c:428: dereferencing pointer to incomplete type
dbase.c: In function `db_insert':
dbase.c:484: dereferencing pointer to incomplete type
dbase.c: In function `db_delete':
dbase.c:516: dereferencing pointer to incomplete type
dbase.c: In function `db_update':
dbase.c:548: dereferencing pointer to incomplete type
dbase.c:551: dereferencing pointer to incomplete type
make[1]: *** [dbase.o] Error 1
make[1]: Leaving directory
`/opt/ser-0.8.14/modules/mysql'
Thanks a lot for your help to get me through.
Regards,
jawad
__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail
Sent to sems list but non so great activity there...
Hi serusers!
after reading docs, installing ser + sems + rtpproxy from cvs few days ago, I
came up with a working ivr answering machine (thanks sems developers!!!), now
I'm trying to add ISDN gateway.
First question (easy): can I receive call on isdngw and pass it to IVR? (and a
hint+link on how to)
Second question (harder): I can't get isdngw to receive calls, outgoing calls
are ok, but if I register to ser with my isdn phone number an place a call to
my isdn line, i can get my UAC (kphone) ringing, but i can't accept nor
reject call. If i press accept button on client, my caller phone keeps
ringing and nothing happens. Hope somebody can help me...
config files and logs attached, same kind of errors even when using
nathelper+rtpproxy.
Thank you
--
Giovanni Balasso
giaso(a)mail.com
*********************
ngrep port 5060 ouput
*********************
RECEIVING CALL
#
U 192.168.1.125:5060 -> 192.168.1.253:5062
INVITE sip:457930175@192.168.1.253:5062;transport=udp SIP/2.0..Max-Forwards
: 10..Record-Route: <sip:192.168.1.125;ftag=00002EF5714696EE;lr=on>..Via: S
IP/2.0/UDP 192.168.1.125;branch=z9hG4bKb34b.33bcab4.0..Via: SIP/2.0/UDP 192
.168.1.125;branch=z9hG4bKb34b.23bcab4.0..To: sip:457930175@192.168.1.125..F
rom: sip:3202307659@192.168.1.125;tag=00002EF5714696EE..CSeq: 11 INVITE..Ca
ll-ID: 00002EF5768EDB8D@192.168.1.125..Content-Length: 203..User-Agent: Sip
EXpress router(0.10.99-dev0 (i386/linux))..Contact: <sip:isdngw@192.168.1.
125:5060>..Content-Type: application/sdp....v=0..o=username 0 0 IN IP4 192.
168.1.125..s=session..c=IN IP4 192.168.1.125..t=0 0..m=audio 1820 RTP/AVP 0
3 8 96..a=rtpmap:0 PCMU/8000..a=rtpmap:3 GSM/8000..a=rtpmap:8 PCMA/8000..a
=rtpmap:96 iLBC/8000..
#
U 192.168.1.253:5062 -> 192.168.1.125:5060
SIP/2.0 100 Trying..Via: SIP/2.0/UDP 192.168.1.125;branch=z9hG4bKb34b.33bca
b4.0..Via: SIP/2.0/UDP 192.168.1.125;branch=z9hG4bKb34b.23bcab4.0..From: <s
ip:3202307659@192.168.1.125>;tag=00002EF5714696EE..CSeq: 11 INVITE..Call-ID
: 00002EF5768EDB8D@192.168.1.125..To: "giaso" <sip:457930175@192.168.1.125>
;tag=57AF5094..Content-Length: 0..User-Agent: kphone/4.1.0..Contact: "giaso
" <sip:457930175@192.168.1.253:5062;transport=udp>..Record-Route: <sip:192.
168.1.125;ftag=00002EF5714696EE;lr=on>....
#
U 192.168.1.253:5062 -> 192.168.1.125:5060
SIP/2.0 180 Ringing..Via: SIP/2.0/UDP 192.168.1.125;branch=z9hG4bKb34b.33bc
ab4.0..Via: SIP/2.0/UDP 192.168.1.125;branch=z9hG4bKb34b.23bcab4.0..From: <
sip:3202307659@192.168.1.125>;tag=00002EF5714696EE..CSeq: 11 INVITE..Call-I
D: 00002EF5768EDB8D@192.168.1.125..To: "giaso" <sip:457930175@192.168.1.125
>;tag=57AF5094..Content-Length: 0..User-Agent: kphone/4.1.0..Contact: "gias
o" <sip:457930175@192.168.1.253:5062;transport=udp>..Record-Route: <sip:192
.168.1.125;ftag=00002EF5714696EE;lr=on>....
ACCEPT CALL (on kphone client)
#
U 192.168.1.253:5062 -> 192.168.1.125:5060
SIP/2.0 200 OK..Via: SIP/2.0/UDP 192.168.1.125;branch=z9hG4bKb34b.33bcab4.0
..Via: SIP/2.0/UDP 192.168.1.125;branch=z9hG4bKb34b.23bcab4.0..From: <sip:3
202307659(a)192.168.1.125>;tag=00002EF5714696EE..CSeq: 11 INVITE..Content-Typ
e: application/sdp..Call-ID: 00002EF5768EDB8D@192.168.1.125..To: "giaso" <s
ip:457930175@192.168.1.125>;tag=57AF5094..Content-Length: 187..User-Agent:
kphone/4.1.0..Contact: "giaso" <sip:457930175@192.168.1.253:5062;transport=
udp>..Record-Route: <sip:192.168.1.125;ftag=00002EF5714696EE;lr=on>....v=0.
.o=username 0 0 IN IP4 192.168.1.253..s=The Funky Flow..c=IN IP4 192.168.1.
253..t=0 0..m=audio 33340 RTP/AVP 0 96 3..a=rtpmap:0 PCMU/8000..a=rtpmap:3
GSM/8000..a=rtpmap:96 iLBC/8000..
HANG UP (on kphone client)
#
U 192.168.1.253:5062 -> 192.168.1.125:5060
BYE sip:isdngw@192.168.1.125:5060 SIP/2.0..Via: SIP/2.0/UDP 192.168.1.253:5
062;branch=z9hG4bK36FCFB2F..CSeq: 6766 BYE..To: <sip:3202307659@192.168.1.1
25>;tag=00002EF5714696EE..From: "giaso" <sip:457930175@192.168.1.125>;tag=5
7AF5094..Call-ID: 00002EF5768EDB8D@192.168.1.125..Route: <sip:192.168.1.125
;ftag=00002EF5714696EE;lr=on>..Content-Length: 0..User-Agent: kphone/4.1.0.
.Contact: "giaso" <sip:457930175@192.168.1.253:5062;transport=udp>....
#
U 192.168.1.125:5060 -> 192.168.1.253:5062
SIP/2.0 100 Trying - just wait a minute !..Via: SIP/2.0/UDP 192.168.1.253:5
062;branch=z9hG4bK36FCFB2F..CSeq: 6766 BYE..To: <sip:3202307659@192.168.1.1
25>;tag=00002EF5714696EE..From: "giaso" <sip:457930175@192.168.1.125>;tag=5
7AF5094..Call-ID: 00002EF5768EDB8D@192.168.1.125..Server: Sip EXpress route
r (0.10.99-dev0 (i386/linux))..Content-Length: 0..Warning: 392 192.168.1.12
5:5060 "Noisy feedback tells: pid=11948 req_src_ip=192.168.1.253 req_src_p
ort=5062 in_uri=sip:isdngw@192.168.1.125:5060 out_uri=sip:isdngw@192.168.1.
125:5060 via_cnt==1"....
#
U 192.168.1.125:5060 -> 192.168.1.253:5062
SIP/2.0 481 Call/Transaction Does Not Exist..Via: SIP/2.0/UDP 192.168.1.253
:5062;branch=z9hG4bK36FCFB2F..CSeq: 6766 BYE..To: <sip:3202307659@192.168.1
.125>;tag=00002EF5714696EE..From: "giaso" <sip:457930175@192.168.1.125>;tag
=57AF5094..Call-ID: 00002EF5768EDB8D@192.168.1.125..Contact: <sip:isdngw@19
2.168.1.125>..Server: Sip EXpress router (0.10.99-dev0 (i386/linux))..Conte
nt-Length: 0..Warning: 392 192.168.1.125:5060 "Noisy feedback tells: pid=1
1946 req_src_ip=192.168.1.253 req_src_port=5062 in_uri=sip:isdngw@192.168.1
.125:5060 out_uri=sip:isdngw@192.168.1.125:5060 via_cnt==0"....
.168.1.125;branch=z9hG4bKb34b.23bcab4.0..To: sip:457930175@192.168.1.125..F
rom: sip:3202307659@192.168.1.125;tag=00002EF5714696EE..CSeq: 11 INVITE..Ca
ll-ID: 00002EF5768EDB8D@192.168.1.125..Content-Length: 203..User-Agent: Sip
EXpress router(0.10.99-dev0 (i386/linux))..Contact: <sip:isdngw@192.168.1.
125:5060>..Content-Type: application/sdp....v=0..o=username 0 0 IN IP4 192.
168.1.125..s=session..c=IN IP4 192.168.1.125..t=0 0..m=audio 1820 RTP/AVP 0
3 8 96..a=rtpmap:0 PCMU/8000..a=rtpmap:3 GSM/8000..a=rtpmap:8 PCMA/8000..a
=rtpmap:96 iLBC/8000..
#
U 192.168.1.253:5062 -> 192.168.1.125:5060
SIP/2.0 100 Trying..Via: SIP/2.0/UDP 192.168.1.125;branch=z9hG4bKb34b.33bca
b4.0..Via: SIP/2.0/UDP 192.168.1.125;branch=z9hG4bKb34b.23bcab4.0..From: <s
ip:3202307659@192.168.1.125>;tag=00002EF5714696EE..CSeq: 11 INVITE..Call-ID
: 00002EF5768EDB8D@192.168.1.125..To: "giaso" <sip:457930175@192.168.1.125>
;tag=57AF5094..Content-Length: 0..User-Agent:
kphone/4. .168.1.125;branch=z9h
G4bKb34b.23bcab4.0..To: sip:457930175@192.168.1.125..F
rom: sip:3202307659@192.168.1.125;tag=00002EF5714696EE..CSeq: 11 INVITE..Ca
ll-ID: 00002EF5768EDB8D@192.168.1.125..Content-Length: 203..User-Agent: Sip
EXpress router(0.10.99-dev0 (i386/linux))..Contact: <sip:isdngw@192.168.1.
125:5060>..Content-Type: application/sdp....v=0..o=username 0 0 IN IP4 192.
168.1.125..s=session..c=IN IP4 192.168.1.125..t=0 0..m=audio 1820 RTP/AVP 0
3 8 96..a=rtpmap:0 PCMU/8000..a=rtpmap:3 GSM/8000..a=rtpmap:8 PCMA/8000..a
=rtpmap:96 iLBC/8000..
#
U 192.168.1.253:5062 -> 192.168.1.125:5060
SIP/2.0 100 Trying..Via: SIP/2.0/UDP 192.168.1.125;branch=z9hG4bKb34b.33bca
b4.0..Via: SIP/2.0/UDP 192.168.1.125;branch=z9hG4bKb34b.23bcab4.0..From: <s
ip:3202307659@192.168.1.125>;tag=00002EF5714696EE..CSeq: 11 INVITE..Call-ID
: 00002EF5768EDB8D@192.168.1.125..To: "giaso" <sip:457930175@192.168.1.125>
;tag=57AF5094..Content-Length: 0..User-Agent: kphone/4.
***************************
sems output
***************************
Configuration:
configuration file: /usr/local/etc/sems/sems.conf
Ser's FIFO: /tmp/ser_fifo
our FIFO: /tmp/am_fifo
plug-in path: /usr/lib/sems/plug-in/
daemon mode: 0
local IP: 192.168.1.125
(12018) WARNING: reloadModuleConfig (SemsConfiguration.cpp:66): no
configuration found for module semstalk, maybe you want to specify
config.semstalk in config file.
(12018) WARNING: onLoad (Semstalk.cpp:70): no configuration specified for
module ttsannounce.
(12018) WARNING: onLoad (Semstalk.cpp:71): using default configuration:
(12018) WARNING: onLoad (Semstalk.cpp:77): FestivalServer = "localhost"
(12018) WARNING: onLoad (Semstalk.cpp:78): FestivalPort = "1314"
(12018) WARNING: onLoad (Semstalk.cpp:79): FestivalVoice = "rab_diphone"
(12018) WARNING: onLoad (Semstalk.cpp:80): Caching = true
(12018) WARNING: onLoad (Semstalk.cpp:81): CachePath = "/tmp/"
(12018) WARNING: reloadModuleConfig (SemsConfiguration.cpp:66): no
configuration found for module ttsannounce, maybe you want to specify
config.ttsannounce in c
onfig file.
(12018) WARNING: onLoad (TTSAnnounce.cpp:74): no configuration specified for
module ttsannounce.
(12018) WARNING: onLoad (TTSAnnounce.cpp:75): using default configuration:
(12018) WARNING: onLoad (TTSAnnounce.cpp:85): AnnouncePath = "texts/"
(12018) WARNING: onLoad (TTSAnnounce.cpp:86): AnnounceFile = "default.txt"
(12018) WARNING: onLoad (TTSAnnounce.cpp:87): FestivalServer = "localhost"
(12018) WARNING: onLoad (TTSAnnounce.cpp:88): FestivalPort = "1314"
(12018) WARNING: onLoad (TTSAnnounce.cpp:89): FestivalVoice = "rab_diphone"
(12018) WARNING: onLoad (TTSAnnounce.cpp:90): Caching = true
(12018) WARNING: onLoad (TTSAnnounce.cpp:91): CachePath = "/tmp/"
(12018) WARNING: onLoad (AnswerMachine.cpp:125): Voicemail: no
rec_file_extension specified in configuration
(12018) WARNING: onLoad (AnswerMachine.cpp:126): file for module voicemail:
using default.
(12018) WARNING: onLoad (AnswerMachine.cpp:164): no email_template_path
specified in configuration
(12018) WARNING: onLoad (AnswerMachine.cpp:165): file for module voicemail:
using default.
(12018) WARNING: onLoad (Ivr.cpp:119): No on_load_script will be executed.
RECEIVING CALL
(12021) ERROR: listen (IsdnDeviceIncoming.cpp:264): unknown sequence (too
short)
ACCEPT CALL (on kphone client)
HANG UP (on kphone client)
*****************
SER output
*****************
starting ser
Jan 13 10:08:59 kaus ser: WARNING: fix_socket_list: could not rev. resolve
192.168.1.125
Jan 13 10:09:00 kaus ser: WARNING: fix_socket_list: could not rev. resolve
192.168.1.125
Jan 13 10:09:00 kaus ser[11941]: AVPops - initializing
Jan 13 10:09:00 kaus ser[11941]: Maxfwd module- initializing
Jan 13 10:09:00 kaus ser[11941]: INFO: udp_init: SO_RCVBUF is initially 65535
Jan 13 10:09:00 kaus ser[11941]: INFO: udp_init: SO_RCVBUF is finally 131070
Jan 13 10:09:00 kaus ser[11946]: INFO: fifo process starting: 11946
Jan 13 10:09:00 kaus ser[11946]: SER: open_uac_fifo: fifo server up
at /tmp/ser_fifo...
RECEIVING CALL
Jan 13 10:10:01 kaus /USR/SBIN/CRON[12038]: (root) CMD ([ -d /etc/shaper ]
&& /etc/init.d/shaper timecheck)
Jan 13 10:10:14 kaus kernel: isdn_net: call from 3202307659 -> 0 457930175
ignored
Jan 13 10:10:14 kaus kernel: isdn_tty: call from 3202307659, -> RING on ttyI2
Jan 13 10:10:14 kaus ser[11947]: ***
Jan 13 10:10:14 kaus ser[11947]: *
Jan 13 10:10:14 kaus ser[11947]: ***
Jan 13 10:10:14 kaus ser[11947]: *
Jan 13 10:10:14 kaus ser[11947]: ***
Jan 13 10:10:14 kaus ser[11947]: *
Jan 13 10:10:14 kaus ser[11947]: ***
Jan 13 10:10:14 kaus ser[11947]: *
Jan 13 10:10:14 kaus ser[11947]: ***
Jan 13 10:10:14 kaus ser[11947]: *
Jan 13 10:10:14 kaus ser[11947]: ***
Jan 13 10:10:14 kaus ser[11947]: *
Jan 13 10:10:14 kaus ser[11947]: ***
Jan 13 10:10:14 kaus ser[11947]: *
Jan 13 10:10:14 kaus ser[11947]: ***
Jan 13 10:10:14 kaus ser[11947]: *
Jan 13 10:10:14 kaus ser[11947]: ***
Jan 13 10:10:14 kaus ser[11947]: *
Jan 13 10:10:14 kaus ser[11947]: ***
Jan 13 10:10:14 kaus ser[11947]: *
Jan 13 10:10:14 kaus ser[11947]: ***
Jan 13 10:10:14 kaus ser[11947]: *
Jan 13 10:10:14 kaus ser[11947]: ***
Jan 13 10:10:14 kaus ser[11947]: *
Jan 13 10:10:14 kaus ser[11947]: ***
Jan 13 10:10:14 kaus ser[11947]: Benvenuto su ser
Jan 13 10:10:14 kaus ser[11947]: Stai usando il file di configurazione
ser.cfg.noproxy con segreteria telefonica
Jan 13 10:10:14 kaus ser[11947]: Ricevuto INVITE da
sip:3202307659@192.168.1.125 per sip:457930175@192.168.1.125
Jan 13 10:10:14 kaus ser[11947]: INVITE received
Jan 13 10:10:14 kaus ser[11947]: Trovato sip:457930175@192.168.1.125
Jan 13 10:10:14 kaus ser[11947]: Inizio comunicazione...
Jan 13 10:10:14 kaus ser[11947]: Non e' per me
Jan 13 10:10:14 kaus ser[11947]: Rilascio e interrompo INVITE
Jan 13 10:10:14 kaus ser[11947]: ERROR: t_newtran: transaction already in
process 0x405cbdcc
Jan 13 10:10:14 kaus ser[11947]: ERROR: sl_reply_error used: I'm terribly
sorry, server error occurred (1/SL)
Jan 13 10:10:14 kaus ser[11947]: Warning: run_failure_handlers: no UAC support
(0, 256)
ACCEPT CALL (on kphone client)
Jan 13 10:10:30 kaus ser[11955]: ERROR: forward_reply: no 2nd via found in
reply
HANG UP (on kphone client)
Jan 13 10:10:49 kaus ser[11948]: ***
Jan 13 10:10:49 kaus ser[11948]: *
Jan 13 10:10:49 kaus ser[11948]: ***
Jan 13 10:10:49 kaus ser[11948]: *
Jan 13 10:10:49 kaus ser[11948]: ***
Jan 13 10:10:49 kaus ser[11948]: *
Jan 13 10:10:49 kaus ser[11948]: ***
Jan 13 10:10:49 kaus ser[11948]: *
Jan 13 10:10:49 kaus ser[11948]: ***
Jan 13 10:10:49 kaus ser[11948]: *
Jan 13 10:10:49 kaus ser[11948]: ***
Jan 13 10:10:49 kaus ser[11948]: *
Jan 13 10:10:49 kaus ser[11948]: ***
Jan 13 10:10:49 kaus ser[11948]: *
Jan 13 10:10:49 kaus ser[11948]: ***
Jan 13 10:10:49 kaus ser[11948]: *
Jan 13 10:10:49 kaus ser[11948]: ***
Jan 13 10:10:49 kaus ser[11948]: *
Jan 13 10:10:49 kaus ser[11948]: ***
Jan 13 10:10:49 kaus ser[11948]: *
Jan 13 10:10:49 kaus ser[11948]: ***
Jan 13 10:10:49 kaus ser[11948]: *
Jan 13 10:10:49 kaus ser[11948]: ***
Jan 13 10:10:49 kaus ser[11948]: *
Jan 13 10:10:49 kaus ser[11948]: ***
Jan 13 10:10:49 kaus ser[11948]: Benvenuto su ser
Jan 13 10:10:49 kaus ser[11948]: Stai usando il file di configurazione
ser.cfg.noproxy con segreteria telefonica
Jan 13 10:10:49 kaus ser[11948]: SEMS: termino la chiamata
***********
isdngw.conf
***********
# required parameter: enablei4l=< yes | no >
#
# enable I4L support?
# For isdn4linux support, you need
# - the linux kernel drivers for i4l loaded
# - read/write permissions for sems user on (some) /dev/ttyI* devices
# - you can (for whatever reason) use the "capidrv" kernel module
# to use CAPI based cards with I4L (this is not recommended though)
enablei4l=yes
# required parameter: enablecapi=< yes | no >
#
# enable CAPI20 support?
# For CAPI support you need
# - a sems compiled with CAPI support (-DUSE_CAPI20 uncommented in Makefile)
# - the capi20 libraries from the isdn4k package properly installed
# - the kernel capi drivers loaded (run capiinfo to check!)
# CAPI20 support is experimental, tested with AVM FritzCard PCIV2 and C4
enablecapi=no
# optional parameter: i4l_numoutdevices=<number of devices to be used>
#
# - specifies how many ttyI* devices to use for outgoing telephony calls
# - devices must be fully accessible by the vm process' user
# - this number also specified the maximum number of simultaneous
# outgoing phone calls (if not otherwise restricted)
# - you must specify exactly one parameter of i4l_numoutdevices and
i4l_outdevices, not both
i4l_numoutdevices=2
# optional parameter: i4l_outdevices=<dev1>, <dev2>, <dev3>, ...
#
# - specifies which ttyI* devices to use for outgoing telephony calls
# - devices must be fully accessible by the vm process' user
# - the number of devices listed is the maximum of simultaneous
# outgoing phone calls (if not otherwise restricted)
# - you may not set i4l_numoutdevices if this parameter is set
# - e.g. i4l_outdevices=/dev/ttyI10, /dev/ttyI11, /dev/ttyI12
i4l_outdevices=
# optional parameter: i4l_numindevices=<number of devices used>
#
# - specifies how many ttyI* devices to use for incoming telephony calls
# - devices must be fully accessible by the sems process' user
# - the number of devices listed is also the maximum of simultaneous
# incoming phone calls (if not otherwise restricted)
# - you may specify only i4l_numindevices OR i4l_indevices, not both.
i4l_numindevices=2
# optional parameter: i4l_indevices=<dev1>, <dev2>, <dev3>, ...
#
# - specifies which ttyI* devices to use for incoming telephony calls
# - devices must be fully accessible by the vm process' user
# - the number of devices listed is the maximum of simultaneous
# incoming phone calls (if not otherwise restricted)
# - you may specify only i4l_numindevices OR i4l_indevices, not both.
# - e.g. i4l_indevices=/dev/ttyI13, /dev/ttyI14
i4l_indevices=
# optional parameter: i4l_lockdir=/where/to/store/lockfiles
#
# - specifies the directory where to put the lockfiles
# - may be useful if not run as root
# - default: i4l_lockdir=/var/lock
i4l_lockdir=/var/lock
# optional parameter: i4l_inmsn=<msn1>, <msn2>, <msn3>, ...
#
# - specifies the all msn's the i4l backend listens for calls on
# - a call is only accepted if the according SIP call is successfully placed
# - other ISDN equipment *may* also listen on this numbers, the
# first to accept the call is the lucky one then
# - IMPORTANT: no other isdn4linux application may bind to any of that
numbers
# - wildcards may be specified here like 81462* or *
# - example: i4l_inmsn=12345, 54321*
i4l_inmsn=*
# optional parameter: i4l_mapping=<number1>, <number2>, ...
#
# - specifies what numbers are called via the isdn4linux backend
# - a call is only placed to the PSTN network if it matches one mapping (i4l
# or capi controller mapping below)
# - wildcards may be specified here like 81462* or *
# - A "*" means that all calls are allowed and get routed via i4l
i4l_mapping=*
# optional parameter: i4l_numchannel=<number of available b-channels>
#
# - specifies how many B-channels should be used with isdn4linux backend
# - isdngw checks for availability of a channel before trying to route
# the call, if another backend allows a connection and i4l has no
# more channels available, other backend will be used
# - the value does not have to be the real number of channels, you can
# limit the max number of simulatenous connections with this parameter
# - if this parameter is omitted, isdngw tries to detect this number
# by accessing /dev/isdninfo, this fails if capidrv is used or the
# user running sems does not have read permissions on this device
i4l_numchannel=
***********
sems.conf
***********
#
# 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=no is the same as -E)
fork=yes
# optional parameter: stderr={yes|no}
#
# - debug mode: do not fork and log to stderr
# (stderr=yes is the same as -E)
stderr=no
# optional parameter: loglevel={0|1|2|3}
#
# - sets log level (error=0, warning=1, info=2, debug=3)
# (same as -D)
loglevel=1
# optional parameter: ser_fifo_name=<filename>
#
# - path and file name of Ser's fifo file (same as -o)
ser_fifo_name=/tmp/ser_fifo
# optional parameter: socket_name=<filename>
#
# - path and file name of our unix socket
socket_name=/tmp/am_sock
# optional parameter: ser_socket_name=<filename>
#
# - path and file name of Ser's unix socket
ser_socket_name=/tmp/ser_sock
# optional parameter: send_method=<filename>
#
# - sets which method will be used to contact Ser:
# FIFO or unix socket server.
# - values: fifo (default), unix_socket
#
# - PLEASE NOTE THAT: if you use 'fifo', make sure that
# fifo_name and ser_fifo_name have been set. if you use 'unix_socket',
# make sure that socket_name and ser_socket_name have been set.
#
send_method=fifo
# optional parameter: plugin_path=<path>
#
# - sets the path to the plug-ins
# - may be absolute or relative to CWD
plugin_path=/usr/lib/sems/plug-in/
# 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
# optional parameter: rtp_low_port=<port>
#
# - sets port of rtp lowest server
#rtp_low_port=1024
# optional parameter: rtp_high_port=<port>
#
# - sets port of rtp highest server
#rtp_high_port=65535
##################################
# module specific parameters #
##################################
# sample voicemail configuration (inline)
config.voicemail=inline
# optional parameter: announce_path=<path>
#
# - sets the path where announce files are searched for
# - the file to be played is determined the following way:
# <announce_path>/<domainname>/<username>.wav
# if this file is not available <announce_path>/<default_anounce> is used
announce_path=/usr/lib/sems/audio/
# parameter: default_announce=<filename>
#
# - sets the name of the default announce WAV file
default_announce=default_en.wav
# parameter: max_record_time=<seconds>
#
# - maximum record time
max_record_time=30
# parameter: email_template=<filename>
#
# - email template file
#
# See the README file in <sems-src>/plug-in/voicemail
# for more information on the syntax used.
#
email_template=/usr/lib/sems/plug-in/mail.template
# end of configuration section for voicemail module
config.voicemail=end
# sample announcement configuration (inline)
config.announcement=inline
# optional parameter: announce_path=<path>
#
# - sets the path where announce files are searched for
announce_path=/usr/lib/sems/audio/
# parameter: default_announce=<filename>
#
# - sets the name of the default announce WAV file
default_announce=default_en.wav
# end of configuration section for announcement module
config.announcement=end
# sample isdngw module configuration (external file)
config.isdngw=/etc/sems/isdngw.conf
########## IVR
# sample ivr module configuration (inline)
config.ivr=inline
#parameter: ivr_script_path:
# path to ivr scripts.
#
ivr_script_path=/etc/ivr/
# default script file: this will be executed if <user>.py does not exist.
#
ivr_script_file=ivr.py
# parameter : tts_caching
# y or n
# text will be read from waves already synthesized and
# cached in cache_path
tts_caching=y
# parameter : tts_cache_path
# path to cache waves
# path must exist!
tts_cache_path=/tmp/wavs
#parameter: python_script_path=<full path>
#python_script_path=/etc/ivr
#parameter: python_script_file=<filename>
#python_script_file=example.py
# end of configuration section for ivr module
config.ivr=end
############
# sample conference configuration (inline)
config.conference=inline
# parameter: default_announce=<filename>
#
# - sets the full pathed name of the default announce WAV file.
# Will be played to lonely users.
default_announce=/usr/lib/sems/audio/first_participant.wav
# parameter: join_sound=<filename>
#
# - sets the full pathed name of a WAV file
# which will be played to conference users
# when a new user joins the conference.
join_sound=/usr/lib/sems/audio/beep.wav
# parameter: drop_sound=<filename>
#
# - sets the full pathed name of a WAV file
# which will be played to conference users
# when a user drops the conference.
drop_sound=/usr/lib/sems/audio/beep.wav
# end of configuration section for conference module
config.conference=end
# example configuration for number reader
config.number_reader=inline
number_path=/usr/lib/sems/audio/
prolog_file=welcome_to_number_reader.wav
epilog_file=thanks_calling_number_reader.wav
# end of number_reader configuration
config.number_reader=end
# add more module configurations here (inline or external):
#
# config.mymodule=<filename>
# or
# config.mymodule=inline
# ...
# config.mymodule=end
**********
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=3 # debug level (cmd line: -dddddddddd)
fork=yes
log_stderror=no # (cmd line: -E)
/* Uncomment these lines to enter debugging mode
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"
listen=192.168.1.125
alias=kaus
# ------------------ module loading ----------------------------------
# Uncomment this if you want to use SQL database
loadmodule "/usr/lib/ser/modules/mysql.so"
loadmodule "/usr/lib/ser/modules/avp.so"
loadmodule "/usr/lib/ser/modules/avpops.so"
loadmodule "/usr/lib/ser/modules/avp_db.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"
loadmodule "/usr/lib/ser/modules/domain.so"
loadmodule "/usr/lib/ser/modules/xlog.so"
#loadmodule "/usr/lib/ser/modules/vm.so"
# accounting
loadmodule "/usr/lib/ser/modules/acc.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"
#loadmodule "/usr/lib/ser/modules/auth_radius.so"
# Nathelper
#loadmodule "/usr/lib/ser/modules/nathelper.so"
# msilo
#loadmodule "/usr/lib/ser/modules/msilo.so"
fifo_db_url="mysql://ser:heslo@localhost/ser"
# ----------------- setting module-specific parameters ---------------
# -- avp params
# configure avpops db connection
modparam( "avpops", "avp_url", "mysql://ser:heslo@localhost/ser" )
modparam( "avpops", "avp_table", "subscriber" )
modparam( "avpops", "uuid_column", "id" )
# configure aliases, the number doesn't matter as long as there are no
collisions)
modparam( "avpops", "avp_aliases", "email=i:67 ; language=i:68" )
# scheme to access the database
modparam( "avpops", "db_scheme",
"email_scheme:table=subscriber;value_col=email_address;value_type=string")
# -- 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 --
modparam("auth_db", "calculate_ha1", yes)
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 params --
#modparam("registrar", "nat_flag", 6)
#modparam("nathelper", "natping_interval", 30)
#modparam("nathelper", "ping_nated_only", 1)
# -- acc params --
modparam("acc", "db_url", "mysql://ser:heslo@localhost/ser")
# -- acc params --
# Useage of flags is as follows:
# 1 ==
# 6 == nathelper
# set the reporting log level
#modparam("acc", "report_ack", 1)
modparam("acc", "log_level", 1)
modparam("acc", "failed_transactions", 1)
# number of flag, which will be used for accounting; if a message is
# labeled with this flag, its completion status will be reported
modparam("acc", "db_flag", 1 )
modparam("acc", "db_missed_flag", 3 )
modparam("acc", "report_ack", 6) # non traccio gli ack
modparam("acc", "report_cancels", 1)
# -- tm params --
modparam("tm", "tw_append",
"voicemail_headers:hdr[User-Agent];P-Email-Address=avp[$email];P-Language=avp[english]")
# ------------------------- request routing logic -------------------
# main routing logic
route{
xlog("L_INFO", "***\n");
xlog("L_INFO", "*\n");
xlog("L_INFO", "***\n");
xlog("L_INFO", "*\n");
xlog("L_INFO", "***\n");
xlog("L_INFO", "*\n");
xlog("L_INFO", "***\n");
xlog("L_INFO", "*\n");
xlog("L_INFO", "***\n");
xlog("L_INFO", "*\n");
xlog("L_INFO", "***\n");
xlog("L_INFO", "*\n");
xlog("L_INFO", "***\n");
xlog("L_INFO", "*\n");
xlog("L_INFO", "***\n");
xlog("L_INFO", "*\n");
xlog("L_INFO", "***\n");
xlog("L_INFO", "*\n");
xlog("L_INFO", "***\n");
xlog("L_INFO", "*\n");
xlog("L_INFO", "***\n");
xlog("L_INFO", "*\n");
xlog("L_INFO", "***\n");
xlog("L_INFO", "*\n");
xlog("L_INFO", "***\n");
xlog("L_INFO", "Benvenuto su ser\n");
xlog("L_INFO", "Stai usando il file di configurazione ser.cfg.noproxy con
segreteria telefonica\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;
};
/******************
if (nat_uac_test("3")) {
if (method == "REGISTER" || !search("^Record-Route:")) {
xlog("L_INFO"," Registrazione da nat...\n");
log("LOG: NAT!!!...\n");
fix_nated_contact();
if (method == "INVITE") {
fix_nated_sdp("1");
};
force_rport();
setflag(6);
};
};
*******************/
# 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()) {
xlog("L_INFO"," Chiamo route(1) per loose route\n");
route(1);
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 (method=="REGISTER") {
if (is_from_local()) {
xlog("L_INFO", " Richiesta di registrazione da locale\n");
log(1,"From local...");
if (!www_authorize("192.168.1.125", "subscriber")) {
xlog("L_NOTICE", " !!!Richiesta di autenticazione da %fu\n");
log(1, " Auth: NO - requesting authentification\n");
www_challenge("192.168.1.125", "0");
break;
} else {
log(1, " Auth: YES");
xlog("L_INFO", " Richiesta login %fu da %is accettata\n");
};
if (!save("location")) {
xlog("L_NOTICE", " !!!errore registrar\n");
sl_reply_error();
};
xlog("L_INFO"," 'location' salvata\n");
xlog("L_INFO"," procedura REGISTER terminata\n");
break;
}; #Fine is_from_local
}; #Fine method=REGISTER
if (method=="INVITE") {
xlog("L_INFO", " Ricevuto INVITE da %fu per %tu\n");
log(1, " INVITE received\n");
lookup("aliases");
xlog("L_INFO", "Trovato %tu \n");
if (lookup("location")) {
xlog("L_INFO", " Inizio comunicazione...\n");
setflag(1);
route(1);
};
if (uri!=myself) {
xlog("L_INFO", " Non e' per me\n");
xlog("L_INFO", " Rilascio e interrompo INVITE\n");
if (!t_relay()) {
sl_reply_error();
};
break;
};
}; #fine method=INVITE
if ( method=="ACK" || method=="INVITE" || method=="BYE" ||
method=="CANCEL" ){
# switch to stateful mode:
if (!t_newtran()){
sl_send_reply("500","could not create transaction");
break;
};
# prevent timeout on the other side:
t_reply("100","Trying - just wait a minute !");
if (method=="INVITE"){
# redirect the call to the 'conference' plug-in
# if the URI begin with 100
xlog("L_INFO", " INVITE sconoscuto: vai di segreteria!\n");
if (uri=~"sip:100.*@") {
# assumes that Sems configuration parameter 'socket_name='
# has been set to /tmp/am_fifo
if(!t_write_req("/tmp/am_fifo","conference")) {
t_reply("500","error contacting sems");
};
break;
};
# redirect the call to the 'announcement' plug-in
# if the URI begin with 200
if (uri=~"sip:200.*@") {
if(!t_write_req("/tmp/am_fifo","announcement")) {
t_reply("500","error contacting sems");
};
break;
};
if(uri=~"^sip:[0-9]+@.*" && !uri=~"^sip:457930175@.*"){
xlog("L_INFO", " INVITE per Numero: al gateway ISDN!\n");
if(!t_write_req("/tmp/am_fifo","isdngw")){
log("could not contact isdngw\n");
xlog("L_INFO", "errore isdngw\n");
t_reply("500","could not contact isdngw");
};
break;
};
# no service number, redirect to voicemail.
# do not forget to load AVPs so that voicemail gets the
# callee's email address.
#
# La riga qui sotto da' ogni tipo di errore :(
# load_avp("ruri","email",0);
# vediamo se questa funziona
avp_db_load( "$ruri", "$email/$email_scheme");
avp_db_load( "$ruri", "en/en_scheme");
xlog("L_INFO", " SEMS: Utente non in linea: segreteria interattiva!\n");
if(!t_write_req("/tmp/am_fifo","ivr")) {
t_reply("500","error contacting sems IVR");
};
#if(!t_write_req("/tmp/am_fifo","voicemail/voicemail_headers")) {
# t_reply("500","error contacting sems trying ivr");
#};
/******
if(!t_write_unix("/tmp/am_sock","announcement")) {
t_reply("500","error contacting sems");
};
******/
break;
} else if (method=="BYE" || method=="CANCEL") {
# Sems should already know which plug-in is handling that
# call. "bye" is no plug-in name. It is a reserved name which
# tells Sems to terminate the call.
xlog("L_INFO"," SEMS: termino la chiamata\n");
if(!t_write_unix("/tmp/am_sock","bye")) {
t_reply("500","error contacting sems");
};
};
};
}
route[1] {
#if (method == "BYE" || method == "CANCEL"){
# setflag(1);
#};
#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 (isflagset(6)){
xlog("L_INFO", " Problema di NAT, passiamo da rtpproxy\n");
log(1, " Forcing rtpproxy\n");
force_rtp_proxy();
};
*********************************/
# t_on_reply("1");
if (!t_relay()){
xlog("L_INFO", " Errore di staffetta\n");
log(1, " Relay error\n");
sl_reply_error();
};
break;
}
/************************
onreply_route[1]
{
# nated ?
if (isflagset(6) && status =~ "(183)|2[0-9][0-9]"){
xlog("L_INFO", " Nat da sistemare e proxy\n");
log(1, " Fix nat and rtpproxy\n");
fix_nated_contact();
force_rtp_proxy();
} else if (nat_uac_test("1")) {
xlog("L_INFO", " Nat da sistemare\n");
log(1, " Fix nat only\n");
fix_nated_contact();
};
}
************************/
--
Giovanni Balasso
giaso(a)yahoo.it
Someone have a working configuration with Auth and Accounting with Radius ?
I'm going crazy let acc working !!!
I've tried to catch only ACK and BYE message, as follow:
if (method=="INVITE") {
log(1, "INVITE message received\n");
record_route();
};
if (method=="ACK")
setflag(1);
log(1, "ACK message received\n");
if (method=="BYE")
setflag(1);
log(1, "BYE message received\n");
but, on "michele" call to "enrico", i have (in radacct):
From To Start End Duration
enrico michele 2005-01-13 17:41:11 2005-01-13 17:41:11 0 secs
michele enrico 2005-01-13 17:41:08 0000-00-00 00:00:00 0 secs
those records have the same AccSessionID.
Oz
--
------
O-Zone ! www.zerozone.it