[Serusers] Ser 0.94 Segfaults when using auth_db module

Jan Janak jan at iptel.org
Wed Oct 26 08:54:50 CEST 2005


Please remove fork=no from the configuration file. This is useful only
for debugging and should not be used normally. There is no guarantee
that all the modules will work in fork=no mode.

  Jan.

On 25-10-2005 16:05, Hilco de Lathouder wrote:
> 
>    I've compiled SER 0.94, including support for persistent auth (module
>    mysql). It seemed to work pretty well, but after a while i keep
>    getting segmentation faults when restarting ser. Only a complete
>    rebuild of the database with the ser_mysql script seems to fix things
>    for a while. I've inluded my ser.cfg and the output from 'ser -E
>    2>serlog' . The problem only seems to happen when i use the auth_db
>    module.
>    ++++++++++++++ SER Debug output below ++++++++++++++++++
>     0(4067) loading module /usr/local/lib/ser/modules/mysql.so
>     0(4067) loading module /usr/local/lib/ser/modules/sl.so
>     0(4067) loading module /usr/local/lib/ser/modules/tm.so
>     0(4067) loading module /usr/local/lib/ser/modules/rr.so
>     0(4067) loading module /usr/local/lib/ser/modules/maxfwd.so
>     0(4067) loading module /usr/local/lib/ser/modules/usrloc.so
>     0(4067) loading module /usr/local/lib/ser/modules/registrar.so
>     0(4067) loading module /usr/local/lib/ser/modules/exec.so
>     0(4067) loading module /usr/local/lib/ser/modules/uri.so
>     0(4067) loading module /usr/local/lib/ser/modules/acc.so
>     0(4067) loading module /usr/local/lib/ser/modules/textops.so
>     0(4067) loading module /usr/local/lib/ser/modules/auth.so
>     0(4067) loading module /usr/local/lib/ser/modules/auth_db.so
>     0(4067) set_mod_param_regex: usrloc matches module usrloc
>     0(4067) set_mod_param_regex: found <db_mode> in module usrloc
>    [/usr/local/lib/ser/modules/usrloc.so]
>     0(4067) set_mod_param_regex: auth_db matches module auth_db
>     0(4067) set_mod_param_regex: found <calculate_ha1> in module auth_db
>    [/usr/local/lib/ser/modules/auth_db.so]
>     0(4067) set_mod_param_regex: auth_db matches module auth_db
>     0(4067) set_mod_param_regex: found <password_column> in module
>    auth_db [/usr/local/lib/ser/modules/auth_db.so]
>     0(4067) set_mod_param_regex: rr matches module rr
>     0(4067) set_mod_param_regex: found <enable_full_lr> in module rr
>    [/usr/local/lib/ser/modules/rr.so]
>     0(4067) set_mod_param_regex: rr matches module rr
>     0(4067) set_mod_param_regex: found <enable_double_rr> in module rr
>    [/usr/local/lib/ser/modules/rr.so]
>     0(4067) set_mod_param_regex: rr matches module rr
>     0(4067) set_mod_param_regex: found <add_username> in module rr
>    [/usr/local/lib/ser/modules/rr.so]
>     0(4067) find_export: found <mf_process_maxfwd_header> in module
>    maxfwd [/usr/local/lib/ser/modules/maxfwd.so]
>     0(4067) find_export: found <sl_send_reply> in module sl_module
>    [/usr/local/lib/ser/modules/sl.so]
>     0(4067) find_export: found <sl_send_reply> in module sl_module
>    [/usr/local/lib/ser/modules/sl.so]
>     0(4067) find_export: found <record_route> in module rr
>    [/usr/local/lib/ser/modules/rr.so]
>     0(4067) find_export: found <loose_route> in module rr
>    [/usr/local/lib/ser/modules/rr.so]
>     0(4067) find_export: found <append_hf> in module textops
>    [/usr/local/lib/ser/modules/textops.so]
>     0(4067) find_export: found <append_hf> in module textops
>    [/usr/local/lib/ser/modules/textops.so]
>     0(4067) find_export: found <www_authorize> in module auth_db
>    [/usr/local/lib/ser/modules/auth_db.so]
>     0(4067) find_export: found <www_challenge> in module auth
>    [/usr/local/lib/ser/modules/auth.so]
>     0(4067) find_export: found <save> in module registrar
>    [/usr/local/lib/ser/modules/registrar.so]
>     0(4067) find_export: found <lookup> in module registrar
>    [/usr/local/lib/ser/modules/registrar.so]
>     0(4067) find_export: found <append_hf> in module textops
>    [/usr/local/lib/ser/modules/textops.so]
>     0(4067) find_export: found <lookup> in module registrar
>    [/usr/local/lib/ser/modules/registrar.so]
>     0(4067) find_export: found <sl_send_reply> in module sl_module
>    [/usr/local/lib/ser/modules/sl.so]
>     0(4067) find_export: found <append_hf> in module textops
>    [/usr/local/lib/ser/modules/textops.so]
>     0(4067) find_export: found <t_relay> in module tm
>    [/usr/local/lib/ser/modules/tm.so]
>     0(4067) find_export: found <sl_reply_error> in module sl_module
>    [/usr/local/lib/ser/modules/sl.so]
>     0(4067) routing table 0:
>     0(4067) if ( 0(4067) NOT(  0(4067)  external_module_call( 0(4067)
>    f_ptr<0xb7f32db0> 0(4067) , "10" 0(4067) );  0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7f32db0> 0(4067) , "10" 0(4067)
>    );  0(4067)  ) 0(4067) ) { 0(4067)  external_module_call( 0(4067)
>    f_ptr<0xb7de7790> 0(4067) , "483" 0(4067) , "Too Many Hops" 0(4067)
>    );  0(4067) drop( 0(4067) type<0> 0(4067) );  0(4067) } else { 0(4067)
>    };  0(4067) if ( 0(4067) UNKNOWN 0(4067) <UNKNOWN> 0(4067) 2048
>    0(4067) ) { 0(4067)  external_module_call( 0(4067) f_ptr<0xb7de7790>
>    0(4067) , "513" 0(4067) , "Message too big" 0(4067) );  0(4067) drop(
>    0(4067) type<0> 0(4067) );  0(4067) } else { 0(4067) };  0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7f384f0> 0(4067) );  0(4067) if
>    ( 0(4067)  external_module_call( 0(4067) f_ptr<0xb7f36c30> 0(4067) );
>    0(4067)  external_module_call( 0(4067) f_ptr<0xb7f36c30> 0(4067) );
>    0(4067) ) { 0(4067)  external_module_call( 0(4067) f_ptr<0xb7d75650>
>    0(4067) , "P-hint: rr-enforced
>    " 0(4067) );  0(4067) route( 0(4067) 1 0(4067) );  0(4067) drop(
>    0(4067) type<0> 0(4067) );  0(4067) } else { 0(4067) };  0(4067) if (
>    0(4067) NOT(  0(4067) uri 0(4067) == 0(4067) _myself_ 0(4067)  )
>    0(4067) ) { 0(4067)  external_module_call( 0(4067) f_ptr<0xb7d75650>
>    0(4067) , "P-hint: outbound
>    " 0(4067) );  0(4067) route( 0(4067) 1 0(4067) );  0(4067) drop(
>    0(4067) type<0> 0(4067) );  0(4067) } else { 0(4067) };  0(4067) if (
>    0(4067) uri 0(4067) == 0(4067) _myself_ 0(4067) ) { 0(4067) if (
>    0(4067) method 0(4067) == 0(4067) "REGISTER" 0(4067) ) { 0(4067) if (
>    0(4067) NOT(  0(4067)  external_module_call( 0(4067) f_ptr<0xb7d67d80>
>    0(4067) , "newbridges.nl" 0(4067) , "subscriber" 0(4067) );  0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d67d80> 0(4067) ,
>    "newbridges.nl" 0(4067) , "subscriber" 0(4067) );  0(4067)  ) 0(4067)
>    ) { 0(4067)  external_module_call( 0(4067) f_ptr<0xb7d6eb10> 0(4067) ,
>    "newbridges.nl" 0(4067) , "0" 0(4067) );  0(4067) drop( 0(4067)
>    type<0> 0(4067) );  0(4067) } else { 0(4067) };  0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d8a800> 0(4067) , "location"
>    0(4067) );  0(4067) drop( 0(4067) type<0> 0(4067) );  0(4067) } else {
>    0(4067) };  0(4067)  external_module_call( 0(4067) f_ptr<0xb7d87d60>
>    0(4067) , "aliases" 0(4067) );  0(4067) if ( 0(4067) NOT(  0(4067) uri
>    0(4067) == 0(4067) _myself_ 0(4067)  ) 0(4067) ) { 0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d75650> 0(4067) , "P-hint:
>    outbound alias
>    " 0(4067) );  0(4067) route( 0(4067) 1 0(4067) );  0(4067) drop(
>    0(4067) type<0> 0(4067) );  0(4067) } else { 0(4067) };  0(4067) if (
>    0(4067) uri 0(4067) =~ 0(4067) "^[1]si[2]"^sip:[5-7][0-9]{2,3}@.*"
>    0(4067) ) { 0(4067) log( 0(4067) 1 0(4067) , "LOG: PBX call,
>    contacting gateway...
>    " 0(4067) );  0(4067) route( 0(4067) 2 0(4067) );  0(4067) drop(
>    0(4067) type<0> 0(4067) );  0(4067) } else { 0(4067) };  0(4067) if (
>    0(4067) uri 0(4067) =~ 0(4067) [3]"sip:[0-9]{5,20}@.*" 0(4067) ) {
>    0(4067) if ( 0(4067) method 0(4067) == 0(4067) "INVITE" 0(4067) ) {
>    0(4067) log( 0(4067) 1 0(4067) , "LOG: PSTN call, contacting
>    gateway...
>    " 0(4067) );  0(4067) } else { 0(4067) };  0(4067) route( 0(4067) 3
>    0(4067) );  0(4067) drop( 0(4067) type<0> 0(4067) );  0(4067) } else {
>    0(4067) };  0(4067) if ( 0(4067) NOT(  0(4067)  external_module_call(
>    0(4067) f_ptr<0xb7d87d60> 0(4067) , "location" 0(4067) );  0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d87d60> 0(4067) , "location"
>    0(4067) );  0(4067)  ) 0(4067) ) { 0(4067)  external_module_call(
>    0(4067) f_ptr<0xb7de7790> 0(4067) , "404" 0(4067) , "User Not Found /
>    Offline" 0(4067) );  0(4067) drop( 0(4067) type<0> 0(4067) );  0(4067)
>    } else { 0(4067) };  0(4067) } else { 0(4067) };  0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d75650> 0(4067) , "P-hint:
>    usrloc applied
>    " 0(4067) );  0(4067) route( 0(4067) 1 0(4067) );  0(4067) if (
>    0(4067) UNKNOWN 0(4067) <UNKNOWN> 0(4067) 2048 0(4067) ) { 0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7de7790> 0(4067) , "513"
>    0(4067) , "Message too big" 0(4067) );  0(4067) drop( 0(4067) type<0>
>    0(4067) );  0(4067) } else { 0(4067) };  0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7f384f0> 0(4067) );  0(4067) if
>    ( 0(4067)  external_module_call( 0(4067) f_ptr<0xb7f36c30> 0(4067) );
>    0(4067)  external_module_call( 0(4067) f_ptr<0xb7f36c30> 0(4067) );
>    0(4067) ) { 0(4067)  external_module_call( 0(4067) f_ptr<0xb7d75650>
>    0(4067) , "P-hint: rr-enforced
>    " 0(4067) );  0(4067) route( 0(4067) 1 0(4067) );  0(4067) drop(
>    0(4067) type<0> 0(4067) );  0(4067) } else { 0(4067) };  0(4067) if (
>    0(4067) NOT(  0(4067) uri 0(4067) == 0(4067) _myself_ 0(4067)  )
>    0(4067) ) { 0(4067)  external_module_call( 0(4067) f_ptr<0xb7d75650>
>    0(4067) , "P-hint: outbound
>    " 0(4067) );  0(4067) route( 0(4067) 1 0(4067) );  0(4067) drop(
>    0(4067) type<0> 0(4067) );  0(4067) } else { 0(4067) };  0(4067) if (
>    0(4067) uri 0(4067) == 0(4067) _myself_ 0(4067) ) { 0(4067) if (
>    0(4067) method 0(4067) == 0(4067) "REGISTER" 0(4067) ) { 0(4067) if (
>    0(4067) NOT(  0(4067)  external_module_call( 0(4067) f_ptr<0xb7d67d80>
>    0(4067) , "newbridges.nl" 0(4067) , "subscriber" 0(4067) );  0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d67d80> 0(4067) ,
>    "newbridges.nl" 0(4067) , "subscriber" 0(4067) );  0(4067)  ) 0(4067)
>    ) { 0(4067)  external_module_call( 0(4067) f_ptr<0xb7d6eb10> 0(4067) ,
>    "newbridges.nl" 0(4067) , "0" 0(4067) );  0(4067) drop( 0(4067)
>    type<0> 0(4067) );  0(4067) } else { 0(4067) };  0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d8a800> 0(4067) , "location"
>    0(4067) );  0(4067) drop( 0(4067) type<0> 0(4067) );  0(4067) } else {
>    0(4067) };  0(4067)  external_module_call( 0(4067) f_ptr<0xb7d87d60>
>    0(4067) , "aliases" 0(4067) );  0(4067) if ( 0(4067) NOT(  0(4067) uri
>    0(4067) == 0(4067) _myself_ 0(4067)  ) 0(4067) ) { 0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d75650> 0(4067) , "P-hint:
>    outbound alias
>    " 0(4067) );  0(4067) route( 0(4067) 1 0(4067) );  0(4067) drop(
>    0(4067) type<0> 0(4067) );  0(4067) } else { 0(4067) };  0(4067) if (
>    0(4067) uri 0(4067) =~ 0(4067) "^[4]si[5]"^sip:[5-7][0-9]{2,3}@.*"
>    0(4067) ) { 0(4067) log( 0(4067) 1 0(4067) , "LOG: PBX call,
>    contacting gateway...
>    " 0(4067) );  0(4067) route( 0(4067) 2 0(4067) );  0(4067) drop(
>    0(4067) type<0> 0(4067) );  0(4067) } else { 0(4067) };  0(4067) if (
>    0(4067) uri 0(4067) =~ 0(4067) [6]"sip:[0-9]{5,20}@.*" 0(4067) ) {
>    0(4067) if ( 0(4067) method 0(4067) == 0(4067) "INVITE" 0(4067) ) {
>    0(4067) log( 0(4067) 1 0(4067) , "LOG: PSTN call, contacting
>    gateway...
>    " 0(4067) );  0(4067) } else { 0(4067) };  0(4067) route( 0(4067) 3
>    0(4067) );  0(4067) drop( 0(4067) type<0> 0(4067) );  0(4067) } else {
>    0(4067) };  0(4067) if ( 0(4067) NOT(  0(4067)  external_module_call(
>    0(4067) f_ptr<0xb7d87d60> 0(4067) , "location" 0(4067) );  0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d87d60> 0(4067) , "location"
>    0(4067) );  0(4067)  ) 0(4067) ) { 0(4067)  external_module_call(
>    0(4067) f_ptr<0xb7de7790> 0(4067) , "404" 0(4067) , "User Not Found /
>    Offline" 0(4067) );  0(4067) drop( 0(4067) type<0> 0(4067) );  0(4067)
>    } else { 0(4067) };  0(4067) } else { 0(4067) };  0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d75650> 0(4067) , "P-hint:
>    usrloc applied
>    " 0(4067) );  0(4067) route( 0(4067) 1 0(4067) );  0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7f384f0> 0(4067) );  0(4067) if
>    ( 0(4067)  external_module_call( 0(4067) f_ptr<0xb7f36c30> 0(4067) );
>    0(4067)  external_module_call( 0(4067) f_ptr<0xb7f36c30> 0(4067) );
>    0(4067) ) { 0(4067)  external_module_call( 0(4067) f_ptr<0xb7d75650>
>    0(4067) , "P-hint: rr-enforced
>    " 0(4067) );  0(4067) route( 0(4067) 1 0(4067) );  0(4067) drop(
>    0(4067) type<0> 0(4067) );  0(4067) } else { 0(4067) };  0(4067) if (
>    0(4067) NOT(  0(4067) uri 0(4067) == 0(4067) _myself_ 0(4067)  )
>    0(4067) ) { 0(4067)  external_module_call( 0(4067) f_ptr<0xb7d75650>
>    0(4067) , "P-hint: outbound
>    " 0(4067) );  0(4067) route( 0(4067) 1 0(4067) );  0(4067) drop(
>    0(4067) type<0> 0(4067) );  0(4067) } else { 0(4067) };  0(4067) if (
>    0(4067) uri 0(4067) == 0(4067) _myself_ 0(4067) ) { 0(4067) if (
>    0(4067) method 0(4067) == 0(4067) "REGISTER" 0(4067) ) { 0(4067) if (
>    0(4067) NOT(  0(4067)  external_module_call( 0(4067) f_ptr<0xb7d67d80>
>    0(4067) , "newbridges.nl" 0(4067) , "subscriber" 0(4067) );  0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d67d80> 0(4067) ,
>    "newbridges.nl" 0(4067) , "subscriber" 0(4067) );  0(4067)  ) 0(4067)
>    ) { 0(4067)  external_module_call( 0(4067) f_ptr<0xb7d6eb10> 0(4067) ,
>    "newbridges.nl" 0(4067) , "0" 0(4067) );  0(4067) drop( 0(4067)
>    type<0> 0(4067) );  0(4067) } else { 0(4067) };  0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d8a800> 0(4067) , "location"
>    0(4067) );  0(4067) drop( 0(4067) type<0> 0(4067) );  0(4067) } else {
>    0(4067) };  0(4067)  external_module_call( 0(4067) f_ptr<0xb7d87d60>
>    0(4067) , "aliases" 0(4067) );  0(4067) if ( 0(4067) NOT(  0(4067) uri
>    0(4067) == 0(4067) _myself_ 0(4067)  ) 0(4067) ) { 0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d75650> 0(4067) , "P-hint:
>    outbound alias
>    " 0(4067) );  0(4067) route( 0(4067) 1 0(4067) );  0(4067) drop(
>    0(4067) type<0> 0(4067) );  0(4067) } else { 0(4067) };  0(4067) if (
>    0(4067) uri 0(4067) =~ 0(4067) "^[7]si[8]"^sip:[5-7][0-9]{2,3}@.*"
>    0(4067) ) { 0(4067) log( 0(4067) 1 0(4067) , "LOG: PBX call,
>    contacting gateway...
>    " 0(4067) );  0(4067) route( 0(4067) 2 0(4067) );  0(4067) drop(
>    0(4067) type<0> 0(4067) );  0(4067) } else { 0(4067) };  0(4067) if (
>    0(4067) uri 0(4067) =~ 0(4067) [9]"sip:[0-9]{5,20}@.*" 0(4067) ) {
>    0(4067) if ( 0(4067) method 0(4067) == 0(4067) "INVITE" 0(4067) ) {
>    0(4067) log( 0(4067) 1 0(4067) , "LOG: PSTN call, contacting
>    gateway...
>    " 0(4067) );  0(4067) } else { 0(4067) };  0(4067) route( 0(4067) 3
>    0(4067) );  0(4067) drop( 0(4067) type<0> 0(4067) );  0(4067) } else {
>    0(4067) };  0(4067) if ( 0(4067) NOT(  0(4067)  external_module_call(
>    0(4067) f_ptr<0xb7d87d60> 0(4067) , "location" 0(4067) );  0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d87d60> 0(4067) , "location"
>    0(4067) );  0(4067)  ) 0(4067) ) { 0(4067)  external_module_call(
>    0(4067) f_ptr<0xb7de7790> 0(4067) , "404" 0(4067) , "User Not Found /
>    Offline" 0(4067) );  0(4067) drop( 0(4067) type<0> 0(4067) );  0(4067)
>    } else { 0(4067) };  0(4067) } else { 0(4067) };  0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d75650> 0(4067) , "P-hint:
>    usrloc applied
>    " 0(4067) );  0(4067) route( 0(4067) 1 0(4067) );  0(4067) if (
>    0(4067)  external_module_call( 0(4067) f_ptr<0xb7f36c30> 0(4067) );
>    0(4067)  external_module_call( 0(4067) f_ptr<0xb7f36c30> 0(4067) );
>    0(4067) ) { 0(4067)  external_module_call( 0(4067) f_ptr<0xb7d75650>
>    0(4067) , "P-hint: rr-enforced
>    " 0(4067) );  0(4067) route( 0(4067) 1 0(4067) );  0(4067) drop(
>    0(4067) type<0> 0(4067) );  0(4067) } else { 0(4067) };  0(4067) if (
>    0(4067) NOT(  0(4067) uri 0(4067) == 0(4067) _myself_ 0(4067)  )
>    0(4067) ) { 0(4067)  external_module_call( 0(4067) f_ptr<0xb7d75650>
>    0(4067) , "P-hint: outbound
>    " 0(4067) );  0(4067) route( 0(4067) 1 0(4067) );  0(4067) drop(
>    0(4067) type<0> 0(4067) );  0(4067) } else { 0(4067) };  0(4067) if (
>    0(4067) uri 0(4067) == 0(4067) _myself_ 0(4067) ) { 0(4067) if (
>    0(4067) method 0(4067) == 0(4067) "REGISTER" 0(4067) ) { 0(4067) if (
>    0(4067) NOT(  0(4067)  external_module_call( 0(4067) f_ptr<0xb7d67d80>
>    0(4067) , "newbridges.nl" 0(4067) , "subscriber" 0(4067) );  0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d67d80> 0(4067) ,
>    "newbridges.nl" 0(4067) , "subscriber" 0(4067) );  0(4067)  ) 0(4067)
>    ) { 0(4067)  external_module_call( 0(4067) f_ptr<0xb7d6eb10> 0(4067) ,
>    "newbridges.nl" 0(4067) , "0" 0(4067) );  0(4067) drop( 0(4067)
>    type<0> 0(4067) );  0(4067) } else { 0(4067) };  0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d8a800> 0(4067) , "location"
>    0(4067) );  0(4067) drop( 0(4067) type<0> 0(4067) );  0(4067) } else {
>    0(4067) };  0(4067)  external_module_call( 0(4067) f_ptr<0xb7d87d60>
>    0(4067) , "aliases" 0(4067) );  0(4067) if ( 0(4067) NOT(  0(4067) uri
>    0(4067) == 0(4067) _myself_ 0(4067)  ) 0(4067) ) { 0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d75650> 0(4067) , "P-hint:
>    outbound alias
>    " 0(4067) );  0(4067) route( 0(4067) 1 0(4067) );  0(4067) drop(
>    0(4067) type<0> 0(4067) );  0(4067) } else { 0(4067) };  0(4067) if (
>    0(4067) uri 0(4067) =~ 0(4067) "^[10]si[11]"^sip:[5-7][0-9]{2,3}@.*"
>    0(4067) ) { 0(4067) log( 0(4067) 1 0(4067) , "LOG: PBX call,
>    contacting gateway...
>    " 0(4067) );  0(4067) route( 0(4067) 2 0(4067) );  0(4067) drop(
>    0(4067) type<0> 0(4067) );  0(4067) } else { 0(4067) };  0(4067) if (
>    0(4067) uri 0(4067) =~ 0(4067) [12]"sip:[0-9]{5,20}@.*" 0(4067) ) {
>    0(4067) if ( 0(4067) method 0(4067) == 0(4067) "INVITE" 0(4067) ) {
>    0(4067) log( 0(4067) 1 0(4067) , "LOG: PSTN call, contacting
>    gateway...
>    " 0(4067) );  0(4067) } else { 0(4067) };  0(4067) route( 0(4067) 3
>    0(4067) );  0(4067) drop( 0(4067) type<0> 0(4067) );  0(4067) } else {
>    0(4067) };  0(4067) if ( 0(4067) NOT(  0(4067)  external_module_call(
>    0(4067) f_ptr<0xb7d87d60> 0(4067) , "location" 0(4067) );  0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d87d60> 0(4067) , "location"
>    0(4067) );  0(4067)  ) 0(4067) ) { 0(4067)  external_module_call(
>    0(4067) f_ptr<0xb7de7790> 0(4067) , "404" 0(4067) , "User Not Found /
>    Offline" 0(4067) );  0(4067) drop( 0(4067) type<0> 0(4067) );  0(4067)
>    } else { 0(4067) };  0(4067) } else { 0(4067) };  0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d75650> 0(4067) , "P-hint:
>    usrloc applied
>    " 0(4067) );  0(4067) route( 0(4067) 1 0(4067) );  0(4067) if (
>    0(4067) NOT(  0(4067) uri 0(4067) == 0(4067) _myself_ 0(4067)  )
>    0(4067) ) { 0(4067)  external_module_call( 0(4067) f_ptr<0xb7d75650>
>    0(4067) , "P-hint: outbound
>    " 0(4067) );  0(4067) route( 0(4067) 1 0(4067) );  0(4067) drop(
>    0(4067) type<0> 0(4067) );  0(4067) } else { 0(4067) };  0(4067) if (
>    0(4067) uri 0(4067) == 0(4067) _myself_ 0(4067) ) { 0(4067) if (
>    0(4067) method 0(4067) == 0(4067) "REGISTER" 0(4067) ) { 0(4067) if (
>    0(4067) NOT(  0(4067)  external_module_call( 0(4067) f_ptr<0xb7d67d80>
>    0(4067) , "newbridges.nl" 0(4067) , "subscriber" 0(4067) );  0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d67d80> 0(4067) ,
>    "newbridges.nl" 0(4067) , "subscriber" 0(4067) );  0(4067)  ) 0(4067)
>    ) { 0(4067)  external_module_call( 0(4067) f_ptr<0xb7d6eb10> 0(4067) ,
>    "newbridges.nl" 0(4067) , "0" 0(4067) );  0(4067) drop( 0(4067)
>    type<0> 0(4067) );  0(4067) } else { 0(4067) };  0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d8a800> 0(4067) , "location"
>    0(4067) );  0(4067) drop( 0(4067) type<0> 0(4067) );  0(4067) } else {
>    0(4067) };  0(4067)  external_module_call( 0(4067) f_ptr<0xb7d87d60>
>    0(4067) , "aliases" 0(4067) );  0(4067) if ( 0(4067) NOT(  0(4067) uri
>    0(4067) == 0(4067) _myself_ 0(4067)  ) 0(4067) ) { 0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d75650> 0(4067) , "P-hint:
>    outbound alias
>    " 0(4067) );  0(4067) route( 0(4067) 1 0(4067) );  0(4067) drop(
>    0(4067) type<0> 0(4067) );  0(4067) } else { 0(4067) };  0(4067) if (
>    0(4067) uri 0(4067) =~ 0(4067) "^[13]si[14]"^sip:[5-7][0-9]{2,3}@.*"
>    0(4067) ) { 0(4067) log( 0(4067) 1 0(4067) , "LOG: PBX call,
>    contacting gateway...
>    " 0(4067) );  0(4067) route( 0(4067) 2 0(4067) );  0(4067) drop(
>    0(4067) type<0> 0(4067) );  0(4067) } else { 0(4067) };  0(4067) if (
>    0(4067) uri 0(4067) =~ 0(4067) [15]"sip:[0-9]{5,20}@.*" 0(4067) ) {
>    0(4067) if ( 0(4067) method 0(4067) == 0(4067) "INVITE" 0(4067) ) {
>    0(4067) log( 0(4067) 1 0(4067) , "LOG: PSTN call, contacting
>    gateway...
>    " 0(4067) );  0(4067) } else { 0(4067) };  0(4067) route( 0(4067) 3
>    0(4067) );  0(4067) drop( 0(4067) type<0> 0(4067) );  0(4067) } else {
>    0(4067) };  0(4067) if ( 0(4067) NOT(  0(4067)  external_module_call(
>    0(4067) f_ptr<0xb7d87d60> 0(4067) , "location" 0(4067) );  0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d87d60> 0(4067) , "location"
>    0(4067) );  0(4067)  ) 0(4067) ) { 0(4067)  external_module_call(
>    0(4067) f_ptr<0xb7de7790> 0(4067) , "404" 0(4067) , "User Not Found /
>    Offline" 0(4067) );  0(4067) drop( 0(4067) type<0> 0(4067) );  0(4067)
>    } else { 0(4067) };  0(4067) } else { 0(4067) };  0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d75650> 0(4067) , "P-hint:
>    usrloc applied
>    " 0(4067) );  0(4067) route( 0(4067) 1 0(4067) );  0(4067) if (
>    0(4067) uri 0(4067) == 0(4067) _myself_ 0(4067) ) { 0(4067) if (
>    0(4067) method 0(4067) == 0(4067) "REGISTER" 0(4067) ) { 0(4067) if (
>    0(4067) NOT(  0(4067)  external_module_call( 0(4067) f_ptr<0xb7d67d80>
>    0(4067) , "newbridges.nl" 0(4067) , "subscriber" 0(4067) );  0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d67d80> 0(4067) ,
>    "newbridges.nl" 0(4067) , "subscriber" 0(4067) );  0(4067)  ) 0(4067)
>    ) { 0(4067)  external_module_call( 0(4067) f_ptr<0xb7d6eb10> 0(4067) ,
>    "newbridges.nl" 0(4067) , "0" 0(4067) );  0(4067) drop( 0(4067)
>    type<0> 0(4067) );  0(4067) } else { 0(4067) };  0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d8a800> 0(4067) , "location"
>    0(4067) );  0(4067) drop( 0(4067) type<0> 0(4067) );  0(4067) } else {
>    0(4067) };  0(4067)  external_module_call( 0(4067) f_ptr<0xb7d87d60>
>    0(4067) , "aliases" 0(4067) );  0(4067) if ( 0(4067) NOT(  0(4067) uri
>    0(4067) == 0(4067) _myself_ 0(4067)  ) 0(4067) ) { 0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d75650> 0(4067) , "P-hint:
>    outbound alias
>    " 0(4067) );  0(4067) route( 0(4067) 1 0(4067) );  0(4067) drop(
>    0(4067) type<0> 0(4067) );  0(4067) } else { 0(4067) };  0(4067) if (
>    0(4067) uri 0(4067) =~ 0(4067) "^[16]si[17]"^sip:[5-7][0-9]{2,3}@.*"
>    0(4067) ) { 0(4067) log( 0(4067) 1 0(4067) , "LOG: PBX call,
>    contacting gateway...
>    " 0(4067) );  0(4067) route( 0(4067) 2 0(4067) );  0(4067) drop(
>    0(4067) type<0> 0(4067) );  0(4067) } else { 0(4067) };  0(4067) if (
>    0(4067) uri 0(4067) =~ 0(4067) [18]"sip:[0-9]{5,20}@.*" 0(4067) ) {
>    0(4067) if ( 0(4067) method 0(4067) == 0(4067) "INVITE" 0(4067) ) {
>    0(4067) log( 0(4067) 1 0(4067) , "LOG: PSTN call, contacting
>    gateway...
>    " 0(4067) );  0(4067) } else { 0(4067) };  0(4067) route( 0(4067) 3
>    0(4067) );  0(4067) drop( 0(4067) type<0> 0(4067) );  0(4067) } else {
>    0(4067) };  0(4067) if ( 0(4067) NOT(  0(4067)  external_module_call(
>    0(4067) f_ptr<0xb7d87d60> 0(4067) , "location" 0(4067) );  0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d87d60> 0(4067) , "location"
>    0(4067) );  0(4067)  ) 0(4067) ) { 0(4067)  external_module_call(
>    0(4067) f_ptr<0xb7de7790> 0(4067) , "404" 0(4067) , "User Not Found /
>    Offline" 0(4067) );  0(4067) drop( 0(4067) type<0> 0(4067) );  0(4067)
>    } else { 0(4067) };  0(4067) } else { 0(4067) };  0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d75650> 0(4067) , "P-hint:
>    usrloc applied
>    " 0(4067) );  0(4067) route( 0(4067) 1 0(4067) );  0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7d75650> 0(4067) , "P-hint:
>    usrloc applied
>    " 0(4067) );  0(4067) route( 0(4067) 1 0(4067) );  0(4067) route(
>    0(4067) 1 0(4067) );  0(4067)
>     0(4067) routing table 1:
>     0(4067) if ( 0(4067) NOT(  0(4067)  external_module_call( 0(4067)
>    f_ptr<0xb7dbc1e0> 0(4067) );  0(4067)  external_module_call( 0(4067)
>    f_ptr<0xb7dbc1e0> 0(4067) );  0(4067)  ) 0(4067) ) { 0(4067)
>    external_module_call( 0(4067) f_ptr<0xb7de77d0> 0(4067) );  0(4067) }
>    else { 0(4067) };  0(4067)
>     0(4067) routing table 2:
>     0(4067) sethostport( 0(4067) "192.168.1.244:5060" 0(4067) );  0(4067)
>    forward( 0(4067) type<11> 0(4067) , type<12> 0(4067) );  0(4067) drop(
>    0(4067) type<0> 0(4067) );  0(4067) forward( 0(4067) type<11> 0(4067)
>    , type<12> 0(4067) );  0(4067) drop( 0(4067) type<0> 0(4067) );
>    0(4067) drop( 0(4067) type<0> 0(4067) );  0(4067)
>     0(4067) routing table 3:
>     0(4067) sethostport( 0(4067) "192.168.1.244:5060" 0(4067) );  0(4067)
>    forward( 0(4067) type<11> 0(4067) , type<12> 0(4067) );  0(4067) drop(
>    0(4067) type<0> 0(4067) );  0(4067) forward( 0(4067) type<11> 0(4067)
>    , type<12> 0(4067) );  0(4067) drop( 0(4067) type<0> 0(4067) );
>    0(4067) drop( 0(4067) type<0> 0(4067) );  0(4067)
>    WARNING: no fork mode  and more than one listen address found(will use
>    only the the first one)
>     0(4067) shm_mem_init: success
>     0(0) core dump limits set to 4294967295
>     0(0) DEBUG: init_mod: sl_module
>    stateless - initializing
>     0(0) DEBUG: register_fifo_cmd: new command (sl_stats) registered
>     0(0) unixsock_register_cmd: New command (sl_stats) registered
>     0(0) DEBUG: MD5 calculated: b27e1a1d33761e85846fc98f5f3a7e58
>     0(0) DEBUG: init_mod: tm
>     0(0) TM - (size of cell=2776, sip_msg=760) initializing...
>     0(0) Call-ID initialization: '7bee7c3b'
>     0(0) DEBUG: register_fifo_cmd: new command (t_uac_dlg) registered
>     0(0) DEBUG: register_fifo_cmd: new command (t_uac_cancel) registered
>     0(0) DEBUG: register_fifo_cmd: new command (t_hash) registered
>     0(0) DEBUG: register_fifo_cmd: new command (t_reply) registered
>     0(0) unixsock_register_cmd: New command (t_uac_dlg) registered
>     0(0) unixsock_register_cmd: New command (t_uac_cancel) registered
>     0(0) unixsock_register_cmd: New command (t_hash) registered
>     0(0) unixsock_register_cmd: New command (t_reply) registered
>     0(0) DEBUG: lock_initialize: lock initialization started
>     0(0) DEBUG: register_fifo_cmd: new command (t_stats) registered
>     0(0) unixsock_register_cmd: New command (t_stats) registered
>     0(0) DEBUG: MD5 calculated: 533cb9e91f4b999cf76861cbb9ed54ed
>     0(0) DEBUG: MD5 calculated: a6a1c5f60faecf035a1ae5b6e96e979a
>     0(0) DEBUG: init_mod: rr
>     0(0) rr - initializing
>     0(0) DEBUG: init_mod: maxfwd
>     0(0) Maxfwd module- initializing
>     0(0) DEBUG: init_mod: usrloc
>     0(0) usrloc - initializing
>     0(0) DEBUG: register_fifo_cmd: new command (ul_stats) registered
>     0(0) DEBUG: register_fifo_cmd: new command (ul_rm) registered
>     0(0) DEBUG: register_fifo_cmd: new command (ul_rm_contact) registered
>     0(0) DEBUG: register_fifo_cmd: new command (ul_dump) registered
>     0(0) DEBUG: register_fifo_cmd: new command (ul_flush) registered
>     0(0) DEBUG: register_fifo_cmd: new command (ul_add) registered
>     0(0) DEBUG: register_fifo_cmd: new command (ul_show_contact)
>    registered
>     0(0) unixsock_register_cmd: New command (ul_stats) registered
>     0(0) unixsock_register_cmd: New command (ul_rm) registered
>     0(0) unixsock_register_cmd: New command (ul_rm_contact) registered
>     0(0) unixsock_register_cmd: New command (ul_dump) registered
>     0(0) unixsock_register_cmd: New command (ul_flush) registered
>     0(0) unixsock_register_cmd: New command (ul_add) registered
>     0(0) unixsock_register_cmd: New command (ul_show_contact) registered
>     0(0) find_mod_export: found <db_use_table> in module mysql
>    [/usr/local/lib/ser/modules/mysql.so]
>     0(0) find_mod_export: found <db_init> in module mysql
>    [/usr/local/lib/ser/modules/mysql.so]
>     0(0) find_mod_export: found <db_close> in module mysql
>    [/usr/local/lib/ser/modules/mysql.so]
>     0(0) find_mod_export: found <db_query> in module mysql
>    [/usr/local/lib/ser/modules/mysql.so]
>     0(0) find_mod_export: found <db_raw_query> in module mysql
>    [/usr/local/lib/ser/modules/mysql.so]
>     0(0) find_mod_export: found <db_free_result> in module mysql
>    [/usr/local/lib/ser/modules/mysql.so]
>     0(0) find_mod_export: found <db_insert> in module mysql
>    [/usr/local/lib/ser/modules/mysql.so]
>     0(0) find_mod_export: found <db_delete> in module mysql
>    [/usr/local/lib/ser/modules/mysql.so]
>     0(0) find_mod_export: found <db_update> in module mysql
>    [/usr/local/lib/ser/modules/mysql.so]
>     0(0) DEBUG: init_mod: registrar
>     0(0) registrar - initializing
>     0(0) find_export: found <sl_send_reply> in module sl_module
>    [/usr/local/lib/ser/modules/sl.so]
>     0(0) find_export: found <ul_bind_usrloc> in module usrloc
>    [/usr/local/lib/ser/modules/usrloc.so]
>     0(0) find_export: found <ul_register_udomain> in module usrloc
>    [/usr/local/lib/ser/modules/usrloc.so]
>     0(0) find_export: found <ul_get_all_ucontacts> in module usrloc
>    [/usr/local/lib/ser/modules/usrloc.so]
>     0(0) find_export: found <ul_insert_urecord> in module usrloc
>    [/usr/local/lib/ser/modules/usrloc.so]
>     0(0) find_export: found <ul_delete_urecord> in module usrloc
>    [/usr/local/lib/ser/modules/usrloc.so]
>     0(0) find_export: found <ul_get_urecord> in module usrloc
>    [/usr/local/lib/ser/modules/usrloc.so]
>     0(0) find_export: found <ul_lock_udomain> in module usrloc
>    [/usr/local/lib/ser/modules/usrloc.so]
>     0(0) find_export: found <ul_unlock_udomain> in module usrloc
>    [/usr/local/lib/ser/modules/usrloc.so]
>     0(0) find_export: found <ul_release_urecord> in module usrloc
>    [/usr/local/lib/ser/modules/usrloc.so]
>     0(0) find_export: found <ul_insert_ucontact> in module usrloc
>    [/usr/local/lib/ser/modules/usrloc.so]
>     0(0) find_export: found <ul_delete_ucontact> in module usrloc
>    [/usr/local/lib/ser/modules/usrloc.so]
>     0(0) find_export: found <ul_get_ucontact> in module usrloc
>    [/usr/local/lib/ser/modules/usrloc.so]
>     0(0) find_export: found <ul_update_ucontact> in module usrloc
>    [/usr/local/lib/ser/modules/usrloc.so]
>     0(0) find_export: found <ul_register_watcher> in module usrloc
>    [/usr/local/lib/ser/modules/usrloc.so]
>     0(0) find_export: found <ul_unregister_watcher> in module usrloc
>    [/usr/local/lib/ser/modules/usrloc.so]
>     0(0) find_export: found <ul_register_ulcb> in module usrloc
>    [/usr/local/lib/ser/modules/usrloc.so]
>     0(0) DEBUG: init_mod: exec
>    exec - initializing
>     0(0) DEBUG: init_mod: acc
>    acc - initializing
>     0(0) find_export: found <load_tm> in module tm
>    [/usr/local/lib/ser/modules/tm.so]
>     0(0) find_export: found <register_tmcb> in module tm
>    [/usr/local/lib/ser/modules/tm.so]
>     0(0) find_export: found <t_newtran> in module tm
>    [/usr/local/lib/ser/modules/tm.so]
>     0(0) find_export: found <t_relay_to_tcp> in module tm
>    [/usr/local/lib/ser/modules/tm.so]
>     0(0) find_export: found <t_relay_to_udp> in module tm
>    [/usr/local/lib/ser/modules/tm.so]
>     0(0) find_export: found <t_relay> in module tm
>    [/usr/local/lib/ser/modules/tm.so]
>     0(0) find_export: found <t_reply> in module tm
>    [/usr/local/lib/ser/modules/tm.so]
>     0(0) find_export: found <t_reply_with_body> in module tm
>    [/usr/local/lib/ser/modules/tm.so]
>     0(0) find_export: found <t_is_local> in module tm
>    [/usr/local/lib/ser/modules/tm.so]
>     0(0) find_export: found <t_get_trans_ident> in module tm
>    [/usr/local/lib/ser/modules/tm.so]
>     0(0) find_export: found <t_lookup_ident> in module tm
>    [/usr/local/lib/ser/modules/tm.so]
>     0(0) find_export: found <t_add_blind> in module tm
>    [/usr/local/lib/ser/modules/tm.so]
>     0(0) find_export: found <t_forward_nonack> in module tm
>    [/usr/local/lib/ser/modules/tm.so]
>     0(0) find_export: found <t_request_within> in module tm
>    [/usr/local/lib/ser/modules/tm.so]
>     0(0) find_export: found <t_request_outside> in module tm
>    [/usr/local/lib/ser/modules/tm.so]
>     0(0) find_export: found <t_request> in module tm
>    [/usr/local/lib/ser/modules/tm.so]
>     0(0) find_export: found <new_dlg_uac> in module tm
>    [/usr/local/lib/ser/modules/tm.so]
>     0(0) find_export: found <dlg_response_uac> in module tm
>    [/usr/local/lib/ser/modules/tm.so]
>     0(0) find_export: found <new_dlg_uas> in module tm
>    [/usr/local/lib/ser/modules/tm.so]
>     0(0) find_export: found <dlg_request_uas> in module tm
>    [/usr/local/lib/ser/modules/tm.so]
>     0(0) find_export: found <free_dlg> in module tm
>    [/usr/local/lib/ser/modules/tm.so]
>     0(0) find_export: found <print_dlg> in module tm
>    [/usr/local/lib/ser/modules/tm.so]
>     0(0) find_export: found <t_gett> in module tm
>    [/usr/local/lib/ser/modules/tm.so]
>     0(0) DEBUG: init_mod: textops
>    textops - initializing
>     0(0) DEBUG: init_mod: auth
>     0(0) auth module - initializing
>     0(0) find_export: found <sl_send_reply> in module sl_module
>    [/usr/local/lib/ser/modules/sl.so]
>     0(0) DEBUG: init_mod: auth_db
>     0(0) auth_db module - initializing
>     0(0) find_mod_export: found <db_use_table> in module mysql
>    [/usr/local/lib/ser/modules/mysql.so]
>     0(0) find_mod_export: found <db_init> in module mysql
>    [/usr/local/lib/ser/modules/mysql.so]
>     0(0) find_mod_export: found <db_close> in module mysql
>    [/usr/local/lib/ser/modules/mysql.so]
>     0(0) find_mod_export: found <db_query> in module mysql
>    [/usr/local/lib/ser/modules/mysql.so]
>     0(0) find_mod_export: found <db_raw_query> in module mysql
>    [/usr/local/lib/ser/modules/mysql.so]
>     0(0) find_mod_export: found <db_free_result> in module mysql
>    [/usr/local/lib/ser/modules/mysql.so]
>     0(0) find_mod_export: found <db_insert> in module mysql
>    [/usr/local/lib/ser/modules/mysql.so]
>     0(0) find_mod_export: found <db_delete> in module mysql
>    [/usr/local/lib/ser/modules/mysql.so]
>     0(0) find_mod_export: found <db_update> in module mysql
>    [/usr/local/lib/ser/modules/mysql.so]
>     0(0) find_export: found <pre_auth> in module auth
>    [/usr/local/lib/ser/modules/auth.so]
>     0(0) find_export: found <post_auth> in module auth
>    [/usr/local/lib/ser/modules/auth.so]
>     0(0) find_export: found <sl_send_reply> in module sl_module
>    [/usr/local/lib/ser/modules/sl.so]
>     0(0) fixing /usr/local/lib/ser/modules/maxfwd.so
>    mf_process_maxfwd_header
>     0(0) fixing /usr/local/lib/ser/modules/sl.so sl_send_reply
>     0(0) fixing /usr/local/lib/ser/modules/sl.so sl_send_reply
>     0(0) fixing /usr/local/lib/ser/modules/rr.so record_route
>     0(0) fixing /usr/local/lib/ser/modules/rr.so loose_route
>     0(0) fixing /usr/local/lib/ser/modules/textops.so append_hf
>     0(0) fixing /usr/local/lib/ser/modules/textops.so append_hf
>     0(0) fixing /usr/local/lib/ser/modules/auth_db.so www_authorize
>     0(0) get_connection(): Connection not found in the pool
>     0(0) release_connection(): Removing connection from the pool
>     0(0) fixing /usr/local/lib/ser/modules/auth.so www_challenge
>     0(0) fixing /usr/local/lib/ser/modules/registrar.so save
>     0(0) get_connection(): Connection not found in the pool
> 
>    ++++++++++ Config file below +++++++++++++++++++
>    # ----------- global configuration parameters ------
>    # Debugging
>    #
>    # Max level = 9, or ser -ddddddddd
>    # Don't use forking while debugging
>    debug=9
>    fork=no
>    log_stderror=yes    # (cmd line: -E)
>    # -- Debug mode --
>    /*
>    fork=no
>    debug=6
>    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"
>    alias=newbridges.nl
>    alias=192.168.1.247
>    # ------------------ 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"
>    # added 30-06-05
>    loadmodule "/usr/local/lib/ser/modules/exec.so"
>    loadmodule "/usr/local/lib/ser/modules/uri.so"
>    loadmodule "/usr/local/lib/ser/modules/acc.so"
>    loadmodule "/usr/local/lib/ser/modules/textops.so"
>    # 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 --
>    # Use this for non-persistent data storage
>    #modparam("usrloc", "db_mode",   0)
>    # use this for persistent storage (and comment the previous line)
>    modparam("usrloc", "db_mode", 2)
>    # -- auth params --
>    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("rr", "enable_double_rr", 1)
>    modparam("rr", "add_username", 1)
>    # -------------------------  request routing logic -------------------
>    # main routing logic
>    #
>    # This defines the handling of incorrect and Register messages,
>    # and sends message to other routes :
>    #
>    # 1) (main route)
>    # 2) PBX
>    # 3) PSTN / Gateway traffic
>    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 >=  2048 ) {
>            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();
> 
>        # subsequent messages withing a dialog should take the
>        # path determined by record-routing
>       # ACKS follow this path
>        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("newbridges.nl", "subscriber")) {
>                    www_challenge("newbridges.nl", "0");
>                    break;
>                };
>                save("location");
>                break;
>            };
>            lookup("aliases");
>            if (!uri==myself) {
>                append_hf("P-hint: outbound alias\r\n");
>                route(1);
>                break;
>            };
> 
>        # This part handles numbers (5xx,6xx,7xx) and (5xxx,6xxx,7xxx)
>        # which are internal numbers for the PABX
>        #
>        if (uri=~"^[19]si[20]"^sip:[5-7][0-9]{2,3}@.*")  {
>             log(1, "LOG: PBX call, contacting gateway...\n");
>             route(2);
>             break;
>          };
>                  #
>          # Gateway traffic directly to PSTN
>          #
>          # The assumption is that other all
>          # numeric usernames between 5 and 20 digits are really pstn
>    numbers
>          # and so they are routed to the gateway
>          if (uri=~[21]"sip:[0-9]{5,20}@.*") {
>             if (method=="INVITE"){
>                    log(1, "LOG: PSTN call, contacting gateway...\n");
>                };
>             route(3);
>             break;
>          };
>            # native SIP destinations are handled using our USRLOC DB
>            if (!lookup("location")) {
>                sl_send_reply("404", "User Not Found / Offline");
>                break;
>            };
>       };
>            append_hf("P-hint: usrloc applied\r\n");
>            route(1);
>    }
>    # main route
>    route[1]
>    {
>        # send it out now; use stateful forwarding as it works reliably
>        # even for UDP2TCP
>        if (!t_relay()) {
>            sl_reply_error();
>        };
>    }
>    # PBX/gateway traffic
>    # the '01' prefix specifies which port the gateway should use
>    route[2]
>    {
>    rewritehostport("192.168.1.244:5060");
>            forward(uri:host, uri:port);
>            break;
>    } /* end of route 2 - PBX traffic*/
>    # PSTN/gateway traffic
>    # the '01' prefix specifies which port the gateway should use
>    route[3]
>    {
>    rewritehostport("192.168.1.244:5060");
>            forward(uri:host, uri:port);
>            break;
>    } /* end of route 3 - PSTN traffic*/
>    ___________________________________
> 
>    Hilco de Lathouder
>    New Bridges
>    Voice Processing Engineers
>    Calandstraat 44
>    3316 EA Dordrecht
>    The Netherlands (timezone: GMT+1)
>    +31 (78) 6548787
>    ([22]lathouder at newbridges.nl)
> 
> 
>    
>    
> 
> References
> 
>    Visible links
>    1. sip:%5B5-7
>    2. mailto:%5Esip:%5B5-7%5D%5B0-9%5D%7B2,3%7D at .*
>    3. sip:%5B0-9%5D%7B5,20%7D at .*
>    4. sip:%5B5-7
>    5. mailto:%5Esip:%5B5-7%5D%5B0-9%5D%7B2,3%7D at .*
>    6. sip:%5B0-9%5D%7B5,20%7D at .*
>    7. sip:%5B5-7
>    8. mailto:%5Esip:%5B5-7%5D%5B0-9%5D%7B2,3%7D at .*
>    9. sip:%5B0-9%5D%7B5,20%7D at .*
>   10. sip:%5B5-7
>   11. mailto:%5Esip:%5B5-7%5D%5B0-9%5D%7B2,3%7D at .*
>   12. sip:%5B0-9%5D%7B5,20%7D at .*
>   13. sip:%5B5-7
>   14. mailto:%5Esip:%5B5-7%5D%5B0-9%5D%7B2,3%7D at .*
>   15. sip:%5B0-9%5D%7B5,20%7D at .*
>   16. sip:%5B5-7
>   17. mailto:%5Esip:%5B5-7%5D%5B0-9%5D%7B2,3%7D at .*
>   18. sip:%5B0-9%5D%7B5,20%7D at .*
>   19. sip:%5B5-7
>   20. mailto:%5Esip:%5B5-7%5D%5B0-9%5D%7B2,3%7D at .*
>   21. sip:%5B0-9%5D%7B5,20%7D at .*
>   22. mailto:lathouder at NewBridges.nl
> 
>    Hidden links:
>   23. http://www.databadge.net/igv2005/reg/?link=61dba23572386211a324

> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers




More information about the sr-users mailing list