[OpenSER-Users-ES] ayuda con openser

David Villasmil david.villasmil.work at gmail.com
Thu Jan 17 12:44:15 CET 2008


Me parece también que los:

if (uri =~ .^sip:1[0-9]{10}@.*.) {
(Línea 321)

debería ser:
if (uri =~ ".^sip:1[0-9]{10}@.*.") {

lo dicho en el mail anterior... sip wise
On Jan 17, 2008 12:41 PM, David Villasmil <david.villasmil.work at gmail.com>
wrote:

> O mejor aún:
>
> metete en: http://sipwise.com/
> y crea uno con el wizard... Aunque es casi imposible de comprender para
> quienes estamos empezando. Asegurate de leer los comentarios del principio
> del config.
>
> :)
>
> Saludos
>   On Jan 17, 2008 12:42 AM, Gustavo <ggb at tid.es> wrote:
>
> > Hola,
> >
> > Estás usando un fichero con configuración que no soporta tu versión de
> > openser.  Por ejemplo el parametro nat_flag del modulo registrar ya no
> > existe.
> >
> > ¿Porqué no empiezas con un fichero de configuración más sencillo?
> >
> > G:
> >
> > On Wed, 2008-01-16 at 17:27 -0600, Ronmel Jiron wrote:
> > > gracias por responder...al hacer
> > > # pidof openser      ó
> > > # nmap -sU 127.0.0.1 -p 5060
> > >  no sale nada, o sea que no esta funcionando. Pero ahora he modificado
> > > mi openser.cfg y manda 23 errores..( no soy muy bueno en esto).
> > > Mi archivo openser.cfg es el siguiente:
> > >
> > > #
> > > # $Id: openser.cfg 1676 2007-02-21 13:16:34Z bogdan_iancu $
> > > #
> > > # simple quick-start config script
> > > # Please refer to the Core CookBook at
> > http://www.openser.org/dokuwiki/doku.php
> > > # for a explanation of possible statements, functions and parameters.
> > > #
> > >
> > > # ----------- global configuration parameters ------------------------
> > >
> > > debug=3            # debug level (cmd line: -dddddddddd)
> > > fork=yes
> > > log_stderror=yes    # (cmd line: -E)
> > > children=4
> > >
> > > # Uncomment these lines to enter debugging mode
> > > #fork=no
> > > #log_stderror=yes
> > > #
> > >
> > > port=5060
> > > alias=200.30.177.115
> > >
> > > dns=no
> > > rev_dns=no
> > >
> > > # uncomment the following lines for TLS support
> > > #disable_tls = 0
> > > #listen = tls:your_IP:5061
> > > listen = 200.30.177.115
> > > #tls_verify_server = 1
> > > #tls_verify_client = 1
> > > #tls_require_client_certificate = 0
> > > #tls_method = TLSv1
> > > #tls_certificate = "/usr/local/etc/openser/tls/user/user-cert.pem"
> > > #tls_private_key = "/usr/local/etc/openser/tls/user/user-privkey.pem"
> > > #tls_ca_list = "/usr/local/etc/openser/tls/user/user- calist.pem"
> > >
> > > # ------------------ module loading ----------------------------------
> > >
> > > #set module path
> > > mpath="/usr/local/lib/openser/modules/"
> > >
> > > # Uncomment this if you want to use SQL database
> > > #loadmodule "mysql.so"
> > >
> > > #loadmodule "sl.so"
> > > #loadmodule "tm.so"
> > > #loadmodule "rr.so"
> > > #loadmodule "maxfwd.so"
> > > #loadmodule " usrloc.so"
> > > #loadmodule "registrar.so"
> > > #loadmodule "textops.so"
> > >
> > > loadmodule "mi_fifo.so"
> > >
> > > modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")
> > > modparam("mi_fifo", "fifo_mode", 0660)
> > > modparam("mi_fifo", "fifo_group", "openser")
> > > modparam("mi_fifo", "fifo_user", "openser")
> > > modparam("mi_fifo", "reply_dir", "/tmp/")
> > > modparam("mi_fifo", "reply_indent", "\t")
> > >
> > >
> > > #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/xlog.so"
> > > loadmodule "/usr/local/lib/openser/modules/uac.so"
> > > loadmodule "/usr/local/lib/openser/modules/speeddial.so"
> > > loadmodule "/usr/local/lib/openser/modules/avpops.so"
> > >
> > > # Uncomment this if you want digest authentication
> > > # mysql.so must be loaded !
> > > #loadmodule "auth.so"
> > > #loadmodule "auth_db.so"
> > >
> > > # ----------------- setting module-specific parameters ---------------
> > >
> > > modparam("usrloc|auth_db|domain|speeddial|acc", "db_url",
> > > "mysql://openser:openserrw@localhost/openser")
> > > modparam("auth_db", "calculate_ha1", 1)
> > > modparam("auth_db", "use_domain", 0)
> > > modparam("domain", "db_mode", 1)
> > > modparam("nathelper", "rtpproxy_disable", 1)
> > > modparam("nathelper", "natping_interval", 60)
> > > modparam("mediaproxy","natping_interval", 30)
> > > modparam("mediaproxy","mediaproxy_socket", "/var/run/mediaproxy.sock")
> > > modparam("usrloc", "db_mode", 2)
> > > modparam("usrloc", "use_domain", 0)
> > > modparam("registrar", "default_expires", 60)
> > > modparam("registrar", "min_expires", 30)
> > > modparam("registrar", "nat_flag", 6)
> > > modparam("registrar", "use_domain", 0)
> > > modparam("rr", "enable_full_lr", 1)
> > > modparam("auth", "rpid_suffix",
> > ";party=calling;id-type=subscriber;screen=yes")
> > > modparam("auth", "rpid_avp", "s:rpid")
> > >
> > > # -- mi_fifo params --
> > >
> > > modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")
> > >
> > > # -- 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{
> > >
> > >       # 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;
> > >       };
> > >
> > >       # 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 == "INVITE" && client_nat_test("3")) {
> > >                 # Must add valid IP address below
> > >                  record_route_preset(" 200.30.177.115:5060;nat=yes");
> > >         } else if (method != "REGISTER") {
> > >                 record_route();
> > >         };
> > >
> > >       # subsequent messages withing a dialog should take the
> > >       # path determined by record-routing
> > >       if (loose_route()) {
> > > 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);
> > >                 return;
> > >         };
> > >               # mark routing logic in request
> > >               ##append_hf("P-hint: rr-enforced\r\n");
> > >               ##route(1);
> > >
> > >       if (!uri==myself) {
> > >               route(1);
> > >                 return;
> > >       };
> > >               # mark routing logic in request
> > >               ##append_hf("P-hint: outbound\r\n");
> > >               # if you have some interdomain connections via TLS
> > >               #if(uri=~"@tls_domain1.net") {
> > >               #       t_relay("tls: domain1.net");
> > >               #       exit;
> > >               #} else if(uri=~"@tls_domain2.net") {
> > >               #       t_relay("tls: domain2.net");
> > >               #       exit;
> > >               #}
> > >               ##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 (method == "BYE") {
> > >                         route(4);
> > >                         return;
> > >                 } else if (method == "CANCEL") {
> > >                         route(4);
> > >                         return;
> > >                 } else if (method == "INVITE") {
> > >                         route(3);
> > >                         return;
> > >                 } else  if (method == "REGISTER") {
> > >                         route(2);
> > >                         return;
> > >                 } else if (method == "NOTIFY") {
> > >                         sl_send_reply("200", "Understood");
> > >                         return;
> > >                 } else if (method == "OPTIONS") {
> > >                         sl_send_reply("200", "Got it");
> > >                         return;
> > >                 }
> > >         };
> > >         route(1);
> > > }
> > >
> > >               ##if (method=="REGISTER") {
> > >
> > >                       # Uncomment this if you want to use digest
> > authentication
> > >                       #if (!www_authorize("openser.org",
> > "subscriber")) {
> > >                       #       www_challenge(" openser.org", "0");
> > >                       #       exit;
> > >                       #};
> > >
> > >               ##      save("location");
> > >               ##      exit;
> > >               ##};
> > >
> > >               ##lookup("aliases");
> > >               ##if (!uri==myself) {
> > >               ##      append_hf("P-hint: outbound alias\r\n");
> > >                       route(1);
> > >               ##};
> > >
> > >               # native SIP destinations are handled using our USRLOC
> > DB
> > >               ##if (!lookup("location")) {
> > >               ##      sl_send_reply("404", "Not Found");
> > >               ##      exit;
> > >               ##};
> > >               ##append_hf("P-hint: usrloc applied\r\n");
> > >       ##};
> > >
> > >       ##route(1);
> > > ##}
> > >
> > >
> > > route[1] {
> > >       t_on_reply("1");
> > >         if (!t_relay()) {
> > >                 if (method=="INVITE" || method=="ACK") {
> > >                         end_media_session();
> > >                 };
> > >                 sl_reply_error();
> > >         };
> > > }
> > >       # send it out now; use stateful forwarding as it works reliably
> > >       # even for UDP2TCP
> > >       ##if (!t_relay()) {
> > >       ##      sl_reply_error();
> > >       ##};
> > >       ##exit;
> > > ##}
> > >
> > > # REGISTER Message Handling
> > > # -------------------------
> > > route[2] {
> > >         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");
> > >                 return;
> > >         };
> > >         if (!check_to()) {
> > >                 sl_send_reply("401", "Unauthorized");
> > >                 return;
> > >         };
> > >         consume_credentials();
> > >         if (!save("location")) {
> > >                 sl_reply_error();
> > >         };
> > > }
> > >
> > > # INVITE Message Handling
> > > # ----------------------------------
> > > route[3] {
> > >         # Test for nat, perhaps fix headers
> > >         if (client_nat_test("3")) {
> > >                 setflag(7);
> > >                 force_rport();
> > >                 fix_nated_contact();
> > >         };
> > >
> > >         # 3 and 4 digits URIs are sent to our Asterisk PBX
> > >         if ((uri =~ "^sip:[0-9]{3}@.*") || (uri =~
> > "^sip:[0-9]{4}@.*")) {
> > >                 rewritehost("pbx.valid.host.com:5060");
> > >                 use_media_proxy();
> > >                 route(1);
> > >                 return;
> > >         };
> > >
> > >         # Any URI that begins with 1 plus 10 digits authenticate and
> > pass on
> > >         # to our SIP Provider
> > >         if (uri =~ .^sip:1[0-9]{10}@.*.) {
> > >                 # Authenticate these calls
> > >                 if (!proxy_authorize(.",.subscriber.)) {
> > >                         proxy_challenge(.",.0.);
> > >                         return;
> > >                 } else if (!check_from()) {
> > >                         sl_send_reply(.403., .Use From ID.);
> > >                         return;
> > >                 };
> > >                 consume_credentials();
> > >                 rewritehostport(.proxy- 1.nufone.net:5060.);
> > >                 route(1);
> > >                 return;
> > >         };
> > >
> > >         if (!lookup(.location.)) {
> > >                 sl_send_reply(.404., .User Not Found, Sorry.);
> > >                 return;
> > >         };
> > >
> > >         # If NAT is previously detected, proxy
> > >         if (isflagset(6) || isflagset(7)) {
> > >                 use_media_proxy();
> > >         };
> > >
> > >         route(1);
> > > }
> > >
> > > # CANCEL and BYE Message Handling
> > > # ----------------------------------
> > > route[4] {
> > >         if (client_nat_test("3")) {
> > >                 setflag(7);
> > >                 force_rport();
> > >                 fix_nated_contact();
> > >         };
> > >         end_media_session();
> > >         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();
> > >         };
> > > }
> > >
> > >
> > > y los mensajes de error son:
> > >
> > >  0(16987) set_mod_param_regex: parameter <nat_flag> not found in
> > > module <registrar>
> > >  0(16987) parse error (107,19-20): Can't set module parameter
> > >  0(16987) set_mod_param_regex: parameter <use_domain> not found in
> > > module <registrar>
> > >  0(16987) parse error (108,19-20): Can't set module parameter
> > >  0(16987) parse error (259,6-7): syntax error
> > >  0(16987) parse error (259,6-7): missing '(' or ')' ?
> > >  0(16987) parse error (259,6-7): bad command: missing ';'?
> > >  0(16987) parse error (259,7-8): bad command!)
> > >  0(16987) parse error (259,8-9): bad command!)
> > >  0(16987) parse error (259,10-11): bad command!)
> > >  0(16987) parse error (319,20-21): syntax error
> > >  0(16987) parse error (319,20-21): string or MYSELF expected
> > >  0(16987) parse error (319,20-21): bad command!)
> > >  0(16987) parse error (319,21-22): bad command!)
> > >  0(16987) parse error (319,25-26): bad command!)
> > >  0(16987) parse error (319,25-26): bad command!)
> > >  0(16987) parse error (319,26-27): bad command!)
> > >  0(16987) parse error (319,27-28): bad command!)
> > >  0(16987) parse error (319,28-29): bad command!)
> > >  0(16987) parse error (319,29-30): bad command!)
> > >  0(16987) parse error (319,30-31): bad command!)
> > >  0(16987) parse error (319,31-32): bad command!)
> > >  0(16987) parse error (319,32-33): bad command!)
> > >  0(16987) parse error (319,33-35): bad command!)
> > >  0(16987) parse error (319,36-37):
> > > ERROR: bad config file (23 errors)
> > >  0(16987) INFO:mi_fifo:mi_destroy:memory for the child's mi_fifo_pid
> > > was not allocated -> nothing to destroy
> > >
> > > ayuda por favor
> > >
> > > 2008/1/16, Iñaki Baz Castillo <ibc at aliax.net>:
> > > > El Miércoles, 16 de Enero de 2008, Ronmel Jiron escribió:
> > > > > Hola, soy nuenvo en Openser. he instalado OpenSER siguiendo los
> > pasos
> > > > > encontrados en la web. He modificado el archivo openser.cfg de
> > > > > diferentes maneras, lo hice con el generador de sipwise. De
> > ninguna
> > > > > manera me ha funcionado, o sea que cuando hago:
> > > > > # openser start
> > > > >
> > > > > El resultado es:
> > > > >
> > > > > INFO:mi_fifo:mi_destroy:memory for the child's mi_fifo_pid was not
> >
> > > > > allocated -> nothing to destroy.
> > > > >
> > > > > No se que esta pasando, ayuda por favor
> > > >
> > > > Es un "INFO", ni siquiera un "WARGING" y mucho menos un "ERROR".
> > Ignóralo.
> > > > ¿Está funcionando OpenSer?
> > > >
> > > > ~# pidof openser
> > > >
> > > > ~# nmap -sU 127.0.0.1 -p 5060
> > > >
> > > > --
> > > > Iñaki Baz Castillo
> > > >
> > > > _______________________________________________
> > > > Users-es mailing list
> > > > Users-es at lists.openser.org
> > > > http://lists.openser.org/cgi-bin/mailman/listinfo/users-es
> > > >
> > >
> > >
> >
> >
> >
> > _______________________________________________
> > Users-es mailing list
> > Users-es at lists.openser.org
> > http://lists.openser.org/cgi-bin/mailman/listinfo/users-es
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/sr-users-es/attachments/20080117/5d578aa2/attachment-0002.htm 


More information about the Users-es mailing list