SearchSearch  Log in to check your private messagesLog in to check your private messages  recent posts Recent Posts
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
rajesh8421Offline



Joined: Feb 04, 2009
Posts: 27

Status: Offline
Posted: Apr 08, 2009 - 01:11 PM Reply with quote Back to top
Hi ,
Iam new to openser.I have managed to configure presence module,but i get some error.I would appreciate if you could correct me(my cfg file).



debug=7 # debug level (cmd line: -dddddddddd)
log_stderror=yes

check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
listen=udp:192.168.64.10:5060
children=4

mpath="/usr/local/lib/openser/modules/"

loadmodule "mysql.so"
loadmodule "sl.so"
loadmodule "maxfwd.so"
loadmodule "textops.so"
loadmodule "tm.so"
loadmodule "rr.so"
loadmodule "presence.so"
loadmodule "avpops.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "mi_fifo.so"
loadmodule "/usr/local/lib/openser/modules/auth.so"
loadmodule "/usr/local/lib/openser/modules/auth_db.so"

modparam("usrloc", "db_mode", 2)
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password")
modparam("rr", "enable_full_lr", 1)
modparam("presence|usrloc","db_url","mysql://openser:openserrw@192.168.64.10/openser")
modparam("presence","max_expires",3600)
modparam("presence","force_active",1)
modparam("presence","192.168.64.180", "3000:192.168.64.10:5060" )
modparam("mi_fifo","fifo_name", "/tmp/openser_fifo")

# ------------------------- request routing logic -------------------

# main routing logic

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");
exit;
};

if (msg:len >= 2048 ) {
sl_send_reply("513", "Message too big");
exit;
};
if (!method=="REGISTER")
record_route();
if (loose_route()) {
# mark routing logic in request
append_hf("P-hint: rr-enforced\r\n");
route(1);
};

if (!uri==myself) {
append_hf("P-hint: outbound\r\n");
route(1);
};
if (uri==myself) {

if( is_method("PUBLISH|SUBSCRIBE"))
route(2);

if (method=="REGISTER") {


if (!www_authorize("192.168.64.10", "subscriber")) {
www_challenge("192.168.64.10", "0");
exit;
};

save("location");
exit;
};
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
exit;
};
append_hf("P-hint: usrloc applied\r\n");
};

route(1);
}
route[1] {
# send it out now; use stateful forwarding as it works reliably
# even for UDP2TCP
if (!t_relay()) {
sl_reply_error();
};
exit;
}
route[2]
{
# absorb retransmissions
if (! t_newtran())
{
sl_reply_error();
exit;
};

if(is_method("PUBLISH"))
{
handle_publish();
t_release();
} else if( is_method("SUBSCRIBE")) {
handle_subscribe();
t_release();
};

exit;
}
View user's profile Send private message
micondaOffline



Joined: Feb 02, 2007
Posts: 356
Location: Germany
Status: Offline
Posted: Apr 08, 2009 - 07:05 PM Reply with quote Back to top
I recommend you update to latest openser/kamailio 1.5.0 because you get the default config file with presence support and very easy to enable it via a 'sed' command.

See here the howto:
http://www.kamailio.org/dokuwiki/doku.p ... x-from-svn

Then read and follow the guidelines from the config file: /usr/local/etc/kamailio.cfg
View user's profile Send private message


View previous topic Printable version Log in to check your private messages View next topic

Post new topic   Reply to topic
Forum Rules and Guidelines | About VoIP User | Privacy Policy


All logos and trademarks in this site are property of their respective owner.
Comments and posts are property of the poster, all the rest (c) 2003-2008 VoIP User Limited.

VoIP User Limited is incorporated in England and Wales under Company Number 6694577.

No part of this site may be reproduced without our prior consent.