Dear Example Mailbox:
Just wanted to let you know you were just left a 0:13 long message
(number 22)
in mailbox 1234 from "8600" <8600>, on Thursday, July 14, 2005 at 07:06:13
AM so you
might
want to check it when you get a chance. Thanks!
--Asterisk
Dear All,
Loading SER no errors, but no records in my acc table, nor missed calls, ..
What am I missing ?
Config details:
- acc.so is compiled by default with mysql as per Makefile DEFS+=-DSQL_ACC to enable SQL accounting
- ser.cfg
modparam("acc|uri_db", "db_url", "mysql://ser:heslo@localhost/ser")
modparam("acc", "log_level", 1)
modparam("acc", "log_flag", 1)
modparam("acc", "db_flag", 1)
modparam("acc", "db_missed_flag", 3)
- ser -D -E
Listening on
udp: 10.0.0.2 [10.0.0.2]:5060
tcp: 10.0.0.2 [10.0.0.2]:5060
Aliases:
tcp: localhost:5060
tcp: SIPSERver:5060
udp: localhost:5060
udp: SIPSERver:5060
SIPSERver root /root # stateless - initializing
0(0) Maxfwd module- initializing
acc - initializing
0(0) INFO: udp_init: SO_RCVBUF is initially 42080
0(0) INFO: udp_init: SO_RCVBUF is finally 231808
1(3301) INFO: fifo process starting: 3301
1(3301) SER: open_uac_fifo: fifo server up at /tmp/ser_fifo...
Remark, can not send any message as well
1(3301) INFO: fifo process starting: 3301
1(3301) SER: open_uac_fifo: fifo server up at /tmp/ser_fifo...
5(3305) Warning: run_failure_handlers: no UAC support (0, 256)
Any help ? Thanks
Hi guys,
I currently have a sip proxy server (sip express router) which
registers the sip phones. I need to add voice mail capability, i.e.
sip express router will forward all incoming calls to Asterisk if the
user does not pick up the call in 15 seconds.
The voicemail recording stops when the user hangs up. However, the
recording does not end if the user presses the # key, i.e. it is
ignoring the user input.
Similarly, when the user dials 2102 to access his voice mail, Asterisk
plays the prompt, but it seems to ignore all the user input keys.
Please kindly advise.
Regards,
YY
*****************************************************
Config files
------------------------------
1) Ser
---------------------
ser.cfg (SER)
---------------------
# -- tm params --
# set time for which ser will be waiting for a final response;
# fr_inv_timer sets value for INVITE transactions,
# fr_timer for all others
modparam("tm","fr_inv_timer",15)
modparam("tm","fr_timer",10)
if (uri==myself) {
if (method=="REGISTER") {
# attempt handoff to PSTN
if (uri=~"^sip:9[0-9]*@magnum.test.net") { ## This assumes
that the caller
log(1, "Forwarding to PSTN\n");
## is registered in our realm
forward(10.10.10.3, 5060);
## Our Cisco router
break;
};
# retrieve voicemail
#
if (uri=~"^sip:2[0-9]*@magnum.test.net") {
log(1, "Retrieving voicemail\n");
# redirect now!
rewritehostport("202.125.25.102:5061");
append_branch();
t_relay_to_udp("202.125.25.106","5061");
break;
};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
break;
};
timeout occurred ... now to forward to Asterisk's
voicemail service
if(method == "INVITE")
{
t_on_failure("1");
};
};
t_relay();
# leave voicemail
#
failure_route[1] {
log(1,"Activating voicemail!!\n");
revert_uri();
# redirect now to Asterisk (on the same machine) !
rewritehostport("202.125.25.102:5061");
append_branch();
t_relay_to_udp("202.125.25.106","5061");
}
--------------------
2) Asterisk
------------
sip.conf
------------
[general]
context=test
port=5061 ; UDP Port to bind to (SIP standard
port is 5060)
bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)
srvlookup=yes ; Enable DNS SRV lookups on outbound calls
; ip phone 1012, registered with SER
[1012]
type=friend
username=1012
canreinvite=no
context=test
mailbox=1012
host=203.125.25.106
nat=no
dtmfmode=info
disallow=all
allow=alaw
allow=ulaw
-----------------------
extensions.conf
-------------------------
[test]
;leave voice messages
exten => 1012,1,Voicemail(u1012)
exten => 1012,2,Hangup
;play voice messages
exten => 2012,1,VoiceMailMain,1012
exten => 2012,2,Hangup
-------------------------
voicemail.conf
------------------------
[default]
1012 => 1234, YY, ylim(a)test.net
Hello,
What is SEMS? Is important to include with SER?
Yours,
Abdul Lateef
Computer Programmer
HATIF COM
Mob: +974 - 5405022
Tel: +974 - 4883068
ICQ: 276994704
YM!: abdul_zu
Fax: +974 - 4883063
Doha Qatar
http://www.hatif.com
____________________________________________________
Sell on Yahoo! Auctions no fees. Bid on great items.
http://auctions.yahoo.com/
Hi all,
I'm sure someone must have heard about Linux VoIP Server LiveCD
http://www.wifi.com.ar/english/voip.html. By considering ROI, i planing
to get one in with asterisk B2BUA solution package. I myself are really
not good to build one, which could be time consume and might go wrong
especially the billing part. Since the LiveCD is utilizing SER, I'm
thinking to setup some asterisk servers for B2BUA and PSTN gateway
purpose and integrate with it.
Therefore, I would like to seek more opinions and advices from the
experts. It's worth to get one or should i go for consultant help? And
anyone play with it before?
Thank regards
kh'ng
Dear List,
Currently working in Billing Software for SER.
The problem i've met is very interesting:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
modparam("auth_db", "calculate_ha1", 1)
modparam("auth_db", "password_column", "password")
modparam("auth_db", "use_domain", 1)
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
As you see above i force SER to use passwords in "password" column as plain texts.
* I create some users via console by using openserctl / serctl command.
* Register some ATA's to SER, no problem, auth and accounting is working perfect.
* They can call each other and PSTN connectivity is fine.
* I tried to code a PHP for creation/deletion/editing of users.
* I managed to write values into database : "username", "domain", "password", "first_name", "last_name", "phone", "e_mail" as they come default in table, i added one more table for "address" which will be used to keep customer's address when i want to send invoices or post them something.
* I can see some accounts created from PHP :)
* They can register with SER, no problem. They can call to others and PSTN, no problem.
Ka'Booom !!!
When i look into "acc" table, i cannot see INVITEs and BYEs for customers who are created via PHP, only BYE lines written into database. I'm sure that INVITE, ACK and BYE's are written if i create a user with openserctl / serctl utility but not from PHP-created ones
The difference between openserctl/serctl created ones and the PHP-created ones are :
"phplib_id", "ha" and "ha1b" are empty in my examples and also "datetime_created" values are "0000-00-00 00:00:00"
I do not know why caused accounting module to log only "BYE" messages and what is the solution ?
btw : a very early demo for upcoming opensource billing for OpenSER / SER can be seen at http://www.intertet.net/goktar/?page=x
Thanks,
Ozan
Hi,
I tried to turn on authetication in SER. I was able to add a new user to
the subscriber table using serctl utility, but when I restarted the
server, after adding the user, I am getting the following error:
========================================================================
==========================
SERVER LOG AND THE SERVER WONT START
========================================================================
==========================
0(0) get_connection(): Connection not found in the pool
0(0) new_connection(): Access denied for user: 'ser@localhost' (Using
password: YES)
0(0) db_init(): Could not create a connection
0(0) register_udomain(): Can not open database connection
0(0) domain_fixup(): Error while registering domain
ERROR: error ffffffff while trying to fix configuration
0(0) DEBUG: tm_shutdown : start
0(0) DEBUG: unlink_timer_lists : emptying DELETE list
0(0) DEBUG: tm_shutdown : emptying hash table
0(0) DEBUG: tm_shutdown : releasing timers
0(0) DEBUG: tm_shutdown : removing semaphores
0(0) DEBUG: tm_shutdown : destroying tmcb lists
0(0) DEBUG: tm_shutdown : done
0(5165) shm_mem_destroy
0(5165) destroying the shared memory lock
when I connect to the database directly using mysql, I can connect
without any hassle. Now, I am not sure, whether it is the domain_fixup()
which is causing problems or the error where it cannot connect to the
database. But SER did start the first time I tried, and I was able to
add a user. Can someone point me out, what is going wrong and needs to
be fixed?
========================================================================
==========================
ADDED A USER BEFORE
========================================================================
==========================
[root@sip-ex-rtr root]# serctl add root root root(a)ser.com
MySql password:
ERROR 1045: Access denied for user: 'ser@localhost' (Using password:
YES)
introducing a new user to the database failed
ERROR 1045: Access denied for user: 'ser@localhost' (Using password:
YES)
introducing a new user into uri table failed
[root@sip-ex-rtr root]# serctl add root root root(a)ser.com
MySql password:
new user added
new user into uri table added
[root@sip-ex-rtr root]# serctl add root root root(a)ser.com
MySql password:
user already exists
[root@sip-ex-rtr root]# serctl add root2 root2 root2(a)ser.com
MySql password:
[root@sip-ex-rtr root]# /usr/local/sbin/serctl: line 333: /tmp/ser_fifo:
Interrupted system call
========================================================================
==========================
CONFIGURATION FILE
========================================================================
==========================
#
# $Id: ser.cfg,v 1.24 2003/11/11 15:32:36 andrei Exp $
#
# simple quick-start config script
#
# ----------- global configuration parameters ------------------------
debug=10 # 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"
# ------------------ 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/pa.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"
*/
# 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_url","sql://ser:ser@localhost/ser")
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("pa", "new_tuple_on_publish", 1)
#modparam("pa", "pa_domain", "orka.dhs.org")
# ------------------------- 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
if (!method=="REGISTER") record_route();
# subsequent messages withing a dialog should take the
# path determined by record-routing
if (loose_route()) {
# mark routing logic in request
append_hf("P-hint: rr-enforced\r\n");
route(1);
break;
};
if (!uri==myself) {
# mark routing logic in request
append_hf("P-hint: outbound\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==myself) {
if (method=="REGISTER") {
# Uncomment this if you want to use digest authentication
if (!www_authorize("ser.com", "subscriber")) {
www_challenge("ser.com", "0");
break;
};
save("location");
break;
};
if (method=="SUBSCRIBE") {
if (t_newtran()) {
handle_subscription("registrar");
};
break;
};
# if (method=="PUBLISH") {
# if (t_newtran()) {
# handle_publish("registrar");
# };
# break;
# };
lookup("aliases");
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]
{
# send it out now; use stateful forwarding as it works reliably
# even for UDP2TCP
if (!t_relay()) {
sl_reply_error();
};
}
Thanks & Regards,
Amit Singh
Co-op Engineer
Sony Ericsson Mobile Communications,
7001 Development Drive,
RTP Durham, NC 27709
Ph: +1-919-472-1601
_____________________________________________________________________
This e-mail has been scanned for viruses by MCI's Internet Managed Scanning Services - powered by MessageLabs. For further information visit http://www.mci.com
Dear List,
I'm making a call to PSTN, it's okay i can talk with the other party via ATA, but suddenly i unplug power from it, and in accounting module it does not write line with BYE message so i cannot understand whether the call is finished or not. only INVITE and ACK are written, no BYE :(
This may be a security hole for customers, because they talk for a long time and they may unplug their units or cut power so it does not tell SER it's over. How i can prevent this, also what i need to add as a line for telling ACC module not to write calls from 833 to 833 into database, which are free SIP2SIP calls ?
Btw, a Postpaid Billing System is on the way for OpenSER built in PHP, later i will need OpenSER group's help to place it onto hosting site. Shortly it will have features:
* Nothing extra from package, default MySql Database which comes with OpenSER Release is being used,
* All routing is done via OpenSER's ser.cfg ,
* Initial Rate, Initial Time, Increment Rate, Increment Time will be user variable ,
* Account Creation/Deletion done in PHP ,
* Invoice Generation and CDR will include many variables ,
* Rating will be in PHP,
* And everything is totaly free :)
If you have ideas and/or suggestion please write back to me so i can work for it too.
Reqs: OpenSER & PHP & MySql & Apache
Thanks,
Ozan
debug=3
fork=yes
log_stderror=no
listen=212.XXX.104.XXX
port=5060
children=4
alias=212.XXX.104.XXX
dns=no
rev_dns=no
fifo="/tmp/openser_fifo"
fifo_db_url="mysql://openser:openserrw@localhost/openser"
loadmodule "/usr/local/lib/openser/modules/mysql.so"
loadmodule "/usr/local/lib/openser/modules/sl.so"
loadmodule "/usr/local/lib/openser/modules/tm.so"
loadmodule "/usr/local/lib/openser/modules/rr.so"
loadmodule "/usr/local/lib/openser/modules/maxfwd.so"
loadmodule "/usr/local/lib/openser/modules/usrloc.so"
loadmodule "/usr/local/lib/openser/modules/registrar.so"
loadmodule "/usr/local/lib/openser/modules/auth.so"
loadmodule "/usr/local/lib/openser/modules/auth_db.so"
loadmodule "/usr/local/lib/openser/modules/uri.so"
loadmodule "/usr/local/lib/openser/modules/uri_db.so"
loadmodule "/usr/local/lib/openser/modules/mediaproxy.so"
loadmodule "/usr/local/lib/openser/modules/nathelper.so"
loadmodule "/usr/local/lib/openser/modules/textops.so"
loadmodule "/usr/local/lib/openser/modules/domain.so"
loadmodule "/usr/local/lib/openser/modules/acc.so"
#modparam("auth_db|uri_db|usrloc", "db_url", "mysql://ser:heslo@localhost/ser")
modparam("auth_db", "calculate_ha1", 1)
modparam("auth_db", "password_column", "password")
modparam("auth_db", "use_domain", 1)
modparam("domain", "db_mode", 1)
modparam("nathelper", "rtpproxy_disable", 1)
modparam("nathelper", "natping_interval", 0)
modparam("mediaproxy","natping_interval", 30)
modparam("mediaproxy","mediaproxy_socket", "/var/run/mediaproxy.sock")
modparam("mediaproxy","sip_asymmetrics","/usr/local/etc/openser/sip-asymmetric-clients")
modparam("mediaproxy","rtp_asymmetrics","/usr/local/etc/openser/rtp-asymmetric-clients")
modparam("usrloc", "db_mode", 2)
modparam("usrloc", "use_domain", 1)
modparam("registrar", "default_expires", 60)
modparam("registrar", "min_expires", 30)
modparam("registrar", "nat_flag", 6)
modparam("registrar", "use_domain", 1)
modparam("rr", "enable_full_lr", 1)
modparam("acc", "db_url", "mysql://openser:openserrw@localhost/openser")
modparam("acc", "log_level", 1)
modparam("acc", "log_flag", 1)
modparam("acc", "db_flag", 1)
route {
# -----------------------------------------------------------------
# Sanity Check Section
# -----------------------------------------------------------------
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483", "Too Many Hops");
break;
};
if (msg:len > max_len) {
sl_send_reply("513", "Message Overflow");
break;
};
# -----------------------------------------------------------------
# Record Route Section and Acc section
# -----------------------------------------------------------------
if (method=="INVITE" && client_nat_test("3")) {
# INSERT YOUR IP ADDRESS HERE
record_route_preset("212.XXX.104.XXX:5060;nat=yes");
} else if (method!="REGISTER") {
record_route();
setflag(1);
};
# -----------------------------------------------------------------
# Call Tear Down Section
# -----------------------------------------------------------------
if (method=="BYE" || method=="CANCEL") {
end_media_session();
};
# -----------------------------------------------------------------
# Loose Route Section
# -----------------------------------------------------------------
if (loose_route()) {
if (has_totag() && (method=="INVITE" || method=="ACK")) {
if (client_nat_test("3") || search("^Route:.*;nat=yes")) {
setflag(6);
use_media_proxy();
};
};
route(1);
break;
};
# -----------------------------------------------------------------
# Call Type Processing Section
# -----------------------------------------------------------------
if (uri!=myself) {
route(1);
break;
};
if (uri==myself) {
if (method=="CANCEL") {
route(3);
break;
} else if (method=="INVITE") {
route(3);
break;
} else if (method=="REGISTER") {
route(2);
break;
};
lookup("aliases");
if (uri!=myself) {
route(1);
break;
};
if (!lookup("location")) {
sl_send_reply("404", "User Not Found");
break;
};
};
route(1);
}
route[1] {
# -----------------------------------------------------------------
# Default Message Handler
# -----------------------------------------------------------------
t_on_reply("1");
if (!t_relay()) {
if (method=="INVITE" || method=="ACK") {
end_media_session();
};
sl_reply_error();
};
}
route[2] {
# -----------------------------------------------------------------
# REGISTER Message Handler
# ----------------------------------------------------------------
if (!search("^Contact:\ +\*") && client_nat_test("7")) {
setflag(6);
fix_nated_register();
force_rport();
};
sl_send_reply("100", "Trying");
if (!www_authorize("","subscriber")) {
www_challenge("","0");
break;
};
if (!check_to()) {
sl_send_reply("401", "Unauthorized");
break;
};
consume_credentials();
if (!save("location")) {
sl_reply_error();
};
}
route[3] {
# -----------------------------------------------------------------
# CANCEL and INVITE Message Handler
# -----------------------------------------------------------------
if (client_nat_test("3")) {
setflag(7);
force_rport();
fix_nated_contact();
};
lookup("aliases");
if (uri!=myself) {
route(1);
break;
};
if (uri=~"^sip:0[0-9]*@*") {
rewritehost("212.XXX.59.XXX");
route(1);
break;
};
if (!lookup("location")) {
sl_send_reply("404", "User Not Found");
break;
};
if (method=="CANCEL") {
route(1);
break;
};
if (!proxy_authorize("","subscriber")) {
proxy_challenge("","0");
break;
} else if (!check_from()) {
sl_send_reply("403", "Use From=ID");
break;
};
consume_credentials();
if (isflagset(6) || isflagset(7)) {
use_media_proxy();
};
route(1);
}
onreply_route[1] {
if ((isflagset(6) || isflagset(7)) && (status=~"(180)|(183)|2[0-9][0-9]")) {
if (!search("^Content-Length:\ +0")) {
use_media_proxy();
};
};
if (client_nat_test("1")) {
fix_nated_contact();
};
}
Valued Colleagues,
Can anyone tell me how I can use/read the value of an avpops variable in
my ser.cfg?!
For example, if my intention is to obtain a new uri value from database
and rewrite the
RURI using this value, would the following work properly?
if (avp_db_load("$ruri/username", "s:new-uri"))
{
rewriteuri("s:new-uri");
};
I appreciate your kind assistance in advance
ramin