Hi,
all the changes are on CVS. Feel free to download and test.
Thanks for the feedback,
Bogdan
-------- Original Message --------
Subject: Re: [Serusers] SMS gateway using a mobile phone
Date: Tue, 01 Apr 2003 18:30:18 +0200
From: Bogdan-Andrei IANCU <iancu(a)fokus.fraunhofer.de>
Reply-To: iancu(a)fokus.fraunhofer.de
To: "LeeCC, Kenny" <Kenny.LeeCC(a)hp.com>
CC: serusers(a)lists.iptel.org
References:
<6A52901B8F7E2A42B2C169B7AC932DDE02820E71(a)msaexc01.asiapacific.cpqcorp.net>
Hi Kenny,
First, I want to say that our SMS module is base on the same library as
Stefan Frings's "SMS Server Tools", so , if you succeeded it in sending
a SMS with this tool, you can do it also with the SMS GW.
The log you sent actually says the SMS GW is trying (using AT+CREG
command) to find out if the modem is registered on the GSM network (if
you have signal on your phone). But, if your phone doesn't support
AT+CREG command (as you said), the GW will remain blocked there until it
will figure out the modem status regarding registration on the network.
You said you were able to use the "SMS Server Tools" which actually does
to same - first checks if the modem is registered on GSM network. My
opinion is you specified to "putsms" the '-m' parameter (the PDU mod) to
"DIGICOM" - this is the only way haw to skip the registration check.
Please tell me if I right or not. If yes, you can find a similar setting
for the SMS GW - in "modem" section switch the 'm' param from '"new" to
"digicom".
Now, regarding the SMS center number. I guess you are right. I will turn
this parameter to "optional" - to be more flexible- and I will move it
from "network" section to the "modem" one. As soon as I will finish the
changing, I will let you know.
Yes, indeed, there is no support for 57600 baud rate - I will added asap.
In order to be able to help you more, if it's possible, please send me
exactly the parameters you used with "putsms" (from "SMS Server Tools").
Best regards,
Bogdan
LeeCC, Kenny wrote:
>Hi,
>
>Am trying to get SER to send SMS messages out via my SER server serial/comm port connected to a Motorola Timeport P7382 mobile phone but am having trouble because of SER "sms.so" module keep trying to register the SMS center number; syslog snippet.
>
>
>Apr 1 18:32:28 gits /usr/sbin/ser[18276]: INFO:initmodem: Checking if Modem is registered to the network
>Apr 1 18:32:30 gits /usr/sbin/ser[18266]: NOTICE:initmodem: Waiting 2 sec. before retrying
>
>
>The mobile phone already register to the SMS center number thus re-registering is not required. "sms.so" module doesn't seems to pick up the message that the mobile phone have already registered to the SMS center number and I have to amend and recompile "libsms_modem.c" because the mobile phone do not recognise AT+CREG command but AT+CSCA command.
>
>To test whether the mobile phone is able to send SMS messages out via the serial/comm port, I used Stefan Frings "SMS Server Tools" by commenting the config file from registering the SMS center number and it managed to send out sms messages. However on SER "sms.so" modules, I have no idea how to stop it from registering the SMS center number. From the "../sms/README" file, it did mention that "c=SMS_center" is mandatory. That looks like not registering to the SMS center is a no-no. :-( Other than changing some words here and there of the source code via gut feel, I don't have any experience in C thus am yelping for help here.
>
>Btw, the modem baud rate on "sms.c" only supports up to 38400 and that won't work with my mobile phone, thus have to add a line for 57600 baud rate. Maybe is already added in the latest CVS. Am using the stable version source. Below is my "ser.cfg".
>
>Thanks & rgds,
>kenny.leecc
>-------------------------------------------
>
>#
># $Id: ser.cfg,v 1.12 2002/10/21 02:40:06 jiri Exp $
>#
># simple quick-start config script
>#
>
># ----------- global configuration parameters ------------------------
>
>debug=9 # debug level (cmd line: -dddddddddd)
>fork=yes
>log_stderror=no # (cmd line: -E)
>check_via=no # (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/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/sms.so"
>loadmodule "//usr/lib/ser/modules/im.so"
>loadmodule "//usr/lib/ser/modules/textops.so"
>loadmodule "//usr/lib/ser/modules/usrloc.so"
>loadmodule "//usr/lib/ser/modules/registrar.so"
>loadmodule "//usr/lib/ser/modules/pike.so"
>
># Uncomment this if you want digest authentication
># mysql.so must be loaded !
>loadmodule "//usr/lib/ser/modules/auth.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)
>
># -- auth params --
># Uncomment if you are using auth module
>#
>modparam("auth", "secret", "alsdkhglaksdhfkloiwr")
>modparam("auth", "calculate_ha1", yes)
>#
># If you set "calculate_ha1" parameter to yes (which true in this config),
># uncomment also the following parameter)
>#
>modparam("auth", "password_column", "password")
>
># -- SMS params --
>modparam("sms","modems","Motorola [d=/dev/ttyS0;b=57600;m=new;l=20;r=2]")
>modparam("sms","networks","Maxis[c=60120000015;m=10]")
>modparam("sms","links","Motorola [Maxis]")
>modparam("sms","domain","gits.msasip.net")
>modparam("sms","max_sms_parts",3)
>modparam("sms","use_contact",1)
>
># -- tm params --
>modparam("tm", "fr_timer", 10 )
>modparam("tm", "fr_inv_timer", 10 )
>modparam("tm", "wt_timer", 10 )
>
># -- pike params --
># no more than minimum 5 or maximum 5*3 msg per 10 secs - only for sms
>modparam("pike","sampling_time_unit",60)
>modparam("pike","reqs_density_per_unit",5)
>modparam("pike","removel_latency",30)
>
># ------------------------- request routing logic -------------------
>
># main routing logic
>
>alias="my.domain"
>
>route{
>
> # initial sanity checks -- messages with
> # max_forwars==0, or excessively long requests
> # filter too old messages
> if (!mf_process_maxfwd_header("10")) {
> log("LOG: Too many hops\n");
> sl_send_reply("483","Too Many Hops");
> break;
> };
>
> # messages too large are denied
> if (len_gt( max_len )) {
> sl_send_reply("513", "Message too big");
> break;
> };
>
> # accept only req coming from my.domain
> if (!src_ip==192.168.1.1 |
> !( uri=~"my.domain" | uri=~"192\.168\.1\.0" ))
> {
> sl_send_reply("403","Forbidden");
> log("SER:Forbidden request: wrong src_ip or req_uri\n");
> break;
> };
>
> # we are not interested in non-MESSAGE requests
> if (!method=="MESSAGE")
> {
> sl_send_reply("501","Not Implemented");
> break;
> };
>
> # error occured ...
> if (! t_newtran())
> {
> sl_reply_error();
> break;
> };
>
> ### ------ SMS GATEWAY --------
> # let's block ips that send a lot of request!!
> if (!pike_check_req() )
> {
> break;
> };
> # SMS expects only the numbers as follows +
> #if (!(uri=~"sip:+[^0][0-9]{3}"))
> if (!(uri=="sip:0121234567"))
> {
> log("SER: invalid number format!!\n");
> if (!t_reply("502","Bad gateway - invalid number"))
> {
> # if replying failed, retry statelessly
> sl_reply_error();
> };
> break;
> };
> if (sms_send_msg_to_net("Maxis"))
> {
> # for sending replies, we won't use the statefull
> # function because it is not able to add the Contact
> # header (in fact to add any rpl_lump :-( )
> # things went well, send ok upstream
> if (!t_reply("202", "yes sir, SMS sent over"))
> {
> # if replying failed, retry statelessly
> sl_reply_error();
> };
> } else {
> if (!t_reply("502", "Bad gateway - SMS error"))
> {
> # if replying failed, retry statelessly
> sl_reply_error();
> };
> break;
> };
>
> # Do strict routing if pre-loaded route headers present
> rewriteFromRoute();
>
> # forward or handoff to PSTN
> if (uri=~"^sip:9[0-9]*@192.168.1.66") {
> strip(1);
> log("Forwarding to PSTN\n");
> rewritehostport("192.168.1.50:5060");
> };
>
> lookup("aliases");
> # 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("my.domain", "subscriber")) {
> www_challenge("my.domain", "0");
> break;
> };
>
>
> save("location");
> break;
> };
>
> # native SIP destinations are handled using our USRLOC DB
> if (!lookup("location")) {
> sl_send_reply("404", "Not Found");
> break;
> };
> };
>
> # forward to current uri now
> if (!t_relay()) {
> sl_reply_error();
> };
>
>}
>_______________________________________________
>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
Hello
We´re trying to install the ser, and eventually we hope it will work with
our jabberserver aswell. Now though we have some problem that we can't
solve.
version: ser 0.8.11pre8-mem (i386/linux)
When starting the ser ( ./ser -f etc/ser.cfg)
we get the following error message:
0(10388) set_mod_param_regex: auth matches module auth
0(10388) set_mod_param_regex: parameter <calculate_ha1> not found in module
<auth>
0(10388) qm_free(0x80a1a40, 0x80a8a60), called from modparam.c:
set_mod_param_regex(130)
0(10388) qm_free: freeing block alloc'ed from modparam.c:
set_mod_param_regex(85)
0(10388) parse error (82,39-40): Can't set module parameter
.
.
.
.
0(10388) set_mod_param_regex: auth matches module auth
0(10388) set_mod_param_regex: parameter <password_column> not found in
module <auth>
0(10388) qm_free(0x80a1a40, 0x80a8b14), called from modparam.c:
set_mod_param_regex(130)
0(10388) qm_free: freeing block alloc'ed from modparam.c:
set_mod_param_regex(85)
0(10388) parse error (83,47-48): Can't set module parameter
The ser.cfg file looks like this:
modparam("usrloc", "db_mode", 2)
modparam("auth", "calculate_ha1", true)
modparam("auth", "password_column", "password")
Please, help us on this since we can't move forward as long as we have this
problem. Let us know if you need more info.
Magnus
_________________________________________________________________
Hitta rätt köpare på MSN Köp & Sälj http://www.msn.se/koposalj
Hi,
I have tested cisco ATA186 (private IP) with SER under different circumstances. With Linksys and D-link router, there were no problem. But with Lioncom ADSL router, a strange thing happened. In this case, the ATA is having a private IP 192.168.5.2 and the SIP port number is the default 5060. The public IP of the ADSL connection was 195.226.252.124. The following is the traces from ngrep. As you can see, the Lioncom router forwarded (NAT) the SIP REGISTER with port 30150 while SER sent the response back to port 5060. So the ATA couldn't receive the response at all. What maybe the problem?
#
U 195.226.252.124:30150 -> 192.168.3.29:5060
REGISTER sip:sip.abc.com SIP/2.0..Via: SIP/2.0/UDP 192.168.5.2:5060..From: <sip:6701892@si
p.abc.com;user=phone>..To: <sip:6701892@sip.abc.com;user=phone>..Call-ID: 1781909739@1
92.168.5.2..CSeq: 1 REGISTER..Contact: *..Expires: 0..User-Agent: Cisco ATA v2.15 ata18x (0209
27a)..Content-Length: 0....
#
U 192.168.3.29:5060 -> 195.226.252.124:5060
SIP/2.0 401 Unauthorized..Via: SIP/2.0/UDP 192.168.5.2:5060;received=195.226.252.124..From: <s
ip:6701892@sip.abc.com;user=phone>..To: <sip:6701892@sip.abc.com;user=phone>;tag=d907c
037823644515dfe0ede38ca9976.9b53..Call-ID: 1781909739@192.168.5.2..CSeq: 1 REGISTER..WWW-Authen
ticate: Digest realm="sip.abc.com", nonce="3e89f40b00000000e3fd8eedb58e5662ca62981749bb0006
", algorithm=MD5..Server: Sip EXpress router (0.8.10 (i386/linux))..Content-Length: 0..Warning:
392 192.168.3.29:5060 "Noisy feedback tells: pid=10613 req_src_ip=195.226.252.124 in_uri=sip:s
ip.bmx-inc.comout_uri=sip:sip.abc.com via_cnt==1"....
Thanks,
Bo
Hi,
Am trying to get SER to send SMS messages out via my SER server serial/comm port connected to a Motorola Timeport P7382 mobile phone but am having trouble because of SER "sms.so" module keep trying to register the SMS center number; syslog snippet.
<snip>
Apr 1 18:32:28 gits /usr/sbin/ser[18276]: INFO:initmodem: Checking if Modem is registered to the network
Apr 1 18:32:30 gits /usr/sbin/ser[18266]: NOTICE:initmodem: Waiting 2 sec. before retrying
<snip>
The mobile phone already register to the SMS center number thus re-registering is not required. "sms.so" module doesn't seems to pick up the message that the mobile phone have already registered to the SMS center number and I have to amend and recompile "libsms_modem.c" because the mobile phone do not recognise AT+CREG command but AT+CSCA command.
To test whether the mobile phone is able to send SMS messages out via the serial/comm port, I used Stefan Frings "SMS Server Tools" by commenting the config file from registering the SMS center number and it managed to send out sms messages. However on SER "sms.so" modules, I have no idea how to stop it from registering the SMS center number. From the "../sms/README" file, it did mention that "c=SMS_center" is mandatory. That looks like not registering to the SMS center is a no-no. :-( Other than changing some words here and there of the source code via gut feel, I don't have any experience in C thus am yelping for help here.
Btw, the modem baud rate on "sms.c" only supports up to 38400 and that won't work with my mobile phone, thus have to add a line for 57600 baud rate. Maybe is already added in the latest CVS. Am using the stable version source. Below is my "ser.cfg".
Thanks & rgds,
kenny.leecc
-------------------------------------------
#
# $Id: ser.cfg,v 1.12 2002/10/21 02:40:06 jiri Exp $
#
# simple quick-start config script
#
# ----------- global configuration parameters ------------------------
debug=9 # debug level (cmd line: -dddddddddd)
fork=yes
log_stderror=no # (cmd line: -E)
check_via=no # (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/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/sms.so"
loadmodule "//usr/lib/ser/modules/im.so"
loadmodule "//usr/lib/ser/modules/textops.so"
loadmodule "//usr/lib/ser/modules/usrloc.so"
loadmodule "//usr/lib/ser/modules/registrar.so"
loadmodule "//usr/lib/ser/modules/pike.so"
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
loadmodule "//usr/lib/ser/modules/auth.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)
# -- auth params --
# Uncomment if you are using auth module
#
modparam("auth", "secret", "alsdkhglaksdhfkloiwr")
modparam("auth", "calculate_ha1", yes)
#
# If you set "calculate_ha1" parameter to yes (which true in this config),
# uncomment also the following parameter)
#
modparam("auth", "password_column", "password")
# -- SMS params --
modparam("sms","modems","Motorola [d=/dev/ttyS0;b=57600;m=new;l=20;r=2]")
modparam("sms","networks","Maxis[c=60120000015;m=10]")
modparam("sms","links","Motorola [Maxis]")
modparam("sms","domain","gits.msasip.net")
modparam("sms","max_sms_parts",3)
modparam("sms","use_contact",1)
# -- tm params --
modparam("tm", "fr_timer", 10 )
modparam("tm", "fr_inv_timer", 10 )
modparam("tm", "wt_timer", 10 )
# -- pike params --
# no more than minimum 5 or maximum 5*3 msg per 10 secs - only for sms
modparam("pike","sampling_time_unit",60)
modparam("pike","reqs_density_per_unit",5)
modparam("pike","removel_latency",30)
# ------------------------- request routing logic -------------------
# main routing logic
alias="my.domain"
route{
# initial sanity checks -- messages with
# max_forwars==0, or excessively long requests
# filter too old messages
if (!mf_process_maxfwd_header("10")) {
log("LOG: Too many hops\n");
sl_send_reply("483","Too Many Hops");
break;
};
# messages too large are denied
if (len_gt( max_len )) {
sl_send_reply("513", "Message too big");
break;
};
# accept only req coming from my.domain
if (!src_ip==192.168.1.1 |
!( uri=~"my.domain" | uri=~"192\.168\.1\.0" ))
{
sl_send_reply("403","Forbidden");
log("SER:Forbidden request: wrong src_ip or req_uri\n");
break;
};
# we are not interested in non-MESSAGE requests
if (!method=="MESSAGE")
{
sl_send_reply("501","Not Implemented");
break;
};
# error occured ...
if (! t_newtran())
{
sl_reply_error();
break;
};
### ------ SMS GATEWAY --------
# let's block ips that send a lot of request!!
if (!pike_check_req() )
{
break;
};
# SMS expects only the numbers as follows +<int> <area> <nr>
#if (!(uri=~"sip:+[^0][0-9]{3}"))
if (!(uri=="sip:0121234567"))
{
log("SER: invalid number format!!\n");
if (!t_reply("502","Bad gateway - invalid number"))
{
# if replying failed, retry statelessly
sl_reply_error();
};
break;
};
if (sms_send_msg_to_net("Maxis"))
{
# for sending replies, we won't use the statefull
# function because it is not able to add the Contact
# header (in fact to add any rpl_lump :-( )
# things went well, send ok upstream
if (!t_reply("202", "yes sir, SMS sent over"))
{
# if replying failed, retry statelessly
sl_reply_error();
};
} else {
if (!t_reply("502", "Bad gateway - SMS error"))
{
# if replying failed, retry statelessly
sl_reply_error();
};
break;
};
# Do strict routing if pre-loaded route headers present
rewriteFromRoute();
# forward or handoff to PSTN
if (uri=~"^sip:9[0-9]*@192.168.1.66") {
strip(1);
log("Forwarding to PSTN\n");
rewritehostport("192.168.1.50:5060");
};
lookup("aliases");
# 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("my.domain", "subscriber")) {
www_challenge("my.domain", "0");
break;
};
save("location");
break;
};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
break;
};
};
# forward to current uri now
if (!t_relay()) {
sl_reply_error();
};
}
For the last couple of days the Transaction Statistics show "10 Waiting". Even when there is no traffic. What exactly does it represent? and how can it stay stuck?
Thanks,
Ricardo
[cycle #: 18173; if constant make sure server lives and fifo is on]
Server: Sip EXpress router (0.8.10 (i386/linux))
Now: Tue Apr 1 10:53:20 2003
Up Since: Mon Mar 24 17:30:57 2003
Up time: 667343 [sec]
Transaction Statistics
Current: 0 (10 waiting) Total: 609 (0 local)
Replied localy: 394
Completion status 6xx: 4, 5xx: 0, 4xx: 219, 3xx: 0,2xx: 518
Stateless Server Statistics
200: 922 202: 0 2xx: 0
300: 0 301: 0 302: 0 3xx: 0
400: 0 401: 995 403: 0 404: 11227 407: 0 408: 0 483: 8 4xx: 1901
500: 0 5xx: 0
6xx: 0
xxx: 0
failures: 4
UsrLoc Stats
Domain Registered Expired
'location' 2 35
'aliases' 13 0
hi Jan.
tried what u have said.i am still getting the same error.
sunithi
-----Original Message-----
From: Jan Janak [mailto:jan@iptel.org]
Sent: Tuesday, April 01, 2003 6:42 PM
To: Sunithi JP
Cc: 'serusers(a)lists.iptel.org'
Subject: Re: [Serusers] how do i add an alias?
Hello,
it should look like this:
sc alias add test2 sip:test@indts.com
Jan.
On 01-04 18:27, Sunithi JP wrote:
> hi all,
> i am running SER (ver 0.8.10) with MySql support.
>
> i made an entry in the database for a user "test" using the command :
> - serctl add test test test(a)indts.com <mailto:test@indts.com>
>
> now, i want to add an alias for the user "test". so when i type :
> - serctl alias add test(a)indts.com <mailto:test@indts.com>
> sip:test2@indts.com <mailto:sip:test2@indts.com>
>
> i get the following error
>
> sip:test2@indts.com <mailto:sip:test2@indts.com>
> 400 ul_add: contact expected
>
> what is happening? pls help
>
> thx,
> sunithi
>
>
>
Hello,
When the user registeres/authorizes with ser, no update is done to sers
userlocate database. The 200 reply is sent to user (and from
documentation save("location"); sends it), and in mysql log I see a
query for authirization. But no update to is issued to mysql location
table, and serctl ul show doesnt show the user. Sometimes the user does
show up in the userlocate database but I was not able to point down when
this happens.
I`m running the march 19/ 6pm cvs version as was recommended.
here is the ser.cfg :
----------
#
# $Id: ser.cfg,v 1.12 2002/10/21 02:40:06 jiri Exp $
#
# simple quick-start config script
#
# ----------- global configuration parameters ------------------------
debug=9 # debug level (cmd line: -dddddddddd)
fork=yes
log_stderror=no # (cmd line: -E)
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
port=5060
children=1
fifo="/tmp/ser_fifo"
sip_warning=yes
# ------------------ 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/vm_mod.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_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", "timer_interval", 30)
# modparam("usrloc", "db_url", "sql://serro:47serro11@localhost/ser")
# -- auth params --
# Uncomment if you are using auth module
#
# modparam("auth", "secret", "12036dabde659847dd9e")
modparam("auth_db", "calculate_ha1", true)
#
# 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("auth_db", "db_url", "sql://ser:heslo@localhost/ser")
# modparam("registrar", "default_expires", 3600)
# ------------------------- request routing logic -------------------
# main routing logic
alias="dg"
alias="phila.dg"
route{
# initial sanity checks -- messages with
# max_forwars==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;
};
# Do strict routing if pre-loaded route headers present
#rewriteFromRoute();
strict_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("dg", "subscriber")) {
www_challenge("dg", "0");
break;
};
save("location");
log(1,"REGISTER - User registered\n");
break;
};
};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
break;
};
# forward to current uri now
if (!t_relay()) {
sl_reply_error();
};
}
----------
--
Anton Yurchenko<phila(a)dg.net.ua>
Digital Generation
At 03:19 PM 4/1/2003, Stephan Reiff-Marganiec wrote:
>Hi,
>
>are there functions in ser (or one of its modules) that can be used within
>another module to add or replace headers or message bodies?
>
>I am thinking of something like:
>
>add_header(&msg, header)
textops/append_hf
>replace_header(&msg, oldheader, newheader)
textopts/replace is the closest hit.
-Jiri
Hi,
are there functions in ser (or one of its modules) that can be used within
another module to add or replace headers or message bodies?
I am thinking of something like:
add_header(&msg, header)
replace_header(&msg, oldheader, newheader)
and
add_body(&msg, body)
replace_body(&msg, oldbody, newbody)
If not, then is the best way to achieve this the use of the textops
functions from modules/text?
thanks,
Stephan
--
Stephan Reiff-Marganiec
Research Fellow
Department of Computing Science; University of Stirling
email: srm(a)cs.stir.ac.uk tel: 01786 46 7448
--
The University of Stirling is a university established in Scotland by
charter at Stirling, FK9 4LA. Privileged/Confidential Information may
be contained in this message. If you are not the addressee indicated
in this message (or responsible for delivery of the message to such
person), you may not disclose, copy or deliver this message to anyone
and any action taken or omitted to be taken in reliance on it, is
prohibited and may be unlawful. In such case, you should destroy this
message and kindly notify the sender by reply email. Please advise
immediately if you or your employer do not consent to Internet email
for messages of this kind. Opinions, conclusions and other
information in this message that do not relate to the official
business of the University of Stirling shall be understood as neither
given nor endorsed by it.
hi all,
i am running SER (ver 0.8.10) with MySql support.
i made an entry in the database for a user "test" using the command :
- serctl add test test test(a)indts.com <mailto:test@indts.com>
now, i want to add an alias for the user "test". so when i type :
- serctl alias add test(a)indts.com <mailto:test@indts.com>
sip:test2@indts.com <mailto:sip:test2@indts.com>
i get the following error
sip:test2@indts.com <mailto:sip:test2@indts.com>
400 ul_add: contact expected
what is happening? pls help
thx,
sunithi