Hi Rodney,
The entire conversation is in UDP. I've attached the SIP packets from
the ethereal trace.
Bart...
-----Original Message-----
From: Dr. Rodney G. McDuff [mailto:mcduff@its.uq.edu.au]
Sent: 07 March 2006 23:38
To: Bart J. Smit; serusers(a)lists.iptel.org
Subject: Re: [Serusers] SER + Asterisk; BYE gets 404
Hi Bart
Have you got the SER box doing any (TCP/UDP) protocol conversion.
Ie is your phone using TCP (as * only does UDP).
Bart J. Smit wrote:
> I am running ser 0.9.6 on CentOS 4.2 with asterisk on the same box
> listening on 5065.
>
> When I register a phone with ser, I can call XXXX(a)pbx.nexusmgmt.com
and
> these calls are forwarded to the asterisk on a forward(<external
> IP>,5065). I've attached my full routing block below.
>
> After hanging up from either phone, the BYE packet never gets
delivered.
> It shows up in ethereal as being addressed to the external IP address
of
> the box and it gets a 404 in reply.
>
> When I register a phone directly with the Asterisk, I can hang up from
> either end as normal, so the issue must be with ser.
>
> Any hints on how I can route the BYE packets correctly?
>
> Thanks,
>
> Bart...
>
>
> route {
>
> #
> -----------------------------------------------------------------
> # Sanity Check Section
> #
> -----------------------------------------------------------------
> if (!mf_process_maxfwd_header("10")) {
> sl_send_reply("483", "Too Many Hops");
> break;
> };
>
> if (msg:len > max_len) {
> sl_send_reply("513", "Message Overflow");
> break;
> };
> #
> -----------------------------------------------------------------
> # Record Route Section
> #
> -----------------------------------------------------------------
> if (method!="REGISTER") {
> record_route();
> };
>
> #
> -----------------------------------------------------------------
> # Loose Route Section
> #
> -----------------------------------------------------------------
> if (loose_route()) {
> t_relay();
> break;
> };
>
> #
> -----------------------------------------------------------------
> # Call Type Processing Section
> #
> -----------------------------------------------------------------
> if (uri=~"sip:[0-9]{4}@pbx\.nexusmgmt\.com") {
> forward(65.126.236.148,5065);
> break;
> };
> if (uri!=myself) {
> route(1);
> break;
> };
>
> if (method=="CANCEL") {
> route(1);
> break;
> } else if (method=="INVITE") {
> route(3);
> break;
> } else if (method=="REGISTER") {
> route(2);
> break;
> };
>
> lookup("aliases");
> if (uri!=myself) {
> route(1);
> break;
> };
>
> if (!lookup("location")) {
> sl_send_reply("404", "User Not Found");
> break;
> };
>
> route(1);
> }
>
> route[1] {
>
> #
> -----------------------------------------------------------------
> # Default Message Handler
> #
> -----------------------------------------------------------------
>
> t_on_reply("1");
>
> if (!t_relay()) {
> sl_reply_error();
> };
> }
>
> route[2] {
>
> #
> -----------------------------------------------------------------
> # REGISTER Message Handler
> #
> ----------------------------------------------------------------
>
> sl_send_reply("100", "Trying");
>
> if (!www_authorize("","subscriber")) {
> www_challenge("","0");
> break;
> };
>
> if (!check_to()) {
> sl_send_reply("401", "Unauthorized");
> break;
> };
>
> consume_credentials();
>
> if (!save("location")) {
> sl_reply_error();
> };
> }
>
> route[3] {
>
> #
> -----------------------------------------------------------------
> # INVITE Message Handler
> #
> -----------------------------------------------------------------
>
> if (!proxy_authorize("","subscriber")) {
> proxy_challenge("","0");
> log(1,"authenticate please\n");
> break;
> } else if (!check_from()) {
> sl_send_reply("403", "Use From=ID");
> break;
> };
>
> lookup("aliases");
> if (uri!=myself) {
> route(1);
> break;
> };
>
> if (!lookup("location")) {
> sl_send_reply("404", "User Not Found");
> break;
> };
>
> route(1);
> }
>
> _______________________________________________
> Serusers mailing list
> serusers(a)lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
>
--
Dr. Rodney G. McDuff |Ex ignorantia ad sapientiam
Manager, Strategic Technologies Group| Ex luce ad tenebras
Information Technology Services |
The University of Queensland |
EMAIL: mcduff(a)its.uq.edu.au |
TELEPHONE: +61 7 3365 8220 |
Hi,
based on the latest requests/patches from several users, some functions
from nathelper module got their functionality upgraded:
- fix_nated_sdp() may take one more parameter to force a specific IP
instead of the signalling IP.
See discussion thread
http://www.openser.org/pipermail/devel/2006-February/002078.html
Ex: fix_nated_sdp("2","192.168.2.100");
Pseudo-variables are also supported in the IP definition.
- force_rtp_proxy() accepts a new flag 's' to swap the
creation/confirmation of RTP session between
requests and replies (this is needed to be able to cope with SDPs
advertised via 200OK / ACK)
See discussion thread
http://www.openser.org/pipermail/devel/2006-February/002042.html
Ex: force_rtp_proxy("s");
- add_rcv_param() may take as parameter a flag telling if the parameter
should go to the contact URI
or contact header; make sense if you forward REGISTER requests and
need the registrar to save the
parameter as part of URI.
See Discussion thread
http://www.openser.org/pipermail/devel/2006-February/002103.html
Ex: add_rcv_param("1"); # add it as URI param
on line docs were also updated.
regards,
bogdan
Hi,
presence agent (PA module in ser) handles SUBSCRIBE requests and
generates NOTIFY. But according your description it seems that you
don't use PA module, thus SUBSCRIBE requests are only redirected. In
default configuration is PA module not present, I think. You can try to
read presence handbook about SER presence modules
(ftp://ftp.iptel.org/pub/ser/presence/presence_book.xhtml). It is a bit
outdated but not too much.
Vaclav
On Tue, Mar 07, 2006 at 10:01:47PM -0300, Gustavo Moreira wrote:
> I have installed my SER on a Debian Sarge.
>
> I'm trying it with the Windows Messenger and it works fine, but sometimes,
> the clients don't see each other. For example, if I'm connected and another
> user sign in, I can see his status (available) but he see me offline. If I
> relogon we can see each other normally.
>
> I think this is not the normal behaviour, isn't it?
>
> My doubt is: The presence agent manage the presence off all users or just
> redirect the SUSCRIBE or NOTIFY messages??
>
> Thanks!!!!
>
> _______________________________________________
> Serusers mailing list
> serusers(a)lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
I have installed my SER on a Debian Sarge.
I'm trying it with the Windows Messenger and it works fine, but sometimes,
the clients don't see each other. For example, if I'm connected and another
user sign in, I can see his status (available) but he see me offline. If I
relogon we can see each other normally.
I think this is not the normal behaviour, isn't it?
My doubt is: The presence agent manage the presence off all users or just
redirect the SUSCRIBE or NOTIFY messages??
Thanks!!!!
I am running ser 0.9.6 on CentOS 4.2 with asterisk on the same box
listening on 5065.
When I register a phone with ser, I can call XXXX(a)pbx.nexusmgmt.com and
these calls are forwarded to the asterisk on a forward(<external
IP>,5065). I've attached my full routing block below.
After hanging up from either phone, the BYE packet never gets delivered.
It shows up in ethereal as being addressed to the external IP address of
the box and it gets a 404 in reply.
When I register a phone directly with the Asterisk, I can hang up from
either end as normal, so the issue must be with ser.
Any hints on how I can route the BYE packets correctly?
Thanks,
Bart...
route {
#
-----------------------------------------------------------------
# Sanity Check Section
#
-----------------------------------------------------------------
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483", "Too Many Hops");
break;
};
if (msg:len > max_len) {
sl_send_reply("513", "Message Overflow");
break;
};
#
-----------------------------------------------------------------
# Record Route Section
#
-----------------------------------------------------------------
if (method!="REGISTER") {
record_route();
};
#
-----------------------------------------------------------------
# Loose Route Section
#
-----------------------------------------------------------------
if (loose_route()) {
t_relay();
break;
};
#
-----------------------------------------------------------------
# Call Type Processing Section
#
-----------------------------------------------------------------
if (uri=~"sip:[0-9]{4}@pbx\.nexusmgmt\.com") {
forward(65.126.236.148,5065);
break;
};
if (uri!=myself) {
route(1);
break;
};
if (method=="CANCEL") {
route(1);
break;
} else if (method=="INVITE") {
route(3);
break;
} else if (method=="REGISTER") {
route(2);
break;
};
lookup("aliases");
if (uri!=myself) {
route(1);
break;
};
if (!lookup("location")) {
sl_send_reply("404", "User Not Found");
break;
};
route(1);
}
route[1] {
#
-----------------------------------------------------------------
# Default Message Handler
#
-----------------------------------------------------------------
t_on_reply("1");
if (!t_relay()) {
sl_reply_error();
};
}
route[2] {
#
-----------------------------------------------------------------
# REGISTER Message Handler
#
----------------------------------------------------------------
sl_send_reply("100", "Trying");
if (!www_authorize("","subscriber")) {
www_challenge("","0");
break;
};
if (!check_to()) {
sl_send_reply("401", "Unauthorized");
break;
};
consume_credentials();
if (!save("location")) {
sl_reply_error();
};
}
route[3] {
#
-----------------------------------------------------------------
# INVITE Message Handler
#
-----------------------------------------------------------------
if (!proxy_authorize("","subscriber")) {
proxy_challenge("","0");
log(1,"authenticate please\n");
break;
} else if (!check_from()) {
sl_send_reply("403", "Use From=ID");
break;
};
lookup("aliases");
if (uri!=myself) {
route(1);
break;
};
if (!lookup("location")) {
sl_send_reply("404", "User Not Found");
break;
};
route(1);
}
I have my peers registered to SER.asterisk seems to be sending mwi for
the peers seen in the sip show peers CLI command. i have my ser server
registered with asterisk as a type=friend and all clients register to
ser.how do i get mwi to work for these clients registered to SER.
Thank you,
-AA
I have a solid setup of OpenSER and PostgreSQL. My route in question looks
like this
if(method=="REGISTER") {
if (!www_authorize("domain", "subscriber")) {
www_challenge("domain", "0");
return;
};
save("location");
return;
}
I would like to use a view called subscriber_active instead of table
subscriber. It's a view that returns a result set identical to SELECT * FROM
subscriber. I also did INSERT INTO version(table_name,table_version)
VALUES('subscriber_active',1). When I replace the subscriber with
subscriber_active in the above route, I get
0(0) auth_db:str_fixup: Invalid table version (use ser_mysql.sh reinstall)
0(0) ERROR: fix_expr : fix_actions error
ERROR: error -1 while trying to fix configuration
so can someone explain what the table version is supposed to be?
Hi,
I'm running cvs on a centos installation but having problems killing all
childrens. I'm using basic init scripts (redhat)
It seems that two or more are in R state and needs to be killed by -9...
Any hints are appreciated :-)
br hw
Hi,
I run SER with Radius/MySQL for authentication and accounting.
Things are pretty much in place except for group checking. I have something
like this in my ser.cfg:
....
modparam("auth_radius", "radius_config",
"/etc/radiusclient-ng/radiusclient.conf")
modparam("group_radius", "use_domain", 1)
.....
if (uri=~"^sip:[0-9]{8}@") { # Domestic PSTN
if (!radius_is_user_in("credentials", "ld")) {
sl_send_reply("403", "No permission for domestic
calls");
return;
};
route(4);
return;
};
....
When I look at Radius debug log I can see that when ser sends a request to
radius, radius wants to do digest on it and then the complete request fails
and call can't go through. Output looks something like this:
..
rad_recv: Access-Request packet from host 127.0.0.1:34027, id=18, length=72
User-Name = "81000(a)sage.home.local"
Sip-Group = "voicemail"
Service-Type = Group-Check
NAS-Port = 0
NAS-IP-Address = 127.0.0.1
Processing the authorize section of radiusd.conf
..
** bunch of sql statements ...
..
modcall: group authorize returns ok for request 17
rad_check_password: Found Auth-Type Digest
auth: type "digest"
Processing the authenticate section of radiusd.conf
modcall: entering group authenticate for request 17
ERROR: No Digest-Nonce: Cannot perform Digest authentication
modcall[authenticate]: module "digest" returns invalid for request 17
modcall: group authenticate returns invalid for request 17
auth: Failed to validate the user.
In databases I have following:
mysql> SELECT id,UserName,Attribute,Value,op FROM radreply WHERE Username =
'81000(a)sage.home.local' ORDER BY id;
+----+-----------------------+--------------+-------------+----+
| id | UserName | Attribute | Value | op |
+----+-----------------------+--------------+-------------+----+
| 18 | 81000(a)sage.home.local | Service-Type | Group-Check | := |
+----+-----------------------+--------------+-------------+----+
1 row in set (0.00 sec)
mysql> SELECT id,UserName,Attribute,Value,op FROM radcheck WHERE Username =
'81000(a)sage.home.local' ORDER BY id;
+----+-----------------------+---------------+------------------------------
------+----+
| id | UserName | Attribute | Value
| op |
+----+-----------------------+---------------+------------------------------
------+----+
| 23 | 81000(a)sage.home.local | User-Password |
$1$d7XAeahG$9f17cb8JaKj8R1z9GpwG4/ | := |
| 25 | 81000(a)sage.home.local | Sip-Rpid | 81000
| = |
| 30 | 81000(a)sage.home.local | Auth-Type | Digest
| := |
+----+-----------------------+---------------+------------------------------
------+----+
mysql> SELECT
radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupche
ck.Value,radgroupcheck.op FR
OM radgroupcheck,usergroup WHERE usergroup.Username =
'81000(a)sage.home.local' AND usergroup.GroupName = radgroupcheck.G
roupName ORDER BY radgroupcheck.id;
+----+-----------+-----------+--------+----+
| id | GroupName | Attribute | Value | op |
+----+-----------+-----------+--------+----+
| 12 | voicemail | Auth-Type | Accept | := |
+----+-----------+-----------+--------+----+
Has anyone had a chance to do something like this with success? I am stuck
at the moment - any help is greatly appreciated.
Thanks.
/Vel