The loose route in my config is located before any sl_send_reply, but the
ACK is not being processed as loose route. why?
Should I include something like:
if (method=="ACK") {
t_relay();
break;
};
My config file is:
######################################################################
# SER Config File
######################################################################
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
fifo="/tmp/ser_fifo"
######################################################################
# Load Modules
######################################################################
# Uncomment this if you want to use SQL database
loadmodule "/usr/lib/ser/modules/sl.so" /*Stateless routing*/
loadmodule "/usr/lib/ser/modules/tm.so" /*Statefull routing*/
loadmodule "/usr/lib/ser/modules/acc.so" /*Accounting*/
loadmodule "/usr/lib/ser/modules/rr.so" /*Record Routing*/
loadmodule "/usr/lib/ser/modules/maxfwd.so" /*Max-fwd header logic*/
loadmodule "/usr/lib/ser/modules/usrloc.so" /*User Location*/
loadmodule "/usr/lib/ser/modules/registrar.so" /*SIP Register functions*/
loadmodule "/usr/lib/ser/modules/exec.so" /*Execute external
commands*/
loadmodule "/usr/lib/ser/modules/mysql.so" /*MySQL DB Module*/
# MySQL dependant modules
loadmodule "/usr/lib/ser/modules/auth.so" /*User authentication*/
loadmodule "/usr/lib/ser/modules/auth_db.so" /*User auth. using MySQL
DB*/
loadmodule "/usr/lib/ser/modules/group.so" /*Group commands*/
######################################################################
# Establecer parametros para los modulos
######################################################################
# -- usrloc params --
modparam("usrloc", "db_mode", 2)
modparam("usrloc", "db_url", "sql://user:pass@localhost/db")
# -- auth params --
modparam("auth_db", "db_url", "sql://user:pass@localhost/db")
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password")
# -- rr params --
modparam("rr", "enable_full_lr", 0)
# -- group params --
modparam("group", "db_url", "sql://user:pass@localhost/db")
# -- accounting params --
modparam("acc", "log_level", 3)
modparam("acc", "db_url", "mysql://user:pass@localhost/db")
modparam("acc", "db_flag", 2)
modparam("acc", "db_missed_flag", 3)
modparam("acc", "report_ack", 1)
modparam("acc", "report_cancels", 1)
######################################################################
# Server Aliases
######################################################################
alias="mydomain.com"
######################################################################
# Main Routing Logic
######################################################################
route{
##################################################
# Initial sanity checks -- messages with
# max_forwards==0, or excessively long requests
##################################################
if (!mf_process_maxfwd_header("15")) {
sl_send_reply("483","Too Many Hops");
break;
};
if ( msg:len > max_len ) {
sl_send_reply("513", "Message too big");
break;
};
##################################################
# Loose-route processing
##################################################
if (loose_route()) {
setflag(2);
t_relay();
break;
};
##################################################
# We record-route all messages
##################################################
if (method=="INVITE") {
record_route();
};
##################################################
# Registering routines start here
##################################################
if (method=="REGISTER") {
if (!src_ip==server2.mydomain.com) {
if (!www_authorize("mydomain.com", "subscriber")) {
www_challenge("mydomain.com", "0");
break;
};
t_replicate("server2.mydomain.com", "5060");
};
save("location");
break;
};
##################################################
# Check the source of call and auth. if required
##################################################
# If the call comes from the gateways, no authentication is required
if (src_ip==gateway.mydomain.com ) {
log(1,"Call from pstn. \n");
} else {
if (method=="INVITE") {
if (!proxy_authorize("mydomain.com", "subscriber"))
{
proxy_challenge("mydomain.com", "0");
break;
};
};
}
##################################################
# Route call
##################################################
if (uri=~"^sip:59803[0-9][0-9][0-9]@.*") {
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
break;
} else {
if (!t_relay()) {
sl_reply_error();
};
};
} else if (uri=~"^sip:[0|1|2|3|5|8|9][0-9]*@.*") {
rewritehost("gateway.mydomain.com");
t_relay();
};
}
-----Original Message-----
From: Greger V. Teigre [mailto:greger@teigre.com]
Sent: Viernes, 24 de Diciembre de 2004 01:32 a.m.
To: Amozurrutia Jesus; serusers(a)lists.iptel.org
Subject: Re: [Serusers] Problem with ACK
The ACK has a Route header that is supposed to be picked up by the loose
route part of your config. If the loose route call is not reached before
you do other processing, the ACK may be dropped...
Route: <sip:5559853979@X.X.84.93;ftag=2413706159;lr>
g-)
Amozurrutia Jesus wrote:
> I double checked and the ACK are ignored by SER.
>
> The log file thows this:
> Dec 23 13:26:13 sip2 /usr/sbin/ser[21127]: Warning: sl_send_reply: I
> won't send a reply for ACK!!
>
>
> Jesus
>
> -----Original Message-----
> From: Greger V. Teigre [mailto:greger@teigre.com]
> Sent: Lunes, 20 de Diciembre de 2004 01:43 a.m.
> To: Amozurrutia Jesus; serusers(a)lists.iptel.org
> Subject: Re: [Serusers] Problem with ACK
>
>
> Are you sure that the ACK stops at ser? The ACKs should just flow
> through ser. I have seen a similar problem with XLite where Cisco
> drops the ACK because XLite there is a bug in XLIte's Via parsing.
> This is a Cisco gateway appending an x-route-tag to via. Turn on
> debugging (ALL) on Cisco and check if it drops the ACK due to
> wrong/no branch info in Via.
> g-)
>
> Amozurrutia Jesus wrote:
>> I'm implementing the scenario shown below.
>>
>> ___ ______
>> / 0 \ ---/ \ |
>> /_\ | ATA1 |---| ____ _ _ _ _ _____
>> \______/ | / \ / \/ \/ \/ \ / \
>> |---| FW |---| IP Net |---| CCM |
>> | \____/ \_/\_/\_/\_/ \_____/
>> | | |
>> | | |
>> | |
>> --- ---
>> / \ / \
>> |NAT| |SER|
>> |-T | | |
>> \___/ \___/
>>
>> When calling between the CCM (Cisco CallManager) and the ATA, SER
>> simply ignores the call ACK.
>> The ACK looks like:
>>
>> ACK sip:5559853979*sip1.mcm.net.mx=X.X.71.2+17081@X.X.81.92:5063
>> SIP/2.0 Via: SIP/2.0/UDP X.X.67.218:5060;branch=z9hG4bK29b2c750
>> From: "5559852600" <sip:5559852600@X.X.67.218>;tag=16781758
>> To: <sip:5559853979@mcm.net.mx>;tag=2602576443
>> Date: Tue, 30 Nov 2004 23:53:15 GMT
>> Call-ID: fef8ed00-1da1612d-24d-da4334c8(a)X.X.67.218
>> Route: <sip:5559853979@X.X.81.94;ftag=16781758;lr>
>> Max-Forwards: 70
>> CSeq: 101 ACK
>> Content-Length: 0
>>
>> The call flow:
>>
>> CallManager SIP Server ATA
>> | | |
>> |-- INVITE -------->| |
>> |<-- trying --------| |
>> | |-- INVITE -------->|
>> | |<-- Trying --------|
>> | |<-- Ringing -------|
>> |<-- Ringing -------| |
>> | |<-- OK ------------|
>> |<-- OK ------------| |
>> |-- ACK ----------->| |
>> | |<-- OK ------------|
>> |<-- OK ------------| |
>> |-- ACK ----------->| |
>> | |<-- OK ------------|
>> |<-- OK ------------| |
>> |-- ACK ----------->| |
>> | |<-- OK ------------|
>> |<-- OK ------------| |
>> |-- ACK ----------->| |
>> | |<-- OK ------------|
>> ......
>>
>> My guess is that SER does not accept the URI
>> "5559853979*sip1.mcm.net.mx=X.X.71.2+17081@X.X.81.92:5063" because it
>> contains "*+=" signs ore something similar.
>> When calling from ATA - ATA there is no preoblem because ATAs
>> construct the ACK message different (URI and Rote flipped).
>>
>> Any ideas?
>>
>> Thanks in advance,
>>
>> Jesus
>>
>>
>> _______________________________________________
>> Serusers mailing list
>> serusers(a)lists.iptel.org
>> http://lists.iptel.org/mailman/listinfo/serusers
Hi,
I've set up SER for UA to UA call.
I'm thinking of setting up SER to relay to Asterisk PBX to use conference
call and voicemail of Asterisk.
I will employ this system for client connection over global IP network.
Actually My SER is running in three IPs -global, private and IPv6 and
Asterisk is also running on the same Linux box with different private IP
from SER.
Here, I have a question regarding relay from SER to Asterisk.
Does Asterisk SIP channel should listen to global IP?
By that I mean I don't understand how t_relay works.
Say, when my party members make connection from different global IPs to my
SER on global IP, is that possible to relay that connection to Asterisk
running in the same Linux box with private IP and different port number?
On Global Ips Linux Box running two servers
_____ _____
SIP Phone --------| | | A |
| | | S |
SIP Phone --------| S | | T |
| E |-----------| E | Asterisk running on
SIP Phone --------| R | | R | private:192.168.0.12:5070
| | | I |
SIP Phone --------|___| | S |
| K |
SER running on ... |___|
global:61.194.32.77:5060
private:192.168.0.12:5060
ipv6:[2001:268:304:a300::10]:5060
*For NAT solution, MySTUN & MediaProxy is employed*
In the above setting, can UA (SIP phones) on global network use conference
call of Asterisk? In other words, can SER relay from its global connection
to local private network? If possible, what can be the syntax in ser.cfg?
Thanks in advance and deep sympathy to Tsunami victims in South Asia
Kuni
--
Kuniyoshi Murata.........................iChat/AIM:macwebcaster
English-Japanese Interpreter mailto:kuni@ej-interpreter.net
Macintosh Webcast Specialist http://www.macwebcaster.com
Hi Simon,
I cannot fix it.
Do you mean that you could not fix this problem? If you have fixed this,
could you teach me how to configure this?
Thomas
On Thu, 2004-12-23 at 18:42, Simon Miles wrote:
> Thomas,
>
> Did you get a resolution to this problem. I had the same problem but
> then just went back to using port 5060 as I could find a fix.
>
> Thanks
>
>
> Simon
>
> -----Original Message-----
> From: serusers-bounces(a)iptel.org [mailto:serusers-bounces@lists.iptel.org]
On
> Behalf Of Thomas
> Sent: 21 December 2004 06:14
> To: serusers(a)lists.iptel.org
> Subject: [Serusers] change port -> registration fail
>
>
> [please ignore my previous message]
>
> Hi everyone,
>
>
> When I try to change the port from 5060 to other value (e.g. 1234),
> after restarting SER, the gateway (sipura 2000) fails to register even
I
> change the "SIP port" to 1234.
>
> I use serctl ps to view the server process, only port 1234 is used for
> listening. I use ethereal to trace the packets, when the client sends
> the REQUEST, my SER server did not reply.
>
>
> Only 5060 works successfully. Do you have any ideas?
>
>
>
>
> Thomas
Dear all,
After I installed and execute the SER(./ser) in my Red Hat Linux, there is no any window pop up. Is it normal? I check with the "ps" command, there is no any program running in background mode.
If it's normal, how can I keep using the SER? Thanks!
Bruce
if people want to account the rpid used in the call, then the right
place to load it into an avp is append_rpid_hf() function. it doesn't
make sense to me to have an rpid in the accounting record if it didn't
exist in the outgoing request.
-- juha
Hi there list,
I've been looking around to make RADIUS work with ser ... And
succesfully got Authentication work just nice. Need a hand on
Authorization, but does not care about that as much as I do with
Accounting.
This is the problem, I can get the Acct-Start messeages when an INVITE
messege is received, but cannot get any Acct-Stop messege for any BYE or
CANCEL messege. Here goes my ser.cfg ...
[...]
# -- RADIUS ACC --
modparam("acc", "radius_config", "/etc/radiusclient.conf")
modparam("acc", "radius_flag", 1)
modparam("acc", "radius_missed_flag", 2)
modparam("acc", "log_level", 1)
[...]
route
{
[...]
if (method=="INVITE")
{
setflag(1);
acc_rad_request("200");
};
if (method=="BYE" || method=="CANCEL")
{
setflag(1);
acc_rad_request("200");
};
[...]
}
And here goes my RADIUS output for a call made from user 1992005 to user
1992001 ...
radrecv: Accounting Request from host c0a801fd code=4, id=89, length=248
Acct-Status-Type = Start
Service-Type = Sip-Session
Sip-Response-Code = 200
Sip-Method = Invite
User-Name = "1992005(a)192.168.1.253"
Calling-Station-Id = "sip:1992005@192.168.1.253:11005"
Called-Station-Id = "sip:1992001@192.168.1.253"
Sip-Translated-Request-URI = "sip:1992001@192.168.1.253"
Acct-Session-Id =
"CF8F4CE6-A085-413A-B2E1-CD70D396EBBD(a)192.168.1.178"
Sip-To-Tag = "n/a"
Sip-From-Tag = "3735508357"
Sip-CSeq = "36572"
NAS-IP-Address = 192.168.1.253
NAS-Port-Id = 5060
Acct-Delay-Time = 0
Entro a rad_accounting
Entro a rad_accounting_sql
must_update_client_fst_ack=TRUE
Calling Corrected = 1992005
Called Corrected = 1992001
Entro a rad_send_reply
Sending Accounting Ack of id 89 to c0a801fd (nas linux)
( the previous output corresponds to the "RINGING" state .. Just before
the called user answers the phone )
radrecv: Accounting Request from host c0a801fd code=4, id=90, length=278
Acct-Status-Type = Start
Service-Type = Sip-Session
Sip-Response-Code = 200
Sip-Method = Invite
User-Name = "1992005(a)192.168.1.253"
Calling-Station-Id = "sip:1992005@192.168.1.253:11005"
Called-Station-Id = "sip:1992001@192.168.1.253"
Sip-Translated-Request-URI =
"sip:1992001@192.168.1.113:11001;user=phone"
Acct-Session-Id =
"CF8F4CE6-A085-413A-B2E1-CD70D396EBBD(a)192.168.1.178"
Sip-To-Tag = "90d69e0f71f15064"
Sip-From-Tag = "3735508357"
Sip-CSeq = "36572"
NAS-IP-Address = 192.168.1.253
NAS-Port-Id = 5060
Acct-Delay-Time = 0
Entro a rad_accounting
Entro a rad_accounting_sql
must_update_client_fst_ack=TRUE
Calling Corrected = 1992005
Called Corrected = 1992001
Entro a rad_send_reply
Sending Accounting Ack of id 90 to c0a801fd (nas linux)
radrecv: Accounting Request from host c0a801fd code=4, id=91, length=278
Acct-Status-Type = Start
Service-Type = Sip-Session
Sip-Response-Code = 200
Sip-Method = Bye
User-Name = "1992005(a)192.168.1.253"
Calling-Station-Id = "sip:1992005@192.168.1.253:11005"
Called-Station-Id = "sip:1992001@192.168.1.253"
Sip-Translated-Request-URI =
"sip:1992001@192.168.1.113:11001;user=phone"
Acct-Session-Id =
"CF8F4CE6-A085-413A-B2E1-CD70D396EBBD(a)192.168.1.178"
Sip-To-Tag = "90d69e0f71f15064"
Sip-From-Tag = "3735508357"
Sip-CSeq = "36572"
NAS-IP-Address = 192.168.1.253
NAS-Port-Id = 5060
Acct-Delay-Time = 0
Entro a rad_accounting
Entro a rad_accounting_sql
must_update_client_fst_ack=TRUE
Calling Corrected = 1992005
Called Corrected = 1992001
Entro a rad_send_reply
Sending Accounting Ack of id 91 to c0a801fd (nas linux)
( the previous output corresponds to when called user answer the phone.
According to my ser.cfg, at a BYE or CANCEL message an Acct-Stop should
be sent, but no stop messege is seen at the RADIUS output )
Any hint ?
Regards,
Lucas
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.296 / Virus Database: 265.6.5 - Release Date: 26/12/2004
All I did was run FreeRADIUS in debug mode to see what attributes it was
being sent. Sip-Uri-User happened to be one of them which contained the
username. So it's just a case of adding an additional rad check item.
With FreeRADIUS using MySQL as the back end, you would have the following in
the radcheck table
+----+----------------------------+---------------+----+------------+
| id | UserName | Attribute | op | Value |
+----+----------------------------+---------------+----+------------+
| 1 | 01913405062(a)mydomain.com | User-Password | == | testing123 |
| 2 | 01913405062(a)mydomain.com | Sip-Uri-User | == | 01913405062 |
+----+----------------------------+---------------+----+------------+
in a similar way as you would set the Sip-Rpid in the radreply table.
The ser config remains the same as it would for standard authentication,
nothing in that needs to be changed!
-----Original Message-----
From: Bruno Lopes F. Cabral [mailto:bruno@openline.com.br]
Sent: 22 December 2004 15:13
To: hostmaster(a)telcoelectronics.co.uk
Subject: Re: [Serusers] SER + RADIUS
I'd like to see a ser.cfg snippet, if you can of course,
because I could not find how to do this on my tests,
nor get help on this from the list :~)
Thanks for answering, anyway
hostmaster(a)telcoelectronics.co.uk wrote:
> With regards to the check_to functionality when using RADIUS, you can
always
> add an additional check constraint for Sip-Uri-User which does the same
job.
>> RADIUS auth works but without check_to and
>> check_from (to solve this, use an Exec-Program-Wait
>> script to deny the access). Sorry, no SIP
>> Session-timeout
-------------------------------------------------------------------------------------------------------
This email, and any files transmitted with it, is copyright and may contain confidential information.
The contents are intended for the use of the addressee(s) only.
Unauthorized use may be unlawful.
If you receive this email by mistake, please advise sender immediately.
The views of the author may not necessarily constitute the views of Telco Electronics Limited.
Nothing in this mail shall bind Telco Electronics Limited in any contract or obligation.
Telco Electronics Limited
6-8 Oxford Court
Brackley
Northants
NN13 7XY
Tel 01280 761600
Fax 01280 841174
Hello
I have serweb installed. Tried send im function. "200 OK" is returned. But
the receiver doesn't get any message. What might be the problem?
thanks!
steven
Hi guys
Well, for 2 weeks i've been trying to solve this problem with no sucess. I've configured my ser.cfg in order to auth my users by mysql. MySQL is working perfect, with all tables created by ser_mysql.sh. I can consult any table or database as usual. When I run SER with the default ser.cfg (that comes with ser unaltered) any user can connect to the server, but when a configure it not to do so, that's to say, auth at mysql database, they can't, I receive an 401 Error.
All the mysql and auth modules are loaded, and i receive no errors at the logs when I run SER. What can be that ?? Why is it not working ?
My ser.cfg file is attached below for more information.
Any help will be apreciated.
Thanks in Advance
--
Felipe Martins
Linux System Administrator
Tep Solution Provider
Mundivox Communications
Rua Lauro Muller, 116/Sala 505
RJ - Brasil - 22290-906
Tel.: 55 21 3820-8839
Fax.: 55 21 3820-8844
Has anyone seen this problem? We're basically seeing SER freeze up while
running external processes. Any suggestions other than "don't do it"?
:-)
-----Original Message-----
From: Matt Schulte
Sent: Thursday, December 23, 2004 7:14 AM
To: serusers(a)lists.iptel.org
Subject: [Serusers] exec_dset fork "limit"?
We're running into a limitation with possibly SER (or the exec module).
We have a perl script which runs LCR based on from/to headers in the SIP
message. Because it's a rather complex script it can take up to a half
second to run. It runs everytime we have an invite of course, the
problem we're having is that it appears SER can only fork a maximum of 4
or 5 exec's at a time. When that limit gets reached the exec processes
tend to hang.
This is quoted from the exec module manual:
---
1.5. Known Issues
There is currently no guarantee that scripts ever return and stop
blocking SIP server. (There is kill.c but it is not used along with the
current mechanisms based on popen. Besides that kill.c is ugly).
---
Does anyone have suggestions? We're working on optimizing our lcr script
of course, possibly something socket or daemon based.
Thanks,
Matt
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers