Hi,
why does OpenSER sends three Start-Radius-Packets on an Invite und and
two on a bye?
My config has these entries:
[...]
modparam("acc", "radius_flag", 3)
[...]
if (method=="BYE" || method=="CANCEL") {
setflag(3);
};
[...]
} else if (method=="INVITE") {
setflag(3);
[...]
Hi everybody,
I just committed on CVS head some changes into TM script functions -
related functions are merged into new ones; the goal is to simplify the
usage of these functions and to open way for NAPTR lookup.
Following functions were merged:
- t_relay_to_udp(), t_relay_to_tcp(), t_relay_to_tls() merged into
t_relay(proto:host:port);
- t_forward_nonack_uri(), t_forward_nonack_udp(),
t_forward_nonack_tcp(), t_forward_nonack_tls() merged
into t_forward_nonack(proto:host:port) and t_forward_nonack();
- t_replicate_udp(), t_replicate_tcp(), t_replicate_tls() merged into
t_replicate(proto:host:port)
Note that the functionality is not affected.
To make the transition easier, the replaced functions are not removed
yet, but marked as obsolete (via documentation and messages at runtime).
The plan is to have them removed soon - a second set of changes into the
API is to come.
regards,
bogdan
Can anyone please give me a hint how to access the reply reason in
failure_route - or is it really not possible to trigger some event on the
response _reason_.
0(704) SIP Reply (status):
0(704) version: <SIP/2.0>
0(704) status: <404>
0(704) reason: <CLIR Inactive> <----- I want this!
There is a pseudo variable for that, but no function can search the replied
reason!
Is it really true, that you can use the reply status only
(t_check_status("404"))?
Using avpops the pseude variables $rr and $rs are <null> at that moment. Do
I miss something?
I'm doing that:
failure_route[3]
{
if (t_check_status("404") ) {
avp_printf("$reason", "The reply: $rr, $rs");
log("\n----------------------------------------\n");
avp_print();
log("\n----------------------------------------\n");
}
}
resulting in:
0(740) DEBUG:avpops:print_avp: p=0xb6177838, flags=2
0(740) DEBUG: id=<32>
0(740) DEBUG: val_str=<The reply: <null>, <null>>
Any hints welcome.
/Walter
Hello.
I am in a strange situation. I have two asterisk. Asterisk "A" makes a
call for asterisk "B" by IAX. Asterisk "B" recives the call and delivers
it to Openser by SIP. The problem is openser printing this in the screen:
ERROR: parse_to : unexpected char ["] in status 5: <<"David" <sip:>> .
ERROR:parse_from_header: bad from header
ERROR: new_t: no valid From in INVITE
ERROR: t_newtran: new_t failed
ERROR: sl_reply_error used: I'm terribly sorry, server error occurred (1/SL)
Do you know the reason?
Is this a bug? Which is guilty, asterisk or openser?
I have this problem only in this scenario.
Thank you.
--
--------------------------------
David Castro Mosquera
Adianta
Tel: (34) 902 999 178
Fax: (34) 902 501 437
Email: david.castro(a)adianta.net
Web: www.adianta.net
--------------------------------
Hi everybody,
I just committed on CVS head a new functionality that was requested by
Lenir <lenirsantiago(a)yahoo.com> some time ago.
It's about detecting and compensating in the ACC records of the
direction flow for sequential requests. For more details about it and
about how to used it, please see the online documentation:
http://openser.org/docs/modules/1.1.x/acc.html#AEN625
Any testing/feedback is highly appreciated ;).
regards,
bogdan
Is it possible to delete a specific contact location for a user, and by using
openserctl? I see that adding and deleting a certain contact is on the
openser roadmap, and if this means that this functionality has made it into
openser but not into openserctl, than I'm willing to try to add it myself.
Any advice where to start is appreciated.
Mike Williams
Hi all
I need a functionality on openser.
The functionality would allow users to save on the server
- a message,
- a time and date
- and a group of uris,
and at the given time, the server would send the message to each one of the group of uris.
This functionality would be useful for users to send reminders of events to a list of uris.
Are there any modules on openser that do something like that?
If not, how could I implement it?
Thanks
Andrea Giordanna
---------------------------------
Yahoo! doce lar. Faça do Yahoo! sua homepage.
Since I have no idea about asterisk, and I would like to ask can I use
sems instead of asterisk to provide same function. Any openser+sems
howto available for fedora core4?
This is the sip.conf from asterisk:
###########################################################################
[general]
bindport=5062
bindaddr=0.0.0.0
;canreinvite=no
disallow=all
;allow=all
register => asterisk:asterisk@my_openser_ip ;you can found more info
of this in http://www.voip-info.org/wiki/
[ser]
allow=ulaw
allow=alaw
allow=g723.1
allow=g726
allow=g729
allow=gsm
allow=ilbc
allow=lpc10
allow=speex
allow=adpcm
type=friend ; We allow incoming and outgoing calls. Use
peer if you are only doing MWI
context=internal ; This is the context incoming calls land in
host=ip_ser ; This is the hostname or IP address of your SER
server
;fromdomain=ser.server.rld ; This is your SER_DOMAIN
insecure=very ; This allows incoming calls from the phones
routing through ser to be passed into asterisk
dtmfmode=rfc2833
This is the openser.cfg
######################################################################
#
# $Id: openser.cfg,v 1.5 2005/10/28 19:45:33 bogdan_iancu Exp $
#
# simple quick-start config script
#
# ----------- global configuration parameters ------------------------
debug=3 # debug level (cmd line: -dddddddddd)
fork=yes
log_stderror=yes # (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/openser_fifo"
#
# uncomment the following lines for TLS support
#disable_tls = 0
#listen = tls
#tls_verify = 1
#tls_require_certificate = 0
#tls_require_certificate = 1
#tls_method = TLSv1
#tls_certificate = "/usr/local/etc/openser/tls/user/user-cert.pem"
#tls_certificate = "/usr/local/etc/openser/tls/openser1/cert.pem"
#tls_private_key = "/usr/local/etc/openser/tls/user/user-privkey.pem"
#tls_private_key = "/usr/local/etc/openser/tls/openser1/privkey.pem"
#tls_ca_list = "/usr/local/etc/openser/tls/user/user-calist.pem"
#tls_ca_list = "/usr/local/etc/openser/tls/openser1/calist.pem"
# ------------------ module loading ----------------------------------
# Uncomment this if you want to use SQL database
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/textops.so"
loadmodule "/usr/local/lib/openser/modules/xlog.so"
loadmodule "/usr/local/lib/openser/modules/uac.so"
loadmodule "/usr/local/lib/openser/modules/domain.so"
loadmodule "/usr/local/lib/openser/modules/mediaproxy.so"
#loadmodule "/usr/local/lib/openser/modules/avpops.so"
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
loadmodule "/usr/local/lib/openser/modules/auth.so"
loadmodule "/usr/local/lib/openser/modules/auth_db.so"
# ----------------- setting module-specific parameters ---------------
# -- usrloc params --
#modparam("usrloc", "db_mode", 0)
# Uncomment this if you want to use SQL database
# for persistent storage and comment the previous line
modparam("usrloc", "db_mode", 2)
# -- auth params --
# Uncomment if you are using auth module
#
modparam("auth_db", "calculate_ha1", yes)
#
# If you set "calculate_ha1" parameter to yes (which true in this config),
# uncomment also the following parameter)
#
modparam("auth_db", "password_column", "password")
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
# ------------------------- request routing logic -------------------
# main routing logic
route{
xlog("yo soy <$si> y el destino es <$tu> <$td> <$du> <$rm> \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");
exit;
};
if (msg:len >= 2048 ) {
sl_send_reply("513", "Message too big");
exit;
};
# -----------------------------------------------------------------
# Handle NOTIFY requests from Sipura's to keep-alive NAT
# -----------------------------------------------------------------
if ((is_method("NOTIFY")) && (! uri=~"sip:.*[@]+.*")) {
xlog("entre en notify \n");
sl_send_reply("200", "OK keep-alive");
return;
}
# -----------------------------------------------------------------
# Only allow known sip messages,ack, pq no hace falta responder.
# -----------------------------------------------------------------
if (!is_method("INVITE|REGISTER|BYE|ACK|CANCEL")) {
xlog("Estoy en metodo no diponible y que es <$rm>\n");
sl_send_reply("501", "Not implemented here");
return;
};
# 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()) {
xlog("entree en loose route\n");
# mark routing logic in request
append_hf("P-hint: rr-enforced\r\n");
route(1);
};
# 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 (uri=~"^sip:*.") {
if (method=="ACK" && (src_ip!=XXXXXX)){
# Uncomment this if you want to use digest authentication
if (!www_authorize("XXXXXXX", "subscriber")) {
www_challenge("XXXXXXXX", "0");
exit;
};
consume_credentials();
xlog("Voy a mandar respuesta a un ACK, yo soy <$si> y el destino
es <$tu> <$td> <$du>\n");
route(1);
exit;
};
if (method=="REGISTER") {
# Uncomment this if you want to use digest authentication
if (!www_authorize("XXXXX", "subscriber")) {
www_challenge("XXXXX", "1");
exit;
};
xlog("Me llego un register y yo soy <$si> y el destino es <$tu>
<$td> <$du>\n");
consume_credentials();
save("location");
exit;
};
if (method=="INVITE") {
# Uncomment this if you want to use digest authentication
if (!www_authorize("XXXXX", "subscriber") && (src_ip!=XXXXXX) ) {
www_challenge("XXXXX", "0");
exit;
};
# consume_credentials();
xlog("Un tio mando un invite <$si> y el destino es <$tu> <$td>
<$du> \n");
sl_send_reply("100", "Trying");
lookup("aliases");
#Si es de asterisk y no encuentra el telefono digo que no esta.
if (!lookup("location") && (src_ip==XXXXXXXX) ) {
#xlog("no encuentra el destino\n");
sl_send_reply("404", "Not Found");
exit;
} else if (lookup("location") && (src_ip==XXXXX)){#if a call
come from * and sip phone online i route to ring
sl_send_reply("180", "Ringing");
route(2);
return;
} else {#otherway i forward to *.
append_hf("P-hint: usrloc applied\r\n");
#sl_send_reply("180", "Ringing");
route(1);
return;
};
};
if (method=="CANCEL" && (src_ip==XXXXX)) {#Si viene de asterisk, lo
mando con estado al telefo.
#xlog("Me llego un cancel de asterisk\n");
route(2);
return;
} else if (method=="CANCEL" && (src_ip!=XXXXXX)) { #Si no viene de
asterisk...
# Uncomment this if you want to use digest authentication
if (!www_authorize("XXXXXX", "subscriber")) {
www_challenge("XXXXXX", "0");
exit;
};
consume_credentials();
#xlog("Me llego un cancel de NO asterisk\n");
lookup("aliases");
if (!lookup("location")) {#primero compruebo que este numero existe.
#xlog("no encuentra el destino\n");
sl_send_reply("404", "Not Found");
exit;
} else {
route(1); #Se lo mando a asterisk.
return;
};
};
if (method=="BYE") {
# Uncomment this if you want to use digest authentication
if (!www_authorize("XXXXX", "subscriber") && (src_ip!=XXXXXX) ) {
www_challenge("XXXXX", "0");
exit;
};
consume_credentials();
xlog("Me llego un BYE \n");
if (src_ip!=XXXXXXX){
route(1);
} else {
route(2);
};
sl_send_reply("200", "OK");
exit;
};
};
}
#I route to asterisk here
route[1] {
xlog("Estoy en route(1) \n");
forward(XXXXX,5062);
return;
}
#I route from asterisk to sip phones here
route[2] {
xlog("Estoy en route(2)\n");
if (!t_relay()) {
#xlog("Dentro de error del t_relay del 2\n");
sl_reply_error();
};
return;
}
###################################################
Notes:
XXXX=ip_asterisk
This configuration works in the same net. Now, I'm trying to work behind
a nat. This configuration don't works behind a nat.
I don't challenge asterisk, if a call comes from asterisk_ip, I trust.
Bye.
Hi,
My question today is more regarding RFC's.
I've tried to find out if NOTIFY and Event: message-summary needs a
Contact header.
At least my Cisco gateway discards Notify's without a Contact header
(400 Bad Request - 'Malformed/Missing Contact field')
Is this a Cisco bug or SHOULD/MUST a NOTIFY have Contact of the sender?
br hw