[SR-Users] How to debug Kamailio

Remsik,Robert Robert.Remsik at colostate.edu
Fri May 19 22:07:40 CEST 2017


Humm.....


I'm missing something I think.  I'm having trouble even getting kamailio to write to the log file to indicate it even started.  I've started the service with 'service kamailio start' and can verify it's running but that's as far as I get.  None of the logs that reference kamailio have been written to today, so it's like it doesn't want to write to a log file even informational messages.


root at SERVER:/var/log $ service --status-all | grep kamailio
kamailio (pid 1917 1916 1915 1914 1913 1912 1911 1910 1909 1886 1885 1884 1882 1881 1880 1878 1877 1876 1875 1874 1873 1872 1862 1861 1860 1859 1857 1856 1855 1853 1852 1851 1850 1848 1847 1846 1845 1844 1843 1842 1841 1840 1839 1838 1837 1836 1835 1834) is running...

root at SERVER:/var/log $ grep -r kamailio | cut -f 1 -d ':' | uniq
secure-20170430
boot.log
messages-20170423
audit/audit.log.1
messages-20170430
yum.log
secure-20170423







Robert Remsik

ACNS

Desk Phone: 970 491 7120

Robert.Remsik at colostate.edu


________________________________
From: sr-users <sr-users-bounces at lists.kamailio.org> on behalf of Daniel-Constantin Mierla <miconda at gmail.com>
Sent: Sunday, May 7, 2017 11:48 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] How to debug Kamailio


You can load debugger module and enable cfgtrace, then the logs should show what actions are executed from the kamailio.cfg -- check to be sure it does the ones you expect to run there, maybe some conditions are wrong, etc...


Cheers,
Daniel

On 05.05.17 16:56, Remsik,Robert wrote:

Fair enough.  :)  I wasn't sure what chunks of information would be needed, or if the entire cfg is required.  I'm pasting the sections that  I edited and that I think are relevent.


Thank you!


>From the kamailio.cfg log:

# *** To run in debug mode:
#     - define WITH_DEBUG
#!define WITH_DEBUG




### LOG Levels: 3=DBG, 2=INFO, 1=NOTICE, 0=WARN, -1=ERR
#!ifdef WITH_DEBUG
debug=4
log_stderror=yes
#!else
debug=2
log_stderror=no
#!endif

memdbg=5
memlog=5

log_facility=LOG_LOCAL0

/* number of SIP routing processes */
children=8

/* add local domain aliases */
#alias="sip.mydomain.com"

/* uncomment and configure the following line if you want Kamailio to
 * bind on a specific interface/port/proto (default bind on all available) */
# listen=udp:10.0.0.10:5060

/* port to listen to (default 5060 for udp, tcp, scrtp, or 5061 for tls)*/
# port=5060
listen=129.82.13.26:5060
listen=129.82.13.26:5065
listen=129.82.13.26:5066
listen=129.82.13.26:5067

.:: Routing Infomration ::.
route[WITHINDLG] {
        if (!has_totag()) return;

        # sequential request withing a dialog should
        # take the path determined by record-routing
        if (loose_route()) {
                route(DLGURI);
                if (is_method("BYE")) {
                        setflag(FLT_ACC); # do accounting ...
                        setflag(FLT_ACCFAILED); # ... even if the transaction fails
                } else if ( is_method("ACK") ) {
                        # ACK is forwarded statelessy
                        route(NATMANAGE);
                } else if ( is_method("NOTIFY") ) {
                        # Add Record-Route for in-dialog NOTIFY as per RFC 6665.
                        record_route();

                        # Copied code - maybe it'll work?
                        sl_send_reply("200", "OK");
                        rewritehost("otc.colostate.edu");
#                        t_relay("tcp:129.82.13.X:5066");
                        t_relay_to_tcp("129.82.13.X","5066");
                        exit;
                }
                route(RELAY);
                exit;
        }

... other stuff ...

}





Robert Remsik

ACNS

Desk Phone: 970 491 7120

Robert.Remsik at colostate.edu<mailto:Robert.Remsik at colostate.edu>

________________________________
From: sr-users <sr-users-bounces at lists.kamailio.org><mailto:sr-users-bounces at lists.kamailio.org> on behalf of Antony Stone <Antony.Stone at kamailio.open.source.it><mailto:Antony.Stone at kamailio.open.source.it>
Sent: Friday, May 5, 2017 8:37:32 AM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] How to debug Kamailio

On Friday 05 May 2017 at 15:34:39, Remsik,Robert wrote:

> Hello!
>
> I've got a base install of Kamailio and I'm trying to have it forward
> packets generated by sipsak to a different proxy (a migration of an
> existing ruleset by opensips).  I can get the Kamailio process started but
> I can't figure out why Kamailio isn't forwarding the packet and I haven't
> been able to get debugging working to determine what's going on inside
> Kamailio to fix it.
>
> Can anyone please help me figure out how to debug this?

Only if you show us what you've tried so far.

For example, what changes have you made to the default configuration?


Antony.

--
<flopsie> yes, but this is #lbw, we don't do normal

                                                   Please reply to the list;
                                                         please *don't* CC me.

_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users at lists.kamailio.org<mailto:sr-users at lists.kamailio.org>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users



_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users at lists.kamailio.org<mailto:sr-users at lists.kamailio.org>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users



--
Daniel-Constantin Mierla
www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>
Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com<http://www.asipto.com>
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com<http://www.kamailioworld.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170519/6a091637/attachment.html>


More information about the sr-users mailing list