Discussion:
[SR-Users] simplest config file possible - not working!
White, Phil
2014-10-01 00:27:38 UTC
Permalink
Sorry Guys, I'm very new to this. Taking a dive 'under the hood', to try to
learn what is going on, and to see what I can achieve.

I have 1 sip device ( voip telephone) on the network, constantly firing out
REGISTER requests (I have turned off my asterisk server!). That's good.
I have a terminal window open, running tcpdump. That's good too - I can see
what is going on.

I also have kamailio - giving me absolutely nothing. It's not complicated
config file. In fact it is the simplest I could do. However, it logs
nothing - and i am expecting it to.

Can someone put me out of my misery, and point out the glaring error I have?
How can I send messages to STDERR while testing?

Cheers,

Phil

----

## WARNING - FOR TESTING & EDUCTION ONLY
####### Global Parameters #########

debug=5
fork=no
log_stderror=yes
port=5060

####### Modules Section ########

# set module path
mpath="/usr/local/lib/kamailio/modules/"
loadmodule "sl.so"

####### Routing Logic ########

route{
if(method=="REGISTER") {
log(1,"this SIP request is a REGISTER message\n");
sl_send_reply("404", "No registrar");
};

if (af!=INET6) {
log(1,"Message received over IPv4 link\n");
};

if(proto==UDP) {
log(1,"SIP message received over UDP\n");
};

if(status=="200") {
log(1,"this is a 200 OK reply\n");
};

if(uri==myself) {
log(1,"the request is for local processing\n");
};
}
Daniel-Constantin Mierla
2014-10-01 06:06:53 UTC
Permalink
How did you start it?

Daniel
Post by White, Phil
Sorry Guys, I'm very new to this. Taking a dive 'under the hood', to
try to learn what is going on, and to see what I can achieve.
I have 1 sip device ( voip telephone) on the network, constantly
firing out REGISTER requests (I have turned off my asterisk server!).
That's good.
I have a terminal window open, running tcpdump. That's good too - I
can see what is going on.
I also have kamailio - giving me absolutely nothing. It's not
complicated config file. In fact it is the simplest I could do.
However, it logs nothing - and i am expecting it to.
Can someone put me out of my misery, and point out the glaring error I have?
How can I send messages to STDERR while testing?
Cheers,
Phil
----
## WARNING - FOR TESTING & EDUCTION ONLY
####### Global Parameters #########
debug=5
fork=no
log_stderror=yes
port=5060
####### Modules Section ########
# set module path
mpath="/usr/local/lib/kamailio/modules/"
loadmodule "sl.so"
####### Routing Logic ########
route{
if(method=="REGISTER") {
log(1,"this SIP request is a REGISTER message\n");
sl_send_reply("404", "No registrar");
};
if (af!=INET6) {
log(1,"Message received over IPv4 link\n");
};
if(proto==UDP) {
log(1,"SIP message received over UDP\n");
};
if(status=="200") {
log(1,"this is a 200 OK reply\n");
};
if(uri==myself) {
log(1,"the request is for local processing\n");
};
}
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Google - One
2014-10-01 06:45:10 UTC
Permalink
Hi Daniel

I've tried a couple of incantations;
kamailio -e
kamailio -E
and a combination of the two.

That's all.
How did you start it?
Daniel
Sorry Guys, I'm very new to this. Taking a dive 'under the hood', to try to learn what is going on, and to see what I can achieve.
I have 1 sip device ( voip telephone) on the network, constantly firing out REGISTER requests (I have turned off my asterisk server!). That's good.
I have a terminal window open, running tcpdump. That's good too - I can see what is going on.
I also have kamailio - giving me absolutely nothing. It's not complicated config file. In fact it is the simplest I could do. However, it logs nothing - and i am expecting it to.
Can someone put me out of my misery, and point out the glaring error I have?
How can I send messages to STDERR while testing?
Cheers,
Phil
----
## WARNING - FOR TESTING & EDUCTION ONLY
####### Global Parameters #########
debug=5
fork=no
log_stderror=yes
port=5060
####### Modules Section ########
# set module path
mpath="/usr/local/lib/kamailio/modules/"
loadmodule "sl.so"
####### Routing Logic ########
route{
if(method=="REGISTER") {
log(1,"this SIP request is a REGISTER message\n");
sl_send_reply("404", "No registrar");
};
if (af!=INET6) {
log(1,"Message received over IPv4 link\n");
};
if(proto==UDP) {
log(1,"SIP message received over UDP\n");
};
if(status=="200") {
log(1,"this is a 200 OK reply\n");
};
if(uri==myself) {
log(1,"the request is for local processing\n");
};
}
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Daniel-Constantin Mierla
2014-10-01 07:22:25 UTC
Permalink
Hello,

can you check if there are log messages in syslog file? have you checked
that kamailio is running?

