Re: [SR-Users] IP Address
Am 14.01.2011 08:54, schrieb Bernhard Suttner: Hi, I have a very short question: Kamailio does listen to many IP Addresses and does forward messages to the peer with t_relay. Which IP address will kamailio use for the outgoing traffic as source-ip, if there are many IP addresses on the interface? Is it possible to specify this somehow? IIRC Kamailio per default uses the socket on which the request was received (as long as there is no protocol change). To force a certain socket use force_send_socket: http://www.kamailio.org/dokuwiki/doku.php/core-cookbook:3.1.x#force_send_socket klaus ___ 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] Return code after fr_inv_timer hit
Hi, I would like to force kamailio to send another code as Request timeout when fr invite timeout is hit. Is there some nice way how to achieve it, or I have to edit the code ? :( Thank you! ___ 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] Return code after fr_inv_timer hit
Am 14.01.2011 10:28, schrieb Mino Haluz: Hi, I would like to force kamailio to send another code as Request timeout when fr invite timeout is hit. Is there some nice way how to achieve it, or I have to edit the code ? :( activate a failure route: t_on_failure(foo) then in failure route check for the status (e.g. 408): failure_route[foo] { ... if (t_check_status(487)) { t_reply(499,or what ever you want); exit; } ... } regards klaus ___ 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] Reconnection to db
Hi Daniel this is my test: 1- Kamailio starts and correctly loads the mtree 2- I make whatever modification in the tree and reload with mt_reload Jan 14 04:19:06 kam-test ./kamailio[31205]: DEBUG: db_postgres [km_dbase.c:153]: sending query ok: 0x92f880 - [select tname,tprefix,tvalue from mtree order by tname] Jan 14 04:19:06 kam-test ./kamailio[31205]: DEBUG: core [db_res.c:118]: allocate 48 bytes for result set at 0x94cd00 Jan 14 04:19:06 kam-test ./kamailio[31205]: DEBUG: db_postgres [km_dbase.c:220]: 0x92f880 PQresultStatus(PGRES_TUPLES_OK) PQgetResult(0x29f05f0) Jan 14 04:19:06 kam-test ./kamailio[31205]: DEBUG: db_postgres [km_res.c:108]: 3 columns returned from the query Jan 14 04:19:06 kam-test ./kamailio[31205]: DEBUG: core [db_res.c:155]: allocate 24 bytes for result names at 0x94cc60 [] Jan 14 04:19:06 kam-test ./kamailio[31205]: DEBUG: db_postgres [km_res.c:267]: freeing row buffer at 0x94c940 Jan 14 04:19:06 kam-test ./kamailio[31205]: DEBUG: mtree [mtree.c:738]: adding new tname [1] Jan 14 04:19:06 kam-test ./kamailio[31205]: DEBUG: core [db_res.c:54]: freeing 3 rows [...] Jan 14 04:19:06 kam-test ./kamailio[31205]: DEBUG: core [db_res.c:94]: freeing result names at 0x94cc60 Jan 14 04:19:06 kam-test ./kamailio[31205]: DEBUG: core [db_res.c:99]: freeing result types at 0x94cbc0 Jan 14 04:19:06 kam-test ./kamailio[31205]: DEBUG: core [db_res.c:136]: freeing result set at 0x94cd00 Jan 14 04:19:06 kam-test ./kamailio[31205]: DEBUG: db_postgres [km_dbase.c:313]: PQclear(0x29f05f0) result set 3. Postgres DB restarts (either through restart, or /stop/wait a minute/start) No log is written in Kamailio when this happens. 4.- I try again to reload the tree, and these are the logs: Jan 14 04:21:42 kam-test ./kamailio[31205]: DEBUG: db_postgres [km_dbase.c:153]: sending query ok: 0x92f880 - [select tname,tprefix,tvalue from mtree order by tname] Jan 14 04:21:42 kam-test ./kamailio[31205]: DEBUG: core [db_res.c:118]: allocate 48 bytes for result set at 0x94cd00 Jan 14 04:21:42 kam-test ./kamailio[31205]: DEBUG: db_postgres [km_dbase.c:220]: 0x92f880 PQresultStatus(PGRES_FATAL_ERROR) PQgetResult(0x29ef0a0) Jan 14 04:21:42 kam-test ./kamailio[31205]: ERROR: db_postgres [km_dbase.c:236]: 0x92f880 - invalid query, execution aborted Jan 14 04:21:42 kam-test ./kamailio[31205]: ERROR: db_postgres [km_dbase.c:237]: 0x92f880 - PQresultStatus(PGRES_FATAL_ERROR) Jan 14 04:21:42 kam-test ./kamailio[31205]: ERROR: db_postgres [km_dbase.c:238]: 0x92f880: server closed the connection unexpectedly#012#011This probably means the server terminated abnormally#012#011before or while processing the request.#012 Jan 14 04:21:42 kam-test ./kamailio[31205]: DEBUG: core [db_res.c:81]: freeing 0 columns Jan 14 04:21:42 kam-test ./kamailio[31205]: DEBUG: core [db_res.c:136]: freeing result set at 0x94cd00 Jan 14 04:21:42 kam-test ./kamailio[31205]: ERROR: mtree [mtree_mod.c:633]: Error while fetching result Jan 14 04:21:42 kam-test ./kamailio[31205]: ERROR: db_postgres [km_dbase.c:329]: invalid parameter value Jan 14 04:21:42 kam-test ./kamailio[31205]: ERROR: mtree [mtree_mod.c:744]: cannot re-load info from database Thanks in advance Regards Javi On Thu, Jan 13, 2011 at 1:56 PM, Daniel-Constantin Mierla mico...@gmail.com wrote: Can you send the log messages (debug=3) for that moment (restart of pg server and making a new call/registration)? Daniel On 1/13/11 12:00 PM, Javier Gallart wrote: Hi Daniel I have just tested it and I'm getting the same results. This is the kamailio version I'm testing: root@kam-test:/usr/local/kamailio/sbin# ./kamailio -V version: kamailio 3.2.0-dev2 (x86_64/linux) 35568f Thanks! Javi On Tue, Jan 4, 2011 at 3:46 PM, Javier Gallart jgalla...@gmail.comwrote: Hi list we have been testing the mtree module. We do periodical reloads of the mtree table with the mi mt_reload command through xmlrpc. It works fine except when the db is restarted. If we manually restart the db and then try the mt_reload commands we get this error: Jan 4 09:13:17 server /usr/local/kamailio-3.1.1/sbin/kamailio[28534]: ERROR: db_postgres [km_dbase.c:152]: 0xa6a490 PQsendQuery Error: server closed the connection unexpectedly#012#011This probably means the server terminated abnormally#012#011before or while processing the request.#012 Query: select partition,prefix,route from trees order by partition Jan 4 09:13:17 server /usr/local/kamailio-3.1.1/sbin/kamailio[28534]: ERROR: core [db_query.c:101]: error while submitting query Jan 4 09:13:17 server /usr/local/kamailio-3.1.1/sbin/kamailio[28534]: ERROR: mtree [mtree_mod.c:622]: Error while querying db Jan 4 09:13:17 server /usr/local/kamailio-3.1.1/sbin/kamailio[28534]: ERROR: mtree [mtree_mod.c:738]: cannot re-load info from database Is there a way to reconnect to the db before sending that command? Thanks in advance Regards Javi ___ SIP Express Router (SER)
Re: [SR-Users] Reconnection to db
Hello, what version of postgres and postgres client library are you using? According to the docs from devel manual, this is the function that should be used to reconnect: |PQreset| Resets the communication channel to the server. void PQreset(PGconn *conn); This function will close the connection to the server and attempt to reestablish a new connection to the same server, using all the same parameters previously used. This may be useful for error recovery if a working connection is lost. You may see more here: http://www.network-theory.co.uk/docs/postgresql/vol2/DatabaseConnectionControlFunctions.html Somehow seems not to work in this case. Can you try also with a shorter down time for postgres server, like a normal restart? Would be intrested to see if the client side loses somehow connection parameters due to long time unconnected. Cheers, Daniel On 1/14/11 11:15 AM, Javier Gallart wrote: Hi Daniel this is my test: 1- Kamailio starts and correctly loads the mtree 2- I make whatever modification in the tree and reload with mt_reload Jan 14 04:19:06 kam-test ./kamailio[31205]: DEBUG: db_postgres [km_dbase.c:153]: sending query ok: 0x92f880 - [select tname,tprefix,tvalue from mtree order by tname] Jan 14 04:19:06 kam-test ./kamailio[31205]: DEBUG: core [db_res.c:118]: allocate 48 bytes for result set at 0x94cd00 Jan 14 04:19:06 kam-test ./kamailio[31205]: DEBUG: db_postgres [km_dbase.c:220]: 0x92f880 PQresultStatus(PGRES_TUPLES_OK) PQgetResult(0x29f05f0) Jan 14 04:19:06 kam-test ./kamailio[31205]: DEBUG: db_postgres [km_res.c:108]: 3 columns returned from the query Jan 14 04:19:06 kam-test ./kamailio[31205]: DEBUG: core [db_res.c:155]: allocate 24 bytes for result names at 0x94cc60 [] Jan 14 04:19:06 kam-test ./kamailio[31205]: DEBUG: db_postgres [km_res.c:267]: freeing row buffer at 0x94c940 Jan 14 04:19:06 kam-test ./kamailio[31205]: DEBUG: mtree [mtree.c:738]: adding new tname [1] Jan 14 04:19:06 kam-test ./kamailio[31205]: DEBUG: core [db_res.c:54]: freeing 3 rows [...] Jan 14 04:19:06 kam-test ./kamailio[31205]: DEBUG: core [db_res.c:94]: freeing result names at 0x94cc60 Jan 14 04:19:06 kam-test ./kamailio[31205]: DEBUG: core [db_res.c:99]: freeing result types at 0x94cbc0 Jan 14 04:19:06 kam-test ./kamailio[31205]: DEBUG: core [db_res.c:136]: freeing result set at 0x94cd00 Jan 14 04:19:06 kam-test ./kamailio[31205]: DEBUG: db_postgres [km_dbase.c:313]: PQclear(0x29f05f0) result set 3. Postgres DB restarts (either through restart, or /stop/wait a minute/start) No log is written in Kamailio when this happens. 4.- I try again to reload the tree, and these are the logs: Jan 14 04:21:42 kam-test ./kamailio[31205]: DEBUG: db_postgres [km_dbase.c:153]: sending query ok: 0x92f880 - [select tname,tprefix,tvalue from mtree order by tname] Jan 14 04:21:42 kam-test ./kamailio[31205]: DEBUG: core [db_res.c:118]: allocate 48 bytes for result set at 0x94cd00 Jan 14 04:21:42 kam-test ./kamailio[31205]: DEBUG: db_postgres [km_dbase.c:220]: 0x92f880 PQresultStatus(PGRES_FATAL_ERROR) PQgetResult(0x29ef0a0) Jan 14 04:21:42 kam-test ./kamailio[31205]: ERROR: db_postgres [km_dbase.c:236]: 0x92f880 - invalid query, execution aborted Jan 14 04:21:42 kam-test ./kamailio[31205]: ERROR: db_postgres [km_dbase.c:237]: 0x92f880 - PQresultStatus(PGRES_FATAL_ERROR) Jan 14 04:21:42 kam-test ./kamailio[31205]: ERROR: db_postgres [km_dbase.c:238]: 0x92f880: server closed the connection unexpectedly#012#011This probably means the server terminated abnormally#012#011before or while processing the request.#012 Jan 14 04:21:42 kam-test ./kamailio[31205]: DEBUG: core [db_res.c:81]: freeing 0 columns Jan 14 04:21:42 kam-test ./kamailio[31205]: DEBUG: core [db_res.c:136]: freeing result set at 0x94cd00 Jan 14 04:21:42 kam-test ./kamailio[31205]: ERROR: mtree [mtree_mod.c:633]: Error while fetching result Jan 14 04:21:42 kam-test ./kamailio[31205]: ERROR: db_postgres [km_dbase.c:329]: invalid parameter value Jan 14 04:21:42 kam-test ./kamailio[31205]: ERROR: mtree [mtree_mod.c:744]: cannot re-load info from database Thanks in advance Regards Javi On Thu, Jan 13, 2011 at 1:56 PM, Daniel-Constantin Mierla mico...@gmail.com mailto:mico...@gmail.com wrote: Can you send the log messages (debug=3) for that moment (restart of pg server and making a new call/registration)? Daniel On 1/13/11 12:00 PM, Javier Gallart wrote: Hi Daniel I have just tested it and I'm getting the same results. This is the kamailio version I'm testing: root@kam-test:/usr/local/kamailio/sbin# ./kamailio -V version: kamailio 3.2.0-dev2 (x86_64/linux) 35568f Thanks! Javi On Tue, Jan 4, 2011 at 3:46 PM, Javier Gallart jgalla...@gmail.com mailto:jgalla...@gmail.com wrote: Hi list we have been testing the mtree module. We do periodical reloads of the mtree table with the mi mt_reload command through
[SR-Users] tm module question
Hi folks, I have a problem with a scenario where an incoming INVITE is forwarded to a redirect server which responds with 302 and a new target in the Contact header (B). The call is being forwarded to the new contact correctly. All responses from B that are either provisional or a 200 OK are being routed back to the caller. If B responds with any code =400 the 302 from the redirect server is being returned to the caller instead of the received code. A B C |--INVITE-| | | |--INVITE-| | |---302---| D | |INVITE---| | |-404-| |---302---| Is this intended? And if so, is there any way to change this behaviour so the latest received response is returned? I tested using the version from repository from 13.01.2011 My reduced config looks like this: route{ if (@to.tag != ) { if (loose_route()) { record_route(); t_relay(); } else { if ( is_method(ACK) ) { if ( t_check_trans() ) { t_relay(); exit; } else { # ACK without matching transaction ... ignore and discard.\n); exit; } } record_route(); } exit; } else { record_route(); } t_on_failure(REDIRECT_REPLY); if (!t_relay_to_udp(192.168.0.10,5060)) { sl_reply_error(); }; exit; } failure_route[REDIRECT_REPLY] { if (t_check_status(3[0-9][0-9])) { get_redirects(*:1); t_relay(); exit; } } Regards, Stefan ___ 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] tm module question
Am 14.01.2011 16:52, schrieb Prelle, Stefan: Hi folks, I have a problem with a scenario where an incoming INVITE is forwarded to a redirect server which responds with 302 and a new target in the Contact header (B). The call is being forwarded to the new contact correctly. All responses from B that are either provisional or a 200 OK are being routed back to the caller. If B responds with any code=400 the 302 from the redirect server is being returned to the caller instead of the received code. A B C |--INVITE-| | | |--INVITE-| | |---302---| D | |INVITE---| | |-404-| |---302---| Is this intended? And if so, is there any way to change this behaviour so the latest received response is returned? Yes - it is intended. The lowest response code of all branches will used (RFC conform). You can change this behavior by either (I think b is what you look for). a) load another failure route in the existing failure route. in the new failure route use t_reply() to set a proper failure route b) play around with tm module parameters, especially failure_reply_mode(): http://www.kamailio.org/docs/modules/3.1.x/modules/tm.html#failure_reply_mode regards klaus ___ 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] OpenIMSCore and Kamalio Integration
Hi, tiny typo in my previous mail: deb http://repository.ng-voice.com lenny main contrib non-free deb-src http://repository.ng-voice.com lenny main contrib non-free (no /ims in the repository URL) Kind regards, Carsten 2011/1/13 Carsten Bock li...@bock.info: Hi Andrés, I have updated our repository. The packages are now signed, so you may want to install the Key: wget http://repository.ng-voice.com/ngvoice-debian-gpg.key apt-key add ngvoice-debian-gpg.key Then add our repository to your “/etc/apt/sources.list”: deb http://repository.ng-voice.com/ims lenny main contrib non-free deb-src http://repository.ng-voice.com/ims lenny main contrib non-free (they are for Debian Lenny only right now) Then you may simply install the Kamailio IMS Modules: apt-get install kamailio kamailio-ims-modules (in order to update the packages, you need to remove kamailio (apt-get remove kamailio), clean your local deb-cache (apt-get clean) and reinstall the packages) The repository also contains other packages, such as: - the RTP-Proxy (for the P-CSCF, package rtpproxy. latest stable version) - the Fokus FHoSS HSS-Server (package openimscore-fhoss) (all debian lenny only right now) I've made some installation notes here: http://www.ng-voice.com/our-solution/installation/ The previous repository, i gave you in private mail (on our build server) is no longer available, unless building packages or updating our systems, the system is turned off. Kind regards, Carsten 2011/1/10 Andrés S. García Ruiz asgar...@um.es: Hi Carsten, There are very good news!! I will be expecting the repository to be accessible in order to test it! Regards, Andrés. El 07/01/11 11:49, Carsten Bock escribió: Hi, the current status is following: = OpenIMS-Core: - all OpenIMS module compile using Kamailio - make deb (i have added deb-lenny and deb-squeeze targets as well) will build the standard kamailio packages and a new kamailio-ims-modules package - You need to adapt the configuration of the OpenIMS-P-CSCF a little, to make it work (basically change some paths); i will add a working config next week - so far, i did only test the P-CSCF-setup with Kamailio, tests of the I-/S-CSCF-modules should will follow in the next days (+ i will add configurations for those components to the branch) - we have a testsetup in place, consisting of the original OpenIMS P-/I- and S-CSCF, the Kamailio replacements, a presence/XCAP-server (to make the setup more interesting, thanks to Daniel for his great howto on asipto.com) and the FHoSS. All systems run on dedicated (virtual) machines. - as soon as there is more progress, i can make our repository for debian lenny accessible from the outside world (it currently just has a private IP) = OpenHSS.org (as a FHoSS-Replacement): - a year ago, i started to develop a replacement for Java FHoSS: openhss.org (which would be a direct port from the FHoSS to C with CDP) - due to personal changes (new job, 5 days a week a new city), i paused the development - But now, there is good news: I found someone, who will finish the development: Brian edge Edginton (http://www.ng-voice.com/our-team/brian/) The full roadmap can be found here: http://www.ng-voice.com/our-solution/roadmap/ (it contains such ugly points as add documentation ;-) ) The goal of the project is to create a stable, fast, open-source, feature-rich IMS implementation based on Kamailio and the OpenIMS-Core. For latest updates on our development, please visit our blog: http://www.ng-voice.com/ Kind regards, Carsten 2011/1/7 Daniel-Constantin Mierlamico...@gmail.com: Btw, fyi, Carsten Bock is working on Git branch 'cartenbock/ims' for making straightforward usage of openimscore modules with latest kamailio. If you are interested in this kind of platform, maybe you should fetch that branch, help testing and integration work. Cheers, Daniel On 12/3/10 10:56 AM, Andrés S. García Ruiz wrote: It works now! Thanks a lot! Regards, Andrés. El 30/11/10 21:56, Daniel-Constantin Mierla escribió: Hello, the comments at the beginning of the configuration files tells you more about how some features are enabled/disabled. I assume you read them as you enabled authenitcation (by default is disabled) -- you have #!define WITH_AUTH. Maybe in your particular case the best solution is to enable IP authentication and add the IP address of OpenIMSCore in address table with group id 1. Cheers, Daniel On 11/29/10 3:27 PM, Andrés S. García Ruiz wrote: Thanks for your comment, This is my configuration, could you please tell me how to disable authentication? #!KAMAILIO # # Kamailio (OpenSER) SIP Server v3.1 - 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
[SR-Users] Looking for the RTP Proxy
Dear sir, we re looking for RTP proxy training or solution, can you please give us more details on this thanking you with regards Mallik ___ 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