<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
Al final el openser.cfg me ha quedado así, vosotros pensais que está bien??<BR>
<BR>
<BR>####### Global Parameters #########<BR>
debug=3<BR>log_stderror=yes<BR>#log_facility=LOG_LOCAL0<BR>
fork=no<BR>children=4<BR>dns=no<BR>rev_dns=no<BR>
/* uncomment the following lines to enable debugging */<BR>#debug=6<BR>#fork=no<BR>#log_stderror=yes<BR>
/* uncomment the next line to disable TCP (default on) */<BR>#disable_tcp=yes<BR>
/* uncomment the next line to enable the auto temporary blacklisting of<BR> not available destinations (default disabled) */<BR>#disable_dns_blacklist=no<BR>
/* uncomment the next line to enable IPv6 lookup after IPv4 dns<BR> lookup failures (default disabled) */<BR>#dns_try_ipv6=yes<BR>
/* uncomment the next line to disable the auto discovery of local aliases<BR> based on revers DNS on IPs (default on) */<BR>#auto_aliases=no<BR>
/* uncomment the following lines to enable TLS support (default off) */<BR>#disable_tls = no<BR>#listen = tls:your_IP:5061<BR>#tls_verify_server = 1<BR>#tls_verify_client = 1<BR>#tls_require_client_certificate = 0<BR>#tls_method = TLSv1<BR>#tls_certificate = "/usr/local/etc/openser/tls/user/user-cert.pem"<BR>#tls_private_key = "/usr/local/etc/openser/tls/user/user-privkey.pem"<BR>#tls_ca_list = "/usr/local/etc/openser/tls/user/user-calist.pem"<BR>
<BR>port=5060<BR>
/* uncomment and configure the following line if you want openser to<BR> bind on a specific interface/port/proto (default bind on all available) */<BR>listen=udp:192.168.1.2:5060<BR>
<BR>####### Modules Section ########<BR>
#set module path<BR>mpath="/usr/local/lib/openser/modules/"<BR>
/* uncomment next line for MySQL DB support */<BR>loadmodule "mysql.so"<BR>loadmodule "sl.so"<BR>loadmodule "tm.so"<BR>loadmodule "rr.so"<BR>loadmodule "maxfwd.so"<BR>loadmodule "usrloc.so"<BR>loadmodule "registrar.so"<BR>loadmodule "textops.so"<BR>loadmodule "mi_fifo.so"<BR>loadmodule "uri_db.so"<BR>loadmodule "uri.so"<BR>loadmodule "xlog.so"<BR>#loadmodule "acc.so"<BR>/* uncomment next lines for MySQL based authentication support<BR> NOTE: a DB (like mysql) module must be also loaded */<BR>loadmodule "auth.so"<BR>loadmodule "auth_db.so"<BR>/* uncomment next line for aliases support<BR> NOTE: a DB (like mysql) module must be also loaded */<BR>#loadmodule "alias_db.so"<BR>/* uncomment next line for multi-domain support<BR> NOTE: a DB (like mysql) module must be also loaded<BR> NOTE: be sure and enable multi-domain support in all used modules<BR> (see "multi-module params" section ) */<BR>loadmodule "domain.so"<BR>/* uncomment the next two lines for presence server support<BR> NOTE: a DB (like mysql) module must be also loaded */<BR>#loadmodule "presence.so"<BR>#loadmodule "presence_xml.so"<BR>
<BR># ----------------- setting module-specific parameters ---------------<BR>
<BR># ----- mi_fifo params -----<BR>modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")<BR>
<BR># ----- rr params -----<BR># add value to ;lr param to cope with most of the UAs<BR>modparam("rr", "enable_full_lr", 1)<BR># do not append from tag to the RR (no need for this script)<BR>#modparam("rr", "append_fromtag", 0)<BR>
<BR># ----- rr params -----<BR>#modparam("registrar", "method_filtering", 1)<BR>/* uncomment the next line to disable parallel forking via location */<BR># modparam("registrar", "append_branches", 0)<BR>/* uncomment the next line not to allow more than 10 contacts per AOR */<BR>#modparam("registrar", "max_contacts", 10)<BR>
<BR># ----- uri_db params -----<BR>/* by default we disable the DB support in the module as we do not need it<BR> in this configuration */<BR>modparam("uri_db", "use_uri_table", 0)<BR>modparam("uri_db", "db_url", "mysql://openser:openserrw@localhost/openser")<BR>
<BR># ----- acc params -----<BR>/* what sepcial events should be accounted ? */<BR>#modparam("acc", "early_media", 1)<BR>#modparam("acc", "report_ack", 1)<BR>#modparam("acc", "report_cancels", 1)<BR>/* by default ww do not adjust the direct of the sequential requests.<BR> if you enable this parameter, be sure the enable "append_fromtag"<BR> in "rr" module */<BR>#modparam("acc", "detect_direction", 0)<BR>/* account triggers (flags) */<BR>#modparam("acc", "failed_transaction_flag", 3)<BR>#modparam("acc", "log_flag", 1)<BR>#modparam("acc", "log_missed_flag", 2)<BR>/* uncomment the following lines to enable DB accounting also */<BR>#modparam("acc", "db_flag", 1)<BR>#modparam("acc", "db_missed_flag", 2)<BR>
<BR># ----- usrloc params -----<BR>#modparam("usrloc", "db_mode", 0)<BR>/* uncomment the following lines if you want to enable DB persistency<BR> for location entries */<BR>modparam("usrloc", "db_mode", 2)<BR>modparam("usrloc", "db_url",<BR> "mysql://openser:openserrw@localhost/openser")<BR>
<BR># ----- auth_db params -----<BR>/* uncomment the following lines if you want to enable the DB based<BR> authentication */<BR>modparam("auth_db", "calculate_ha1", yes)<BR>modparam("auth_db", "password_column", "ha1")<BR>modparam("auth_db", "db_url",<BR> "mysql://openser:openserrw@localhost/openser")<BR>#modparam("auth_db", "load_credentials", "")<BR>modparam("auth_db", "password_column", "ha1b")<BR>
# ----- alias_db params -----<BR>/* uncomment the following lines if you want to enable the DB based<BR> aliases */<BR>#modparam("alias_db", "db_url",<BR># "mysql://openser:openserrw@localhost/openser")<BR>
<BR># ----- domain params -----<BR>/* uncomment the following lines to enable multi-domain detection<BR> support */<BR>modparam("domain", "db_url",<BR> "mysql://openser:openserrw@localhost/openser")<BR>modparam("domain", "db_mode", 1) # Use caching<BR>
## Tiempo para la llamada<BR>modparam("tm","fr_inv_timer", 45)<BR>
# ----- multi-module params -----<BR>/* uncomment the following line if you want to enable multi-domain support<BR> in the modules (dafault off) */<BR>#modparam("alias_db|auth_db|usrloc|uri_db", "use_domain", 1)<BR>
<BR># ----- presence params -----<BR>/* uncomment the following lines if you want to enable presence */<BR>#modparam("presence|presence_xml", "db_url",<BR># "mysql://openser:openserrw@localhost/openser")<BR>#modparam("presence_xml", "force_active", 1)<BR>#modparam("presence", "server_address", "sip:192.168.1.2:5060")<BR>
<BR>####### Routing Logic ########<BR>
<BR># main request routing logic<BR>
route{<BR>
## LOG del mensaje recibido<BR> xlog("L_INFO", "\n\n$Cbg[ $mi -- $rm -- $ua ($si:$sp) -- FROM: $fu -- TO: $tU -- ]$Cxx\n);<BR>
## Comprobamos que el mensaje no sea demasiado largo ni halla superado max_forwards<BR>
if (!mf_process_maxfwd_header("10")) {<BR> sl_send_reply("483","Too Many Hops");<BR> xlog("L_ERROR", "\n\n$CwrToo Many Hops$Cxx\n");<BR> exit;<BR> };<BR> if(msg:len>max_len){<BR> sl_send_reply("513", "Message Overflow");<BR> xlog("L_ERROR", "\n\n$CwrMessage Overflow$Cxx\n");<BR> exit;<BR> }<BR>
## RECORD ROUTE SECTION<BR> ## Nos ponemos en medio, poniendo una cabecera Record-Route, para que los mensajes pasen por<BR> ## nosotros. Pero si es REGISTER no se debe hacer.<BR>
if(method!="REGISTER"){<BR> record_route();<BR> };<BR>
## LOOSE ROUTE SECTION<BR> ## Los mensajes pertenecientes a un mismo dialogo deben tomar el camino indicado por Record-Route<BR>
If (loose_route()){<BR> xlog("L_INFO", "\n\n *** Estamos en loose-route ***\n\n");<BR> route(1);<BR> exit;<BR> };<BR>
## CALL TYPE PROCESSING SECTION<BR> ## Mensajes con destino distinto de nuestro servidor, hacemos relay, pero .<BR> ## Ruta de salientes<BR>
if (!is_uri_host_local()){<BR> if (is_from_local()) {<BR> route(4);<BR> } else {<BR> sl_send_reply("403", "Forbidden");<BR> };<BR> exit;<BR> };<BR>
## Mensajes con destino nuestro servidor (por ejemplo llamadas a usuarios registrado aqui.<BR> ## Tenemos que tratar explicitamente el ACK<BR>
if (method=="ACK") {<BR> xlog("L_INFO", "$Cbx--- Procesando un ACK *not whitin a dialog*$Cxx\n");<BR> route(1);<BR> exit;<BR> }<BR>
## CANCEL messages can be safely processed with a simple call to t_relay()<BR> ## because SER will automatically match the CANCEL message to the original<BR> ## INVITE message (stateful)<BR> ## Para el CANCEL, con la ruta por defecto vale.<BR>
else if (method=="CANCEL") {<BR> route(1);<BR> exit;<BR> }<BR>
## Los REGISTER los tratamos a parte (en la ruta 2)<BR> else if (method=="REGISTER"){<BR> route(2);<BR> exit;<BR> }<BR>
## Los INVITEs a la ruta 3 (autenticacion, ...)<BR> else if (method=="INVITE"){<BR> route(3);<BR> exit;<BR> }<BR>
## Resto de casos (OPTIONS, REFER, BYE...)<BR> else {<BR> # Puede que venga a nosotros pero tengamos definido un alias a fuera. lookup("aliases") nos<BR> ##da la nueva URI que puede sea != myself.<BR> lookup("aliases");<BR> if (!is_uri_host_local()) {<BR> xlog("L_INFO", "$CrxNot my URI after the alias lookup$Cxx\n");<BR> ## A las salientes<BR> route(4);<BR> exit;<BR> };<BR>
## Miramos si existe el destino en nuestra tabla "location".<BR> if (!lookup("location")){<BR> xlog("L_INFO","$Crx404 User Not Found$Cxx\n");<BR> sl_send_reply("404", "Not Found");<BR> exit;<BR> };<BR>
## Si hemos llegado hasta aqui enrutamos el mensaje al destino por<BR> ## la ruta por defecto.<BR> route(1);<BR> exit;<BR> };<BR>};<BR>
#-------------------------------------------------------------------------<BR># DEFAULT MESSAGE HANDLER<BR>#-------------------------------------------------------------------------<BR>
route[1]<BR>{<BR> ## Indicamos que las respuestas que se originen aqui vayan a la ruta<BR> ## onreply_route[1], asi sabemos lo que pasa<BR> t_on_reply("1");<BR>
<BR> if (!t_relay()) {<BR> sl_reply_error();<BR> };<BR> xlog("L_INFO","$CbxMessage is reloayed; now exiting$Cxx\n");<BR> exit;<BR>}<BR>
#------------------------------------------------------------------------<BR># REGISTER MESSAGE HANDLER<BR>#------------------------------------------------------------------------<BR>
route[2]<BR>{<BR> sl_send_reply("100", "Trying");<BR> if (!www_autorize("", "subscriber")) {<BR> xlog("L_INFO", "$CbxSe necesita autenticacion para el REGISTER$Cxx\n");<BR> www_challange("","0");<BR> exit;<BR> }<BR> else if (!check_to()){<BR> ## Validate the supplied to: header against the previously<BR> ## validated digest credentials. If they do not match then we must<BR> ## reject the REGISTER<BR> xlog("L_INFO","$Crx*** check_to()=NO!! ***$Cxx\n");<BR> sl_send_reply("401","Unauthorized");<BR> exit;<BR> };<BR> xlog("L_INFO","$Cbx*** REGISTER correcto ***$Cxx\n");<BR>
## Eliminamos las cabeceras relativas a la autenticacion, porque ya no son<BR> ## necesarias y no vamos a ir mandandolas por ahi...<BR> consume_credentials();<BR>
## Informo si es un UNREGISTER (rfc3261 -- 10.2.2)<BR> if ($hdr(contact)=~";expires=0") || ($hdr(expires)=="0"){<BR> xlog("L_INFO","$Cbx*** UNREGISTER ***$Cxx\n");<BR> }<BR>
## Guardamos la localizacion en la tabla "location".<BR> if (!save("location")) {<BR> sl_reply_error();<BR> };<BR>}<BR>
<BR>#--------------------------------------------------------------------------<BR># INVITE MESSAGE HANDLER<BR>#--------------------------------------------------------------------------<BR>
route[3]<BR>{<BR> ## Es necesario autenticarse para poder llamar<BR> if (!proxy_authorize("","subscriber")){<BR> xlog("L_INFO","$cBXSe necesita autenticacion para el INVITE$Cxx\n");<BR> exit;<BR> }<BR>
## Tienen que coincidir el nombre de usuario con el de la cabecera FROM<BR> else if (!check_from()){<BR> xlog("L_INFO", "$Crx*** check_form()=NO!! ***\n");<BR> sl_send_reply("403", "Use From=Id");<BR> exit;<BR> };<BR>
xlog("L_INFO","$Cbx*** INVITE correcto ***$Cxx\n");<BR> consume_credentials();<BR>
## Puede que venga a nosotros pero tengamos definido un alias a fuera.<BR> ## lookup("aliases") nos da la nueva uri que puede sea !=myself<BR> lookup("aliases");<BR> if(!is_uri_host_local()){<BR> ## A las salientes<BR> route(4);<BR> exit;<BR> };<BR>
if(!lookup("location")){<BR> xlog("L_INFO","$Crx404 User Not Found$Cxx\n");<BR> sl_send_reply("404","User Not Found");<BR> exit;<BR> };<BR> <BR><STRONG> rewritehost(10.95.44.29);</STRONG><BR> <BR>
## El usuario se ha autenticado y a quien llama existe en "location" asíue lo rutamos.<BR> route(1);<BR>}<BR>
#--------------------------------------------------------------------------------------<BR># OUTGOING<BR>#--------------------------------------------------------------------------------------<BR>
route[4]<BR>{<BR> xlog("L_INFO","Cbx*** Llamada saliente ***$Cxx\n");<BR> route(1);<BR> exit;<BR>}<BR>
#---------------------------------------------------------------------------------------<BR># ONREPLY_ROUTE[1] -- Para ver las respuestas a los INVITE.<BR>#---------------------------------------------------------------------------------------<BR>
## Si un usuario hace un INVITE las respuestas del llamado (Trying, Ringing, OK ...) pasan por aqui<BR>
onreply_route[1]<BR>{<BR> xlog("L_INFO","\n\n$Cbc[Respuesta][ $rs ($rr) desde $si:$sp -- Peticion:($rm) ] $Cxx\n");<BR>}<BR><BR>Por otro lado, suponiendo que esté bien. Como hago para comunicar openser con el EyeBeam, alguien sabe como hacerlo??<BR>
<BR>
Muchisimas gracias por todo. <BR>
Y siento ser tan preguntona! pero es que todo esto me parece complicadisimo! <BR>
<BR>
<BR>> Date: Thu, 17 Jul 2008 14:56:32 +0200<BR>> From: saghul@gmail.com<BR>> To: users-es@lists.openser.org<BR>> Subject: Re: [OpenSER-Users-ES] {Spam?} dudas con open ser<BR>> <BR>> > Lo siento pero es que ando perdidísima!! no entiendo nada!<BR>> > He estado mirando los enlaces que me pones pero la verdad es que tampoco me<BR>> > aclaran mucho las cosas, admás no estoy muy bien de inglés, no hay<BR>> > informacion útil en castellano?<BR>> ><BR>> <BR>> No esta en castellano, pero el libro "Building Telephony Systems with<BR>> OpenSER" esta muy bien, tiene muchos ejemplos, y es un buen comienzo.<BR>> <BR>> <BR>> -- <BR>> Saúl -- "Nunca subestimes el ancho de banda de un camión lleno de disketes."<BR>> ----------------------------------------------------------------<BR>> http://www.saghul.net/<BR>> <BR>> _______________________________________________<BR>> Users-es mailing list<BR>> Users-es@lists.openser.org<BR>> http://lists.openser.org/cgi-bin/mailman/listinfo/users-es<BR><BR><br /><hr />¡Atrévete con Abecedario, el juego del momento! Invita a tus contactos de Messenger y demuéstrales lo que sabes <a href='http://www.vivelive.com/abecedario' target='_new'>demuéstrales lo que sabes</a></body>
</html>