Hello,
I hope I'm not asking a really stupid question here, but here goes...
I'm setting up a new SER installation and have it running pretty
smoothly now for authenticated outbound traffic. The problem comes when
trying to route incoming traffic through.
My routing plans are pretty simple, when a number comes into SER,
see if it it's a registered SIP phone, if so send the call to it, and
if not, then authenticate the user, and send it to the PSTN gateway.
I thought this could easily be solved by having a lookup("location") as
the first part of my routing. However, I'm not really sure what lookup
looks up. I assume it's the user being dialed, such as if a call comes
in wanting sip:1234567890@x.x.x.x, lookup would look into the database
and see user "1234567890" matches a registered user, and go from there.
However, using lookup never returns a match, thus the call goes into a
loop since it's next stop is the PSTN gateway. I can see the phone has
registered by running serctl ul show.
Here's part of my routing I tried using, I may be incorrect in using
t_relay, but right now lookup is never true:
if (method=="INVITE") {
if (lookup("location")) {
log("LOG: SIP Phone found\n");
t_relay();
break;
} else if (uri=~"sip:[0-9]+@.*") {
if (!is_user_in("credentials", "local")) {
sl_send_reply("403", "Forbidden");
break;
};
rewritehostport("10.0.0.4:5060"); # PSTN GW
Brian
Thanks, that's a step in the right direction. I wasn't refering to
5551212 as direc assist (bad example on my part) though. I was just
wondering for to prefix the +1636 to 7 digits. In subst_uri I don't
think it can read avp variables, that's my problem since the ruri will
always be different. I was doing this to elminate all external scripts.
Thanks again.
-----Original Message-----
From: Java Rockx [mailto:javarockx@gmail.com]
Sent: Monday, April 18, 2005 9:39 AM
To: Matt Schulte
Cc: serusers(a)lists.iptel.org
Subject: Re: [Serusers] e164 rewrite script
Matt,
This is what I use to dial local directory assistance. When a
user dials 411 we rewrite the R-URI. So if use account 4073191122 dials
411 the R-URI gets massaged to 14075551212 and then sent out the PSTN
gateway.
Regards,
Paul
avp_write("$from", "i:34");
avp_pushto("$ruri", "i:34");
strip_tail(7);
subst_uri('/^sip:([0-9]+)@(.*)$/sip:\15551212@\2/i');
avp_delete("i:34");
On 4/18/05, Matt Schulte <mschulte(a)netlogic.net> wrote:
Ok this is all fairly easy except for 7 digit dialing
(usa), the problem
I'm having is how do I get the area code added to the 7
digits. I was
going to use the user@ to produce this but am unsure
how, eg:
from: +16365551212
dialed: 5551111
should look like dialed: +16365551111
Thoughts?
-----Original Message-----
From: Matt Schulte
Sent: Friday, April 15, 2005 1:44 PM
To: serusers(a)lists.iptel.org
Subject: [Serusers] e164 rewrite script
Does anyone have a config to convert phone numbers
(user@) to e164
numbers? Mainly american numbers.. Would save me a bit
of time, else I
can try to write something out.. Thanks.
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers
Hi,
I am just wondering what is the position with forking a call i.e. is
it the case that all calls must be parallel forked or else none? I
want to set up SER such that some users have their imcoming calls
forked to all their devices and others have their incoming calls
processed as normal....Is this possible??
Thanks,
Aisling.
-------------------Legal Disclaimer---------------------------------------
The above electronic mail transmission is confidential and intended only for the person to whom it is addressed. Its contents may be protected by legal and/or professional privilege. Should it be received by you in error please contact the sender at the above quoted email address. Any unauthorised form of reproduction of this message is strictly prohibited. The Institute does not guarantee the security of any information electronically transmitted and is not liable if the information contained in this communication is not a proper and complete record of the message as transmitted by the sender nor for any delay in its receipt.
Hello,
I have a problem as well as a couple of questions which don't seem to
be covered in the documentation.
1) I successfully got an installation of SER running with a MySQL
back-end and Digest Authentication. I've added a user with the
following command:
/usr/local/sbin/serctl add 2000 pl00p4f daniel.junkmail(a)gmail.com
Ultimatly, 2000 is the username (phone number of the SIP UA) and
pl00p4f is the password.
I've verified that this user is in the database:
mysql> select * from subscriber where username like '2000'\G
*************************** 1. row ***************************
phplib_id: 8ba7accc847208eb10eb6baa6373f89d
username: 2000
domain: eglobalphone.com
password: pl00p4f
first_name:
last_name:
phone:
email_address: dcorbe(a)gmail.com
datetime_created: 2005-04-16 19:47:09
datetime_modified: 0000-00-00 00:00:00
confirmation:
flag: o
sendnotification:
greeting:
ha1: 8ba7accc847208eb10eb6baa6373f89d
ha1b: 711817121ed6cae7e44837e3fddf78d4
perms: NULL
allow_find: 0
timezone: NULL
rpid: NULL
1 row in set (0.14 sec)
However; I cannot log into my proxy server. I keep getting 401
Unauthorized back.
Here's a libpcap capture of my session. Also attached is my ser config file.
I'm not sure what to do or what
2) And speaking of the SER config file, I have a question about the
userloc module
What is the difference between www_authorize/www_challenge and
proxy_authorize/proxy_challenge?
Thank you for your help.
-Daniel
Hey guys....
I'm really struggling with this. It was working perfectly yesterday and now I must have made a small change and I just cannot find what I've done wrong.
Bascially, this is a very very simple unauthenticated SER front end to SEMS... all I want to be able to do is use the conference facilities. Incidentally, when I say unauthenticated I mean also without registering... so all a user has to do is send an INVITE. To that end, I am trying to just redirect sip URI's beginning with 600. It seems that the initial redirect goes through... but then something screwy is happening because SER never appears to receive the ACKs correctly.. and it starts sending two sets of 200 messages.. one with no SDP descriptor and then a second batch with a valid SDP descriptor. Because of this weirdness with the ACKs, the client and SER fight for a while sending out millions of repeat 200s and ACKs. Meanwhile, because the initial redirect to SEMS worked, the conference has actually been created...
The same story with BYE.. the client sends it, but SER doesn't even appear to receive it (note all the debugging log lines). In fact, there' something rather dodgy up, because I don't even get the debug lines inside the route[1] block....
It sort of points to me that perhaps I've done something very stupid with the transactions.. that for some reason they don't match up ... but I can't find it. Attached is my ser.cfg. Any help would be so very much appreciated.
I don't think it's a basic connectivity problem, because as I said, a very similar file was working perfectly yesterday... I've just stupidly changed it slightly somewhere.
Many many thanks in advance.
Dave
listen=<publicip>
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 "/lib/ser/modules/mysql.so"
loadmodule "/lib/ser/modules/sl.so"
loadmodule "/lib/ser/modules/tm.so"
loadmodule "/lib/ser/modules/rr.so"
loadmodule "/lib/ser/modules/maxfwd.so"
loadmodule "/lib/ser/modules/usrloc.so"
loadmodule "/lib/ser/modules/registrar.so"
loadmodule "/lib/ser/modules/textops.so"
# -- usrloc params --
modparam("usrloc", "db_mode", 0)
# -- 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;
};
if (!method=="REGISTER") record_route();
if (loose_route()) {
log(1,"Loose routing block");
append_hf("P-hint: rr-enforced\r\n");
route(1);
break;
};
if (!uri==myself) {
log(1,"Got a request for an extenal domain");
# mark routing logic in request
append_hf("P-hint: outbound\r\n");
route(1);
break;
};
if (uri==myself) {
# switch to stateful mode:
if (!t_newtran()){
sl_send_reply("500","could not create transaction");
break;
};
if (method=="REGISTER") {
save("location");
break;
};
if (method=="ACK") {
# absorb ACKs
log(1,"Absorbing ACK");
break;
};
lookup("aliases");
if (!uri==myself) {
log(1,"Resolving external request");
append_hf("P-hint: outbound alias\r\n");
route(1);
break;
};
# prevent timeout on the other side:
t_reply("100","Trying - just wait a minute !");
if (method=="INVITE") {
save("location");
if (uri=~"sip:600.*@") {
log(1,"-> Redirecting conference to SEMS");
if(!t_write_unix("/tmp/am_sock","conference")) {
t_reply("500","error contacting sems");
};
break;
} ;
break;
}
else if (method=="BYE" || method=="CANCEL") {
log(1,"-> Sending BYE to SEMS");
if(!t_write_unix("/tmp/am_sock","bye")) {
t_reply("500","error contacting sems");
};
};
# 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
log(1, "Attempting stateful forward...");
if (!t_relay()) {
log(1,"... failure");
sl_reply_error();
};
log(1, "... success");
}
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers
Ok this is all fairly easy except for 7 digit dialing (usa), the problem
I'm having is how do I get the area code added to the 7 digits. I was
going to use the user@ to produce this but am unsure how, eg:
from: +16365551212
dialed: 5551111
should look like dialed: +16365551111
Thoughts?
-----Original Message-----
From: Matt Schulte
Sent: Friday, April 15, 2005 1:44 PM
To: serusers(a)lists.iptel.org
Subject: [Serusers] e164 rewrite script
Does anyone have a config to convert phone numbers (user@) to e164
numbers? Mainly american numbers.. Would save me a bit of time, else I
can try to write something out.. Thanks.
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Hi,
I'm using eyebeam and xten lite with a Fedora core 3 and ser-0.9.1 from
csv...
The ser server in main office serving branch offices connected with
frame relay 64kb.
It's working fine (not yet tested conference) and presence is working
only when I instruct eyebeam to use peer-to-peer presence. When I try to
use Presence Agent mode presence does not work, can someone help me...?
My ser.cfg
#
# $Id: ser.cfg,v 1.25 2004/11/30 16:28:24 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=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
#port=5060
#children=4
alias=192.168.130.209
listen=192.168.130.209
fifo="/tmp/ser_fifo" fifo_db_url="mysql://ser:heslo@localhost/ser"
# ------------------ 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/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/usrloc.so"
loadmodule "/usr/local/lib/ser/modules/registrar.so"
loadmodule "/usr/local/lib/ser/modules/pa.so"
loadmodule "/usr/local/lib/ser/modules/uri.so"
loadmodule "/usr/local/lib/ser/modules/uri_db.so"
loadmodule "/usr/local/lib/ser/modules/textops.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", "mysql://ser:heslo@localhost/ser")
modparam("usrloc", "use_domain", 1)
modparam("usrloc", "desc_time_order", 1)
# -- 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")
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
# -- pa params
modparam("pa", "db_url", "mysql:ser:heslo@localhost/ser")
modparam("pa", "default_expires",50)
modparam("pa", "pa_domain", "192.168.130.209")
# -- registrar params --
modparam("registrar", "use_domain", 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("192.168.130.209", "subscriber")) {
www_challenge("192.168.130.209", "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();
};
}
DidierH.
> -----Original Message-----
> From: Jamey Hicks [mailto:jamey.hicks@hp.com]
> Sent: Tue 1/11/2005 11:41 PM
> To: Helge Waastad
> Cc: serusers(a)lists.iptel.org
> Subject: Re: [Serusers] ser-0.9.0 and PA clients
Helge Waastad wrote:
>> Hello,
>> I've started to use the 0.9.0 release and to me it seems to work as a
>> charm :-)
>>
>> However does anybody know which SIP clients which is compliant for
the PA?
>> I'm using kphone and it works fine, but I would like to try out some
>> for use on Microsoft?
>> Messenger 5.0 does not work.
> Eyebeam from xten.com seems to be the farthest along in terms of
> implementing SIMPLE presence support, according to their website. I
> know Xten was testing against the SER PA this fall. That being said,
> testing Eyebeam against SER 0.9 is on my todo list for this week. I
> just need to set up a SER 0.9 PA on the same side of the HP firewall
as
> my Windows box.
>> Jamey
This mail has been scanned for known virus like activity on behalf of GALANA DISTRIBUTION PETROLIERE S.A. This E-mail is privileged, confidential and intended solely for the addressee(s).Any unauthorised dissemination or copying of this E-mail, and any use or disclosure of any information contained in it, is strictly prohibited and may be illegal. If you have received this E-mail in error please notify the sender immediately and delete it from your system. GALANA DISTRIBUTION PETROLIERE S.A. does not accept any liability for any errors, omissions, interceptions, corrupted mail, lost communications or late delivery which may arise as a result of this E-mail or for any virus that may be contained in it. Any views or opinions expressed in this E-mail are solely those of the author and do not necessarily reflect those of GALANA DISTRIBUTION PETROLIERE S.A.
Ce courriel a fait l'objet, par GALANA DISTRIBUTION PETROLIERE S.A. de verifications le protegeant des virus connus. Ce courriel est personnel, confidentiel et adresse exclusivement a son ou ses destinataire(s). Toute diffusion ou copie non autorisee ainsi que l'usage partiel ou total de son contenu est strictement interdit et peut-etre illegal. Si vous avez recu ce courriel par erreur, merci d'en informer son emetteur et de l'effacer de votre ordinateur. GALANA DISTRIBUTION PETROLIERE S.A. refuse toutes responsabilites liees aux erreurs, omissions, interceptions, deformations, communications perdues, ou retards de transmissions dont ce courriel pourrait etre l'objet ou a l'origine ainsi que des virus qu'il pourrait contenir. Les avis ou opinions exprimes dans ce courriel refletent exclusivement ceux de son auteur et non ceux de GALANA DISTRIBUTION PETROLIERE S.A.
Hi,
I'm trying to get SER running on a x86_64 server and 'postgres' module
does not compile. It starts with that:
make[1]: Entering directory
`/usr/local/src/ser-0.9.0/modules/postgres'
gcc -fPIC -DPIC -g -O9 -funroll-loops -Wcast-align -Wall
-minline-all-stringops -falign-loops -DNAME='"ser"'
-DVERSION='"0.9.0"' -DARCH='"x86_64"' -DOS='"linux"' -DCOMPILER='"gcc
3.3"' -D__CPU_x86_64 -D__OS_linux -DCFG_DIR='"/usr/local/etc/ser/"'
-DPKG_MALLOC -DSHM_MEM -DSHM_MMAP -DDNS_IP_HACK -DUSE_IPV6
-DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DDBG_QM_MALLOC -DFAST_LOCK
-DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DHAVE_GETHOSTBYNAME2
-DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL
-DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -I/usr/local/include
-I/usr/local/pgsql/include -I/usr/include/postgresql -c aug_alloc.c -o
aug_alloc.o
In file included from aug_std.h:62,
from aug_alloc.c:57:
aug_sysdep.h:327: error: parse error before ':' token
In file included from aug_std.h:68,
from aug_alloc.c:57:
and stops like this, after 250 lines of warning and errors:
aug_alloc.c:370: warning: statement with no effect
aug_alloc.c: At top level:
/usr/include/gconv.h:176: warning: array `__data' assumed to have one
element
make[1]: *** [aug_alloc.o] Error 1
make[1]: Leaving directory `/usr/local/src/ser-0.9.0/modules/postgres'
I'm using SER 0.9.0 and postgres 8.01 is installed in
/usr/local/pgsql, compiled from sources.
Any hint is welcome!
Best regards
--
# Lol Zimmerli // S y s C o ® // http://www.sysco.ch/
Follow each decision as closely as possible with its associated
action.
- The Elements of Programming Style (Kernighan & Plaugher)