Daniel
Post by Google - One
Hi Daniel
I've tried a couple of incantations;
kamailio -e
kamailio -E
and a combination of the two.
That's all.
How did you start it?
Daniel
Post by White, Phil
Sorry Guys, I'm very new to this. Taking a dive 'under the hood', to
try to learn what is going on, and to see what I can achieve.
I have 1 sip device ( voip telephone) on the network, constantly
firing out REGISTER requests (I have turned off my asterisk
server!). That's good.
I have a terminal window open, running tcpdump. That's good too - I
can see what is going on.
I also have kamailio - giving me absolutely nothing. It's not
complicated config file. In fact it is the simplest I could do.
However, it logs nothing - and i am expecting it to.
Can someone put me out of my misery, and point out the glaring error I have?
How can I send messages to STDERR while testing?
Cheers,
Phil
----
## WARNING - FOR TESTING & EDUCTION ONLY
####### Global Parameters #########
debug=5
fork=no
log_stderror=yes
port=5060
####### Modules Section ########
# set module path
mpath="/usr/local/lib/kamailio/modules/"
loadmodule "sl.so"
####### Routing Logic ########
route{
if(method=="REGISTER") {
log(1,"this SIP request is a REGISTER message\n");
sl_send_reply("404", "No registrar");
};
if (af!=INET6) {
log(1,"Message received over IPv4 link\n");
};
if(proto==UDP) {
log(1,"SIP message received over UDP\n");
};
if(status=="200") {
log(1,"this is a 200 OK reply\n");
};
if(uri==myself) {
log(1,"the request is for local processing\n");
};
}
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda -http://www.linkedin.com/in/miconda
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Google - One
2014-10-01 12:19:29 UTC
Permalink
Hi Daniel

Now you're making me paranoid!

Line 2 & 3 of the config file I interpret as "don't fork, don't background, send all log messages to STDERR.
When proxy is started, yes it runs fine (at least I get a lot of output, including being informed what interface & port it is listening on). There is nothing in /var/log/messages - and because of the config, I would not expect there to be.

Am I missing something really embarrassingly basic here?

Cheers
Post by Daniel-Constantin Mierla
Hello,
can you check if there are log messages in syslog file? have you checked that kamailio is running?
Daniel
Post by Google - One
Hi Daniel
I've tried a couple of incantations;
kamailio -e
kamailio -E
and a combination of the two.
That's all.
How did you start it?
Daniel
Sorry Guys, I'm very new to this. Taking a dive 'under the hood', to try to learn what is going on, and to see what I can achieve.
I have 1 sip device ( voip telephone) on the network, constantly firing out REGISTER requests (I have turned off my asterisk server!). That's good.
I have a terminal window open, running tcpdump. That's good too - I can see what is going on.
I also have kamailio - giving me absolutely nothing. It's not complicated config file. In fact it is the simplest I could do. However, it logs nothing - and i am expecting it to.
Can someone put me out of my misery, and point out the glaring error I have?
How can I send messages to STDERR while testing?
Cheers,
Phil
----
## WARNING - FOR TESTING & EDUCTION ONLY
####### Global Parameters #########
debug=5
fork=no
log_stderror=yes
port=5060
####### Modules Section ########
# set module path
mpath="/usr/local/lib/kamailio/modules/"
loadmodule "sl.so"
####### Routing Logic ########
route{
if(method=="REGISTER") {
log(1,"this SIP request is a REGISTER message\n");
sl_send_reply("404", "No registrar");
};
if (af!=INET6) {
log(1,"Message received over IPv4 link\n");
};
if(proto==UDP) {
log(1,"SIP message received over UDP\n");
};
if(status=="200") {
log(1,"this is a 200 OK reply\n");
};
if(uri==myself) {
log(1,"the request is for local processing\n");
};
}
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Google - One
2014-10-02 18:57:37 UTC
Permalink
Sorry. Now fixed.
I was missing the obvious.
route section works as expected.
Apologies for the noise.

Regards
Phil
Post by Daniel-Constantin Mierla
Hello,
can you check if there are log messages in syslog file? have you checked that kamailio is running?
Daniel
Post by Google - One
Hi Daniel
I've tried a couple of incantations;
kamailio -e
kamailio -E
and a combination of the two.
That's all.
How did you start it?
Daniel
Sorry Guys, I'm very new to this. Taking a dive 'under the hood', to try to learn what is going on, and to see what I can achieve.
I have 1 sip device ( voip telephone) on the network, constantly firing out REGISTER requests (I have turned off my asterisk server!). That's good.
I have a terminal window open, running tcpdump. That's good too - I can see what is going on.
I also have kamailio - giving me absolutely nothing. It's not complicated config file. In fact it is the simplest I could do. However, it logs nothing - and i am expecting it to.
Can someone put me out of my misery, and point out the glaring error I have?
How can I send messages to STDERR while testing?
Cheers,
Phil
----
## WARNING - FOR TESTING & EDUCTION ONLY
####### Global Parameters #########
debug=5
fork=no
log_stderror=yes
port=5060
####### Modules Section ########
# set module path
mpath="/usr/local/lib/kamailio/modules/"
loadmodule "sl.so"
####### Routing Logic ########
route{
if(method=="REGISTER") {
log(1,"this SIP request is a REGISTER message\n");
sl_send_reply("404", "No registrar");
};
if (af!=INET6) {
log(1,"Message received over IPv4 link\n");
};
if(proto==UDP) {
log(1,"SIP message received over UDP\n");
};
if(status=="200") {
log(1,"this is a 200 OK reply\n");
};
if(uri==myself) {
log(1,"the request is for local processing\n");
};
}
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Loading...