Hi,
I'm working on a project and i'm using ser as a sip server and webser as it's web interface.
actually i have this problem: every time i send an instant message to a subscriber i get this error message:
483 too many hops
i tried to fix it but i couldn't and i don't know what to do !
if any one can help me i'll be very grateful
thank you in advance
samer
i'm using ser 0.9.3 & here's my code:
#
# $Id: ser.cfg,v 1.25.2.1 2005/02/18 14:30:44 andrei 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
#fork=no
log_stderror=yes
check_via=no # (cmd. line: -v)
dns=yes # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
#port=5060
#children=4
fifo="/tmp/ser_fifo"
fifo_mode=0666
fifo_db_url="mysql://ser:password@localhost/ser"
alias=domain.com
# ------------------ module loading ----------------------------------
# Uncomment this if you want to use SQL database
loadmodule "/usr/lib/ser/modules/mysql.so"
loadmodule "/usr/lib/ser/modules/sl.so"
loadmodule "/usr/lib/ser/modules/tm.so"
loadmodule "/usr/lib/ser/modules/rr.so"
loadmodule "/usr/lib/ser/modules/maxfwd.so"
loadmodule "/usr/lib/ser/modules/usrloc.so"
loadmodule "/usr/lib/ser/modules/registrar.so"
loadmodule "/usr/lib/ser/modules/textops.so"
loadmodule "/usr/lib/ser/modules/pa.so"
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
loadmodule "/usr/lib/ser/modules/auth.so"
loadmodule "/usr/lib/ser/modules/auth_db.so"
# ----------------- setting module-specific parameters ---------------
# -- usrloc params --
modparam("usrloc", "db_url", "mysql://ser:password@localhost/ser")
#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)
# -- auth params --
# Uncomment if you are using auth module
modparam("auth", "secret", "123123123")
modparam("auth_db", "db_url", "mysql://ser:heslo@localhost/ser")
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")
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
# ------------------------- 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 (msg:len >= 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
if (!method=="REGISTER") record_route();
# subsequent messages withing a dialog should take the
# path determined by record-routing
if (loose_route()) {
# mark routing logic in request
append_hf("P-hint: rr-enforced\r\n");
route(1);
break;
};
if (!uri==myself) {
# mark routing logic in request
append_hf("P-hint: outbound\r\n");
route(1);
break;
};
# 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("domain.com", "subscriber")) {
www_challenge("domain.com", "0");
break;
};
save("location");
break;
};
lookup("aliases");
if (!uri==myself) {
append_hf("P-hint: outbound alias\r\n");
route(1);
break;
};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
break;
};
};
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();
};
}
I am not sure where I am failing on the expressions. What I am trying to do
is if the source
Ip is correct along with the methods I want to send it to a possible of two
places
one is to a pstn if it is not for the pstn maybe they are trying to reach a
user that is registered
with the local domain.
It works on the pstn. On the local domain even if the src_ip is wrong it
still forwards the request as
long as it sees the prefix 555555. I want the src_ip to be correct also on
the request.
-------- snippet --------
if (src_ip==xxx.xxx.xxx.xxx & method=="INVITE" || method=="ACK" ||
method=="BYE") {
if (uri=~"^sip:55555[0-9]{11}@") {
strip(5);
setflag(1);
record_route();
rewritehost("xxx.xxx.xxx.xxx"); #pstn
};
if ( (uri=~"^sip:55555[0-9]{7}@") |
(uri=~"^sip:55555[0-9]{10}@") ) {
strip(5);
record_route();
route(2); # local users
break;
};
}
------------ snippet end ----------------------
Would also like to be able to relay FWD requests
Any thoughts ?
Thanks
Mr. B
Hello all,
I plan to use SER with MediaProxy as a far-end NAT traversal solution. As much as I understand, SER Proxy server does the actual RTP traffic forwarding between the parties.
Using SER with MediaProxy only as a far-end NAT traversal solution (or using RTProxy) can I forward register to a 3rd party Proxy /registrar or the nated parties have to register with SER ?
Thanks for any help,
GTel
An additional remark:
What is the difference between t_relay and t_relay_to_udp when t_relay does
not use NAPTR and does only an SRV lookup towards udp?
regards
Franz
_______________________________________________
Users mailing list
Users(a)openser.org
http://openser.org/cgi-bin/mailman/listinfo/users
hello,
I read
http://www.voip-info.org/tiki-index.php?page=Asterisk+at+large
anybody could tell me more about this ?
Is it available with ARA ?
Regards
Harry
Method 3
Q: If you have your SIP phones registered with SER but
your voicemail is handled by asterisk, how do you get
the MWI (Message Waiting Indicator) light to function
on the phone?
A: In sip.conf create a section pointing at your SER
router.
[ser]
type=friend ; We allow incoming and
outgoing calls. Use peer if you are only doing MWI
context=ser ; This is the context
incoming calls land in
host=ser.server.tld ; This is the hostname or
IP address of your SER server
fromdomain=ser.server.rld ; This is your SER_DOMAIN
insecure=very ; This allows incoming
calls from the phones routing through ser to be passed
into asterisk
mailbox=user@context ; This is where you list
the voicemail boxes to monitor
This tells asterisk that if a voicemail comes in to
"user" then it needs to send a SIP NOTIFY message to
the "ser.server.tld" phone. Well this is all well and
good except how does SER deliver this NOTIFY to the
phones? First thing is that you need to make a tiny
change to the asterisk code to pass the mailbox user
in the SIP NOTIFY packet.
--- channels/chan_sip.c.orig Thu Jul 14 12:03:18
2005
+++ channels/chan_sip.c Thu Jul 14 12:05:26 2005
@@ -9710,6 +9710,7 @@
/* Called with peerl lock, but releases it */
struct sip_pvt *p;
int newmsgs, oldmsgs;
+ char *s;
/* Check for messages */
ast_app_messagecount(peer->mailbox, &newmsgs,
&oldmsgs);
@@ -9735,6 +9736,10 @@
/* Recalculate our side, and recalculate Call
ID */
if
(ast_sip_ouraddrfor(&p->sa.sin_addr,&p->ourip))
memcpy(&p->ourip, &__ourip,
sizeof(p->ourip));
+ strcpy(p -> username, peer -> mailbox); /*
Username = Mailbox name */
+ s = strchr(p -> username, '@'); /*
Remove the context part */
+ if (s != NULL)
+ *s = 0;
build_via(p, p->via, sizeof(p->via));
build_callid(p->callid, sizeof(p->callid),
p->ourip, p->fromdomain);
/* Send MWI */
After this patch is applied, the MWI NOTIFY messages
coming from asterisk will have the URI
user(a)ser.server.tld. This can be then routed with ser
to the correct phone with normal SER routing rules.
ie. SER does a lookup("location") and then a
t_relay(). I don't believe this patch should effect
any non-ser controlled sip phones.
For me, this method was a lot easier then Method 2
listed above. You can add as may mailbox's as you like
into the mailbox= line in the asterisk sip.conf file.
One possible problem is if you have a mailbox called
1000@cx1 and another called 1000@cx2, this patch will
make the MWI indicator light up for phone
1000(a)ser.server.tld when either mailbox gets a
message. A simple modification to the patch and SER
could be used to handle multiple contexts if required
however this simplification is sufficient for me.
___________________________________________________________________________
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
Téléchargez cette version sur http://fr.messenger.yahoo.com
Hi, I am trying to compile ser on my Mac OS X but it fails with:
...
gcc -bundle -bundle_loader ../../ser db_con.o db_mod.o dbase.o
my_con.o my_id.o my_pool.o res.o row.o utils.o val.o -L/usr/lib/
mysql -L/usr/local/lib -L/usr/local/lib/mysql -L/usr/local/mysql/lib/
mysql/ -L/usr/local/mysql/lib -L/usr/lib64/mysql -lmysqlclient -lz -o
mysql.so
ld: warning -L: directory name (/usr/lib/mysql) does not exist
ld: warning -L: directory name (/usr/local/mysql/lib/mysql/) does not
exist
ld: warning -L: directory name (/usr/lib64/mysql) does not exist
ld: Undefined symbols:
_fprintf$LDBLStub
_sprintf$LDBLStub
_printf$LDBLStub
_vsprintf$LDBLStub
make[1]: *** [mysql.so] Error 1
...
All the other modules compile and link fine. Anyone got any ideas?
/hans
[kuben:~/ser2] hans% gcc -v
Reading specs from /usr/libexec/gcc/darwin/ppc/3.3/specs
Thread model: posix
gcc version 3.3 20030304 (Apple Computer, Inc. build 1495)
...
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 450 to server version: 4.1.14-standard
Hello,
Did anybody try Jive Messenger server
http://www.jabber.org/software/JiveMessenger.shtml
with ser ?
Regards
Harry
___________________________________________________________________________
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
Téléchargez cette version sur http://fr.messenger.yahoo.com
Hello,
I set SER as sip proxy and ASTERISK as voicemail
server (ARA) and serweb as TUI (telephone user
interface) .
Serweb
|
Ua-------ser-------asterisk voicemail
| |
Mysql DB
I add user agents with address sip:name@domain +
aliases sip:123@domain where 123 is mailbox
I can forward voice messages to Asterisk with "failure
route" for status 408 or 486.
However I can't do it for offline users because of SER
look for addresses like sip:user@domain not
sip:123@domain where 123 is mailbox
How could I solve this problem if possible ?
Regards
Harry
___________________________________________________________________________
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
Téléchargez cette version sur http://fr.messenger.yahoo.com
Hello,
Can someone please enlighten me on if this is allowed to send BYE
before 200 OK? I thought that BYE should be used only after dialog
established, but now I have a SIP PSTN termination provider and they
appear to be sending BYE with route headers right after 183 Session Progress
in some cases.
So the session looks like the following:
UAC OpenSER PSTN Provider UAS
INVITE to openser
180 Trying back to UAC
INVITE to UAS
180 Trying back to openser
183 Session progress back to openser
183 Session Progress back to UAC
BYE to openser with Route headers
BYE to UAC (loose_routing)
200 OK to openser
200 OK to UAS
Is it ok?
And there's even more to it. I don't know if above is OK or not, but I would thought
that now the session is ended. Nonetheless in exactly 50 seconds I'm getting
183 Session progress back to openser
183 Session progress back to UAC
-- in another 60 seconds
183 Session progress back to openser
183 Session progress back to UAC
-- this happens 6 times every 60 seconds and then
408 Request Timeout back to openser
ACK to UAS
408 Request Timeout to UAC
ACK to openser
Do you think it's a provider bug?
Another question is how openser is routing replies that cannot be matched to transaction
as I think transaction has already been deleted after BYE and latest 183 replies were routed
by some other principle.
Could please someone comment on this?
Thanks,
See you later,
Michael