[SR-Users] UAC module fails to refresh registrations
First register is OK, but after 60 seconds time to update register, kamailio after 401 Unauthorized dont send second register with Authorization. In log i see only ERROR: uac [uac_reg.c:537]: uac_reg_tm_callback(): authentication failed for kamailio mysql select * from uacreg; ++--+++++--+---+---++-+ | id | l_uuid | l_username | l_domain | r_username | r_domain | realm| auth_username | auth_password | auth_proxy | expires | ++--+++++--+---+---++-+ | 1 | kamailio | aster | 192.168.16.201 | kamailio | 192.168.16.200 | asterisk | kamailio | 1234 | sip:192.168.16.200 | 60 | ++--+++++--+---+---++-+ 1 row in set (0.00 sec) #!KAMAILIO # # Kamailio (OpenSER) SIP Server v4.0 - default configuration script # - web: http://www.kamailio.org # - git: http://sip-router.org # # Direct your questions about this file to: sr-users@lists.sip-router.org # # Refer to the Core CookBook at http://www.kamailio.org/wiki/ # for an explanation of possible statements, functions and parameters. # # Several features can be enabled using '#!define WITH_FEATURE' directives: # # *** To run in debug mode: #-!define WITH_DEBUG # # *** To enable mysql: #!define WITH_MYSQL # # *** To enable authentication execute: # - enable mysql #!define WITH_AUTH # - add users using 'kamctl' # # *** To enable IP authentication execute: # - enable mysql # - enable authentication #!define WITH_IPAUTH # - add IP addresses with group id '1' to 'address' table # # *** To enable persistent user location execute: # - enable mysql #!define WITH_USRLOCDB # # *** To enable presence server execute: # - enable mysql # - define WITH_PRESENCE # # *** To enable nat traversal execute: # - define WITH_NAT # - install RTPProxy: http://www.rtpproxy.org # - start RTPProxy: #rtpproxy -l _your_public_ip_ -s udp:localhost:7722 # # *** To enable PSTN gateway routing execute: # - define WITH_PSTN # - set the value of pstn.gw_ip # - check route[PSTN] for regexp routing condition # # *** To enable database aliases lookup execute: # - enable mysql # - define WITH_ALIASDB # # *** To enable speed dial lookup execute: # - enable mysql # - define WITH_SPEEDDIAL # # *** To enable multi-domain support execute: # - enable mysql # - define WITH_MULTIDOMAIN # # *** To enable TLS support execute: # - adjust CFGDIR/tls.cfg as needed # - define WITH_TLS # # *** To enable XMLRPC support execute: #!define WITH_XMLRPC # - adjust route[XMLRPC] for access policy # # *** To enable anti-flood detection execute: # - adjust pike and htable=ipban settings as needed (default is # block if more than 16 requests in 2 seconds and ban for 300 seconds) # - define WITH_ANTIFLOOD # # *** To block 3XX redirect replies execute: # - define WITH_BLOCK3XX # # *** To enable VoiceMail routing execute: # - define WITH_VOICEMAIL # - set the value of voicemail.srv_ip # - adjust the value of voicemail.srv_port # # *** To enhance accounting execute: # - enable mysql # - define WITH_ACCDB # - add following columns to database #!ifdef ACCDB_COMMENT ALTER TABLE acc ADD COLUMN src_user VARCHAR(64) NOT NULL DEFAULT ''; ALTER TABLE acc ADD COLUMN src_domain VARCHAR(128) NOT NULL DEFAULT ''; ALTER TABLE acc ADD COLUMN src_ip varchar(64) NOT NULL default ''; ALTER TABLE acc ADD COLUMN dst_ouser VARCHAR(64) NOT NULL DEFAULT ''; ALTER TABLE acc ADD COLUMN dst_user VARCHAR(64) NOT NULL DEFAULT ''; ALTER TABLE acc ADD COLUMN dst_domain VARCHAR(128) NOT NULL DEFAULT ''; ALTER TABLE missed_calls ADD COLUMN src_user VARCHAR(64) NOT NULL DEFAULT ''; ALTER TABLE missed_calls ADD COLUMN src_domain VARCHAR(128) NOT NULL DEFAULT ''; ALTER TABLE missed_calls ADD COLUMN src_ip varchar(64) NOT NULL default ''; ALTER TABLE missed_calls ADD COLUMN dst_ouser VARCHAR(64) NOT NULL DEFAULT ''; ALTER TABLE missed_calls ADD COLUMN dst_user VARCHAR(64) NOT NULL DEFAULT ''; ALTER TABLE missed_calls ADD COLUMN dst_domain VARCHAR(128) NOT NULL DEFAULT ''; #!endif ### Include Local Config If Exists # import_file kamailio-local.cfg ### Defined Values # # *** Value defines - IDs used later in config #!ifdef WITH_MYSQL # - database URL - used to connect to database server by modules such # as: auth_db, acc, usrloc, a.s.o. #!ifndef DBURL #!define DBURL mysql://kamailio:kamailiorw@localhost/kamailio #!endif #!endif #!ifdef WITH_MULTIDOMAIN # - the value for 'use_domain' parameters #!define MULTIDOMAIN 1 #!else
Re: [SR-Users] UAC module fails to refresh registrations
Thanks for your help with this Daniel. I've attached a SIP trace along with debugging information from Kamailio. On 7/25/2013 1:47 AM, Daniel-Constantin Mierla wrote: Hello, the log message shows that authentication failed. Use debug=3 for more details. Also, grab the sip traffic with ngrep. Cheers, Daniel On 7/25/13 9:50 AM, Isaac McDonald wrote: Hello Daniel, Thanks for your help on this. I set the registration to expire after 10 seconds and restarted Kamailio with debug level 1. Here's the output: Jul 25 02:43:41 Kamailio-DEV /usr/sbin/kamailio[30148]: ERROR: uac [uac_reg.c:537]: uac_reg_tm_callback(): authentication failed for 2500-xxx.xxx..com Thanks! On 7/22/2013 1:57 AM, Daniel-Constantin Mierla wrote: Hello, can you send the log messages with debug=1 when the re-registration 401 is processed? Cheers, Daniel On 7/21/13 1:35 AM, Isaac McDonald wrote: Hello, I'm using the UAC module to register to remote sip proxies. When starting Kamailio, the UAC module successfully registers with the remote sip proxies as expected. Upon expiration of the registration (refresh interval) the UAC module fails to re-register. I've done some sip traces and found the following: During Kamailio startup the registration process is typical of what you'd expect: 1. UAC module sends registration request without authentication information to remote registrar 2. Remote sip proxy sends a 401 back to Kamailio saying unauthorized 3. UAC module sends another registration request with credentials and registration is complete. After the refresh interval expires, the UAC module performs step 1 from above, and the remote sip proxy sends back a 401 (step 2). At this point, the UAC module doesn't resend the registration request with credentials thus failing to register. I've got the following modparam's set on the UAC module. modparam(uac, reg_contact_addr, 10.0.0.31:5060) modparam(uac, reg_timer_interval, 60) modparam(uac, reg_retry_interval, 300) Anyone have any idea's as to why registrations are failing after the refresh interval? ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Daniel-Constantin Mierla -http://www.asipto.com http://twitter.com/#!/miconda -http://www.linkedin.com/in/miconda ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users kamailio[3396]: DEBUG: db_mysql [km_dbase.c:358]: db_mysql_fetch_result(): converting row 0 of 1 count 1 kamailio[3396]: DEBUG: core [db_row.c:119]: db_allocate_row(): allocate 320 bytes for row values at 0x7fe87e48c0a0 kamailio[3396]: DEBUG: core [db_val.c:117]: db_str2val(): converting STRING [2500-cti.sip.example.com] kamailio[3396]: DEBUG: core [db_val.c:117]: db_str2val(): converting STRING [2500] kamailio[3396]: DEBUG: core [db_val.c:117]: db_str2val(): converting STRING [cti.sip.example.com] kamailio[3396]: DEBUG: core [db_val.c:117]: db_str2val(): converting STRING [2500] kamailio[3396]: DEBUG: core [db_val.c:117]: db_str2val(): converting STRING [10.140.1.11] kamailio[3396]: DEBUG: core [db_val.c:117]: db_str2val(): converting STRING [asterisk] kamailio[3396]: DEBUG: core [db_val.c:117]: db_str2val(): converting STRING [2500] kamailio[3396]: DEBUG: core [db_val.c:117]: db_str2val(): converting STRING [Qa31mwWv3MBdFYuVKY] kamailio[3396]: DEBUG: core [db_val.c:117]: db_str2val(): converting STRING [sip:10.140.1.11] kamailio[3396]: DEBUG: core [db_val.c:73]: db_str2val(): converting INT [10] kamailio[3400]: DEBUG: core [sr_module.c:892]: init_mod_child(): DEBUG: init_mod_child (5): sqlops kamailio[3398]: DEBUG: core [sr_module.c:892]: init_mod_child(): DEBUG: init_mod_child (-1): sqlops kamailio[3404]: DEBUG: core [sruid.c:100]: sruid_init(): root for sruid is [ulcx-51f2284e-d4c-] (0 / 18) kamailio[3404]: DEBUG: core [sr_module.c:892]: init_mod_child(): DEBUG: init_mod_child (6): registrar kamailio[3404]: DEBUG: core [sruid.c:100]: sruid_init(): root for sruid is [uloc-51f2284e-d4c-] (0 / 18) kamailio[3404]: DEBUG: core [sr_module.c:892]: init_mod_child(): DEBUG: init_mod_child (6): ctl kamailio[3398]: DEBUG: core [sr_module.c:674]: find_mod_export_record(): find_export_record: found db_bind_api in module db_mysql [/usr/lib64/kamailio/modules/db_mysql.so] kamailio[3398]: DEBUG: core [db.c:213]: db_bind_mod(): using db bind api for db_mysql kamailio[3398]: DEBUG: core [db.c:327]: db_do_init2(): connection 0x7fe87e49eff0 found in pool kamailio[3398]: DEBUG: core [sr_module.c:892]: init_mod_child(): DEBUG: init_mod_child (-1): dispatcher kamailio[3404]: DEBUG: core [sr_module.c:892]: init_mod_child(): DEBUG: init_mod_child (6): mi_rpc kamailio[3404]: DEBUG: core [sr_module.c:892]: init_mod_child(): DEBUG:
Re: [SR-Users] UAC module fails to refresh registrations
Hello Daniel, Thanks for your help on this. I set the registration to expire after 10 seconds and restarted Kamailio with debug level 1. Here's the output: Jul 25 02:43:41 Kamailio-DEV /usr/sbin/kamailio[30148]: ERROR: uac [uac_reg.c:537]: uac_reg_tm_callback(): authentication failed for 2500-xxx.xxx..com Thanks! On 7/22/2013 1:57 AM, Daniel-Constantin Mierla wrote: Hello, can you send the log messages with debug=1 when the re-registration 401 is processed? Cheers, Daniel On 7/21/13 1:35 AM, Isaac McDonald wrote: Hello, I'm using the UAC module to register to remote sip proxies. When starting Kamailio, the UAC module successfully registers with the remote sip proxies as expected. Upon expiration of the registration (refresh interval) the UAC module fails to re-register. I've done some sip traces and found the following: During Kamailio startup the registration process is typical of what you'd expect: 1. UAC module sends registration request without authentication information to remote registrar 2. Remote sip proxy sends a 401 back to Kamailio saying unauthorized 3. UAC module sends another registration request with credentials and registration is complete. After the refresh interval expires, the UAC module performs step 1 from above, and the remote sip proxy sends back a 401 (step 2). At this point, the UAC module doesn't resend the registration request with credentials thus failing to register. I've got the following modparam's set on the UAC module. modparam(uac, reg_contact_addr, 10.0.0.31:5060) modparam(uac, reg_timer_interval, 60) modparam(uac, reg_retry_interval, 300) Anyone have any idea's as to why registrations are failing after the refresh interval? ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Daniel-Constantin Mierla -http://www.asipto.com http://twitter.com/#!/miconda -http://www.linkedin.com/in/miconda ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] UAC module fails to refresh registrations
Hello, the log message shows that authentication failed. Use debug=3 for more details. Also, grab the sip traffic with ngrep. Cheers, Daniel On 7/25/13 9:50 AM, Isaac McDonald wrote: Hello Daniel, Thanks for your help on this. I set the registration to expire after 10 seconds and restarted Kamailio with debug level 1. Here's the output: Jul 25 02:43:41 Kamailio-DEV /usr/sbin/kamailio[30148]: ERROR: uac [uac_reg.c:537]: uac_reg_tm_callback(): authentication failed for 2500-xxx.xxx..com Thanks! On 7/22/2013 1:57 AM, Daniel-Constantin Mierla wrote: Hello, can you send the log messages with debug=1 when the re-registration 401 is processed? Cheers, Daniel On 7/21/13 1:35 AM, Isaac McDonald wrote: Hello, I'm using the UAC module to register to remote sip proxies. When starting Kamailio, the UAC module successfully registers with the remote sip proxies as expected. Upon expiration of the registration (refresh interval) the UAC module fails to re-register. I've done some sip traces and found the following: During Kamailio startup the registration process is typical of what you'd expect: 1. UAC module sends registration request without authentication information to remote registrar 2. Remote sip proxy sends a 401 back to Kamailio saying unauthorized 3. UAC module sends another registration request with credentials and registration is complete. After the refresh interval expires, the UAC module performs step 1 from above, and the remote sip proxy sends back a 401 (step 2). At this point, the UAC module doesn't resend the registration request with credentials thus failing to register. I've got the following modparam's set on the UAC module. modparam(uac, reg_contact_addr, 10.0.0.31:5060) modparam(uac, reg_timer_interval, 60) modparam(uac, reg_retry_interval, 300) Anyone have any idea's as to why registrations are failing after the refresh interval? ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Daniel-Constantin Mierla -http://www.asipto.com http://twitter.com/#!/miconda -http://www.linkedin.com/in/miconda ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Daniel-Constantin Mierla - http://www.asipto.com http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] UAC module fails to refresh registrations
Hello, can you send the log messages with debug=1 when the re-registration 401 is processed? Cheers, Daniel On 7/21/13 1:35 AM, Isaac McDonald wrote: Hello, I'm using the UAC module to register to remote sip proxies. When starting Kamailio, the UAC module successfully registers with the remote sip proxies as expected. Upon expiration of the registration (refresh interval) the UAC module fails to re-register. I've done some sip traces and found the following: During Kamailio startup the registration process is typical of what you'd expect: 1. UAC module sends registration request without authentication information to remote registrar 2. Remote sip proxy sends a 401 back to Kamailio saying unauthorized 3. UAC module sends another registration request with credentials and registration is complete. After the refresh interval expires, the UAC module performs step 1 from above, and the remote sip proxy sends back a 401 (step 2). At this point, the UAC module doesn't resend the registration request with credentials thus failing to register. I've got the following modparam's set on the UAC module. modparam(uac, reg_contact_addr, 10.0.0.31:5060) modparam(uac, reg_timer_interval, 60) modparam(uac, reg_retry_interval, 300) Anyone have any idea's as to why registrations are failing after the refresh interval? ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Daniel-Constantin Mierla - http://www.asipto.com http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] UAC module fails to refresh registrations
Hello, I'm using the UAC module to register to remote sip proxies. When starting Kamailio, the UAC module successfully registers with the remote sip proxies as expected. Upon expiration of the registration (refresh interval) the UAC module fails to re-register. I've done some sip traces and found the following: During Kamailio startup the registration process is typical of what you'd expect: 1. UAC module sends registration request without authentication information to remote registrar 2. Remote sip proxy sends a 401 back to Kamailio saying unauthorized 3. UAC module sends another registration request with credentials and registration is complete. After the refresh interval expires, the UAC module performs step 1 from above, and the remote sip proxy sends back a 401 (step 2). At this point, the UAC module doesn't resend the registration request with credentials thus failing to register. I've got the following modparam's set on the UAC module. modparam(uac, reg_contact_addr, 10.0.0.31:5060) modparam(uac, reg_timer_interval, 60) modparam(uac, reg_retry_interval, 300) Anyone have any idea's as to why registrations are failing after the refresh interval? smime.p7s Description: S/MIME cryptographic signature smime.p7s Description: S/MIME Cryptographic Signature ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users