Just out of curiousity has anyone been able to properly implement jabber
with Ser?
I keep getting an error when trying to initialize the jabber.so file.
Any ideas?
Thanks!
Todd
Thanks. Unfortunately I still can.t connect using iptel web client. Anyone?
-----Original Message-----
From: Andy Blen [mailto:andy.blen@iptel.org]
Sent: Thu 6/19/2003 11:44 AM
To: Marcelo Schmidt; serusers(a)lists.iptel.org
Cc:
Subject: Re: [Serusers] ser 0.8.10 (i386/freebsd)
Reading documentation may be very helpful to you, in particular
http://www.iptel.org/ser/doc/seruser-html/x878.html#AEN883
-andy
At 07:27 PM 6/19/2003, Marcelo Schmidt wrote:
>I installed ser yesterday and I was trying to get an UA to connect to it. I created just one user:
><sip:marcelo@marcelo.homeunix.com> and used an iptel.org account to send a message, I got:
>483 Too Many Hops. I attached the ser.cfg and a capture file from tcpdump.
>
>Thanks,
>Marcelo.
>
>
>
>_______________________________________________
>Serusers mailing list
>serusers(a)lists.iptel.org
>http://lists.iptel.org/mailman/listinfo/serusers
--
Andy Blen
iptel.org Services
Hi,
Consider the following scenario. UA1 is trying to call UA2 both
registered with the same proxy. (UA1 -> 'ser' -> UA2)
1.
UA1 sends INVITE to the proxy with request uri set to UA2. It also sets
the Route header in the invite to that of the proxy.
This returns a 483 - too many hops to UA1
It seems that in the above mentioned scenario, the proxy loops back the
INVITE multiple times locally. This decrements the Max Forwards value
every time until it becomes zero and hence sends 483 back to UA1. It
seems to me this is not the correct behavior of the server. It should
forward the request to UA2.
Thanks in advance,
Chintan
-- Start trace --
U 2003/06/20 15:24:42.362466 192.1.2.88:5060 -> 192.1.2.17:5060
INVITE sip:9727610001@192.1.2.17 SIP/2.0.Via: SIP/2.0/UDP
192.1.2.88:5060;b
ranch=z9hG4bK421668676.Max-Forwards: 70.From: 9727619271
<sip:9727619271@19
2.1.2.88>;tag=421668676.To: 9727610001
<sip:9727610001@192.1.2.17>.Call-ID:
421668676(a)192.1.2.88.CSeq: 1 INVITE.Contact:
<sip:9727619271@192.1.2.88>.C
ontent-Type: application/sdp.Content-Length: 138.Route:
<sip:192.1.2.17;lr>
..v=0.o=username 421668676 421668676 IN IP4 192.1.2.88.s=Session
SDP.c=IN I
P4 192.1.2.88.t=0 0.m=audio 54454 RTP/AVP 0.a=rtpmap:0 PCMU/8000.
U 2003/06/20 15:24:42.363813 192.1.2.17:5060 -> 192.1.2.88:5060
SIP/2.0 100 trying -- your call is important to us..Via: SIP/2.0/UDP
192.1.
2.88:5060;branch=z9hG4bK421668676..From: 9727619271
<sip:9727619271@192.1.2
.88>;tag=421668676.To: 9727610001 <sip:9727610001@192.1.2.17>.Call-ID:
4216
68676(a)192.1.2.88.CSeq: 1 INVITE.Server: Sip EXpress router
(0.8.11pre29 (i3
86/linux))..Content-Length: 0..Warning: 392 192.1.2.17:5060 "Noisy
feedback
tells: pid=15107 req_src_ip=192.1.2.88 req_src_port=5060
in_uri=sip:97276
10001(a)192.1.2.17 out_uri=sip:9727610001@192.1.2.17 via_cnt==1"....
#
U 2003/06/20 15:24:42.794681 192.1.2.17:5060 -> 192.1.2.88:5060
SIP/2.0 483 Too Many Hops..Via: SIP/2.0/UDP
192.1.2.88:5060;branch=z9hG4bK4
21668676..From: 9727619271
<sip:9727619271@192.1.2.88>;tag=421668676.To: 97
27610001
<sip:9727610001@192.1.2.17>;tag=b27e1a1d33761e85846fc98f5f3a7e58.4
632.Call-ID: 421668676(a)192.1.2.88.CSeq: 1 INVITE.Server: Sip EXpress
router
(0.8.11pre29 (i386/linux))..Content-Length: 0..Warning: 392
192.1.2.17:506
0 "Noisy feedback tells: pid=15107 req_src_ip=192.1.2.17
req_src_port=5060
in_uri=sip:9727610001@192.1.2.17 out_uri=sip:9727610001@192.1.2.17
via_cnt
==71"....
-- End trace --
ps: We checked it with loose routing(suceeding ';lr' present in URIs in
Route) as well as strict routing(suceeding ';lr' not present in URIs in
Route). Should the type of routing used matter ?
Hello everyone,
I am playing around with the new CVS ser 0.8.11pre28
downloaded couple days ago. I am attaching my config
script and also the output of syslog with errors. Afer
I start ser it starts forking new processes until it
crashes the box (fills up the memory).
The script is little advanced, uses jabber,pa,msilo...
Thanks for your help. You are doing great job. Can't
wait till next release.
Peter.
ser.cfg:
--------
#
# $Id: ser.cfg,v 1.19 2003/05/07 11:56:44 janakj Exp $
#
# simple quick-start config script
#
# ----------- global configuration parameters
------------------------
debug=3 # debug level (cmd line: -dddddddddd)
fork=yes
log_stderror=no # (cmd line: -E)
/* Uncomment these lines to enter debugging mode
debug=7
fork=no
log_stderror=yes
*/
check_via=yes # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
port=5060
children=4
fifo="/tmp/ser_fifo"
# ------------------ module loading
----------------------------------
# Uncomment this if you want to use SQL database
loadmodule "/usr/local/lib/ser/modules/mysql.so"
loadmodule "/usr/local/lib/ser/modules/print.so"
loadmodule "/usr/local/lib/ser/modules/textops.so"
loadmodule "/usr/local/lib/ser/modules/sl.so"
loadmodule "/usr/local/lib/ser/modules/tm.so"
loadmodule "/usr/local/lib/ser/modules/rr.so"
loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
loadmodule "/usr/local/lib/ser/modules/msilo.so"
loadmodule "/usr/local/lib/ser/modules/usrloc.so"
loadmodule "/usr/local/lib/ser/modules/registrar.so"
loadmodule "/usr/local/lib/ser/modules/jabber.so"
loadmodule "/usr/local/lib/ser/modules/pa.so"
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
#loadmodule "/usr/local/lib/ser/modules/auth.so"
#loadmodule "/usr/local/lib/ser/modules/auth_db.so"
# ----------------- setting module-specific parameters
---------------
# -- usrloc params --
#modparam("usrloc", "db_mode", 0)
# Uncomment this if you want to use SQL database
# for persistent storage and comment the previous line
modparam("usrloc", "db_mode", 2)
modparam("usrloc", "db_url",
"sql://nser:heslo@localhost/nser")
modparam("msilo", "db_url",
"sql://nser:heslo@localhost/nser")
#modparam("msilo", "registrar",
"sip:registrar@deimos")
# -- auth params --
# Uncomment if you are using auth module
#
#modparam("auth_db", "calculate_ha1", yes)
#
# If you set "calculate_ha1" parameter to yes (which
true in this config),
# uncomment also the following parameter)
#
#modparam("auth_db", "password_column", "password")
modparam("jabber", "db_url",
"sql://sip_jab:heslo@localhost/sip_jab")
modparam("jabber", "jaddress", "test")
modparam("jabber", "jport", 5222)
modparam("jabber", "workers", 2)
modparam("jabber", "max_jobs", 10)
modparam("jabber", "aliases",
"5;aim.test;icq.test;msn.test;yahoo.test;jabber.test;")
modparam("jabber", "jdomain", "jabber.test")
# ------------------------- 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");
break;
};
if (len_gt( max_len )) {
sl_send_reply("513", "Message too big");
break;
};
# we record-route all messages -- to make sure that
# subsequent messages will go through our proxy;
that's
# particularly good if upstream and downstream
entities
# use different transport protocol
record_route();
# loose-route processing
loose_route();
# if the request is for other domain use UsrLoc
# (in case, it does not work, use the following
command
# with proper names and addresses in it)
if (uri==myself) {
if (method=="REGISTER") {
# Uncomment this if you want to use digest
authentication
# if (!www_authorize("iptel.org", "subscriber")) {
# www_challenge("iptel.org", "0");
# break;
# };
save("location");
if (search("egistration")) {
log("XJAB: going online in Jabber net\n");
if (jab_go_online()) {
sl_send_reply("200", "Accepted");
} else {
sl_send_reply("404", "Not Found");
};
} else {
log("XJAB: going offline in Jabber net\n");
if (jab_go_offline()) {
sl_send_reply("200", "Accepted");
} else {
sl_send_reply("404", "Not Found");
};
}; # egistrarion
if (m_dump()) {
log("MSILO: offline msgs dumped\n");
} else {
log("MSILO: no offline msgs dumped\n");
};
break;
}; # register
if (method=="SUBSCRIBE") {
if (t_newtran()) {
handle_subscription("registrar");
};
break;
}; # subsribe
# native SIP destinations are handled using our
USRLOC DB
if (!lookup("location")) {
if (method=="MESSAGE") {
log("MESSAGE received -> storing\n");
if (!t_newtran()) {
sl_reply_error();
break;
};
if (m_store("0")) {
log("MSILO: offline msg stored\n");
if (!t_reply("202","Accepted")) {
sl_reply_error();
};
} else {
log("MSILO: offline msg not stored\n");
if (!t_reply("503","Service Unavailable")) {
sl_reply_error();
};
};
break;
}; # message
sl_send_reply("404", "Not Found");
break;
}; # lookup
}; # myself
if ( search("To:.*@aim\.test") ||
search("To:.*@icq\.test") ||
search("To:.*@msn\.test") ||
search("To:.*@yahoo\.test") ||
search("To:.*@jabber\.test") ) {
if (!t_newtran()) {
sl_reply_error();
break;
};
if (method=="MESSAGE") {
log("MESSAGE received -> manage it w/ XJAB\n");
if (search("\n:on")) {
if (jab_go_online()) {
sl_send_reply("200", "Accepted");
} else {
sl_send_reply("404", "Not Found");
};
break;
};
if (search("\n:off")) {
if (jab_go_offline()) {
sl_send_reply("200", "Accepted");
} else {
sl_send_reply("404", "Not Found");
};
break;
};
if (search("\n:join")) {
if (jab_join_jconf()) {
sl_send_reply("200", "Accepted");
} else {
sl_send_reply("404", "Not Found");
};
break;
};
if (search("\n:exit")) {
if (jab_exit_jconf()) {
sl_send_reply("200", "Accepted");
} else {
sl_send_reply("404", "Not Found");
};
break;
};
if (jab_send_message()) {
sl_send_reply("202", "Accepted");
} else {
sl_send_reply("503", "Service Unavailable");
};
break;
};
if (method=="SUBSCRIBE") {
handle_subscription("jabber");
break;
};
log("NON_MESSAGE request received for Jabber GW ->
dropt\n");
sl_send_reply("202", "Accepted");
break;
};
# forward to current uri now; use stateful
forwarding; that
# works reliably even if we forward from TCP to UDP
if (!t_relay()) {
sl_reply_error();
};
}
error log from /var/log/messages:
---------------------------------
May 29 10:58:11 hat /usr/local/sbin/ser[2180]: ERROR:
parse_to: invalid To - unexpected end of header in
state -1073745156
May 29 10:58:11 hat /usr/local/sbin/ser[2180]:
send_xpidf_notify(): Error while
parsing
May 29 10:58:11 hat /usr/local/sbin/ser[2180]:
handle_subscription(): Error while sending notify
May 29 10:58:11 hat /usr/local/sbin/ser[2180]: ERROR:
t_reply: can't generate 200 reply when a final 200 was
sent out
May 29 10:58:11 hat /usr/local/sbin/ser[2180]:
send_reply(): Error while sending 200 OK
May 29 10:58:23 hat /usr/local/sbin/ser[2178]: ERROR:
parse_to: invalid To - unexpected end of header in
state -1073745156
May 29 10:58:23 hat /usr/local/sbin/ser[2178]:
send_xpidf_notify(): Error while
parsing
May 29 10:58:23 hat /usr/local/sbin/ser[2178]:
handle_subscription(): Error while sending notify
May 29 10:58:23 hat /usr/local/sbin/ser[2178]: ERROR:
t_reply: can't generate 200 reply when a final 200 was
sent out
May 29 10:58:23 hat /usr/local/sbin/ser[2178]:
send_reply(): Error while sending 200 OK
May 29 10:58:29 hat /usr/local/sbin/ser[2210]:
XJAB:xjab_check_workers: worker[0][pid=2217] has
exited - status=0 err=-1 errno=10
May 29 10:58:11 hat /usr/local/sbin/ser[2180]: ERROR:
parse_to: invalid To - unexpected end of header in
state -1073745156
May 29 10:58:11 hat /usr/local/sbin/ser[2180]:
send_xpidf_notify(): Error while
parsing
May 29 10:58:11 hat /usr/local/sbin/ser[2180]:
handle_subscription(): Error while sending notify
May 29 10:58:11 hat /usr/local/sbin/ser[2180]: ERROR:
t_reply: can't generate 200 reply when a final 200 was
sent out
May 29 10:58:11 hat /usr/local/sbin/ser[2180]:
send_reply(): Error while sending 200 OK
May 29 10:58:23 hat /usr/local/sbin/ser[2178]: ERROR:
parse_to: invalid To - unexpected end of header in
state -1073745156
May 29 10:58:23 hat /usr/local/sbin/ser[2178]:
send_xpidf_notify(): Error while
parsing
May 29 10:58:23 hat /usr/local/sbin/ser[2178]:
handle_subscription(): Error while sending notify
May 29 10:58:23 hat /usr/local/sbin/ser[2178]: ERROR:
t_reply: can't generate 200 reply when a final 200 was
sent out
May 29 10:58:23 hat /usr/local/sbin/ser[2178]:
send_reply(): Error while sending 200 OK
May 29 10:58:29 hat /usr/local/sbin/ser[2210]:
XJAB:xjab_check_workers: worker[0][pid=2217] has
exited - status=0 err=-1 errno=10
May 29 10:58:29 hat /usr/local/sbin/ser[2210]:
XJAB:xjab_check_workers: worker[1][pid=2218] has
exited - status=0 err=-1 errno=10
May 29 10:58:29 hat /usr/local/sbin/ser[2216]:
XJAB:xjab_check_workers: worker[0][pid=2243] has
exited - status=0 err=-1 errno=10
May 29 10:58:29 hat /usr/local/sbin/ser[2216]:
XJAB:xjab_check_workers: worker[1][pid=2244] has
exited - status=0 err=-1 errno=10
May 29 10:58:29 hat /usr/local/sbin/ser[2213]:
XJAB:xjab_check_workers: worker[0][pid=2245] has
exited - status=0 err=-1 errno=10
May 29 10:58:29 hat /usr/local/sbin/ser[2213]:
XJAB:xjab_check_workers: worker[1][pid=2246] has
exited - status=0 err=-1 errno=10
May 29 10:58:40 hat dhcpd: DHCPDISCOVER from
00:90:b1:59:0e:00 via eth0: network 200.200.52.0/24:
no free leases
May 29 10:58:49 hat /usr/local/sbin/ser[2210]:
XJAB:xjab_check_workers: worker[0][pid=2247] has
exited - status=0 err=-1 errno=10
May 29 10:58:49 hat /usr/local/sbin/ser[2210]:
XJAB:xjab_check_workers: worker[1][pid=2248] has
exited - status=0 err=-1 errno=10
May 29 10:58:49 hat /usr/local/sbin/ser[2216]:
XJAB:xjab_check_workers: worker[0][pid=2249] has
exited - status=0 err=-1 errno=10
May 29 10:58:49 hat /usr/local/sbin/ser[2216]:
XJAB:xjab_check_workers: worker[1][pid=2250] has
exited - status=0 err=-1 errno=10
May 29 10:58:49 hat /usr/local/sbin/ser[2213]:
XJAB:xjab_check_workers: worker[0][pid=2251] has
exited - status=0 err=-1 errno=10
May 29 10:58:49 hat /usr/local/sbin/ser[2213]:
XJAB:xjab_check_workers: worker[1][pid=2252] has
exited - status=0 err=-1 errno=10
__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com
Hi,
has anyone ported ser to Mac OS X? It is freeBSD so it should be
easy, but as usual, things not always are easy :-)
So before i take a plunge, I thought I'd ask.
/hans
Hi,
I want SER to handle forwarding multicast requests.
To do that, I want to realise this scenario :
All the UACs which want to belong to the multicast group need to register
themselves with the same multicast URI.
When SER receive request with that multicast URI, it looks for all the
contacts for the username of that URI in usrloc (with lookup() function call)
and then forward the request to all the contacts found (with t_relay()
function call).
But I don't want SER to forward the request to the sender.
That's why I want to ensure myself that URIs which have been added to the
destination set and the one which rewrites the request URI (after the
lookup() function call) don't match with SIP URI in the Contact header field
of the processing request.
Here is the test code :
###########################
Server: Sip EXpress router (0.8.11pre29 (i386/linux))
Platform: GNU/Linux 2.4.18-14 i686
###########################
# ------------------ module loading ----------------------------------
loadmodule "/usr/local/lib/ser/modules/mysql.so"
loadmodule "/usr/local/lib/ser/modules/sl.so"
loadmodule "/usr/local/lib/ser/modules/tm.so"
loadmodule "/usr/local/lib/ser/modules/usrloc.so"
loadmodule "/usr/local/lib/ser/modules/registrar.so"
# ----------------- setting module-specific parameters ---------------
# -- registrar params --
# to add contacts in the destination set
modparam("registrar", "append_branches", 1)
# -- usrloc params --
# use SQL database for persistent storage
modparam("usrloc", "db_mode", 1)
# ------------------------- request routing logic -------------------
# main routing logic
route{
if (uri==myself)
{
(...)
# registering
if (method=="REGISTER")
{
save("location");
break;
};
(...)
# to find contacts, rewrite request URI and
# add contacts to the destination set
if (!lookup("location"))
{
sl_send_reply("404","not found");
break;
};
# Here I want to compare the destination set
# and the rewrited request URI with the Contact header
# field of the processing request before forwarding
...
# forward
if (!t_relay())
{
sl_reply_error();
break;
};
(...)
}else{
(...)
}
}
################
I think it's not possible using only ser script functionalities. I think I
have to write a specific function in a specific module to do that (based on
lookup() function).
What do you think about it ? Any suggestions are welcomed.
Thanks in advance.
Matthieu Saunier
If you are using following scripts, then you problem may be caused by the
additional ^ after =~ expression. I am a new comer to both SER and RegEx, so
I do not know why this ^ is added in some of the example scripts. Remove it
and try again.
______________________
if (uri=~"^sip:[0-9]*") {
forward (192.168.15.41,5060); # 192.168.15.41 is my CISCO SIP2PSTN
~~~~~~~~~~~~~~~~~~~~~~
Younger Wang
----- Original Message -----
From: Jade Chen Yan
To: 'Younger Wang'
Sent: Thursday, June 19, 2003 12:15 AM
Subject: RE: [Serusers] ser.cfg for PSTN GW
thank u very much.
my configuration.
serrouter 's IP addr : 172.30.10.230
the PSTN GW addr: 192.168.15.41 at the gateway, there is a phone num 8010
the invite uri from my sipphone to SER is "sip:8010@172.30.10.230"
I hope after the statement rewritehostport("192.168.15.41:5060"); the
invite message's uri will be changed to "sip: 8010(a)192.168.15.41"
but from the CISCO's GW, i found the uri is the same as the original. that
is :"sip:8010@172.30.10.230"
so the GW return an 400 invalid IP addr error.
Regards,
Jade
-----Original Message-----
From: Younger Wang [mailto:wygmail@yeah.net]
Sent: Friday, June 20, 2003 6:00 AM
To: jade(陈雁); serusers(a)lists.iptel.org
Subject: Re: [Serusers] ser.cfg for PSTN GW
It seems ok with your syntax. Should you give more detail?
----- Original Message -----
From: Jade Chen Yan <mailto:jade@tencent.com>
To: 'Younger Wang' <mailto:wygmail@yeah.net> ; serusers(a)lists.iptel.org
Sent: Wednesday, June 18, 2003 11:46 PM
Subject: RE: [Serusers] ser.cfg for PSTN GW
thank u for your kindly reply . the ser can be started. by I alway got the
400 "invilid ip addr"error.
i use the following to provide the GW IP
#forward (192.168.15.41,5060);
#rewritehostport("192.168.15.41:5060");
t_relay_to( "192.168.15.41", "5060");
each of which cannot work out .got the same error.
can u give me other suggestions.?
-----Original Message-----
From: Younger Wang [mailto:wygmail@yeah.net]
Sent: Friday, June 20, 2003 4:51 AM
To: jade(陈雁); serusers(a)lists.iptel.org
Subject: Re: [Serusers] ser.cfg for PSTN GW
Please add a semicolon ';' after the last '}'
Younger Wang
----- Original Message -----
From: Jade Chen Yan <mailto:jade@tencent.com>
To: serusers(a)lists.iptel.org
Sent: Wednesday, June 18, 2003 10:41 PM
Subject: [Serusers] ser.cfg for PSTN GW
hi, all,
whenever I add the following lines in the ser.cfg, the ser cannot start up.
:
#for PSTN gateway
if (uri=~"^sip:[0-9]*") {
forward (192.168.15.41,5060); # 192.168.15.41 is my CISCO SIP2PSTN
GW.
#rewritehostport("192.168.15.41","5060")
break;
}
I just add in the default ser.cfg.
when I comment these lines. the ser can be started.
if (uri==myself) {
if (method=="REGISTER") {
# Uncomment this if you want to use digest authentication
# if (!www_authorize("iptel.org", "subscriber")) {
# www_challenge("iptel.org", "0");
# break;
# };
save("location");
break;
};
#for PSTN gateway
#if (uri=~"sip:8010") {
# forward (192.168.15.41,5060);
# #rewritehostport("192.168.15.41","5060")
# break;
#}
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
break;
};
};
can anyone tell me what 's wrong with these line.
Best Regards,
Jade
_____
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers