Greetings,
I've got a small problem with how registration lookups work.
I have several concurrent registrations from one PBX that have multiple
contact URIs that they declare that aren't the same; they contain the
DIDs to route a call to. So, for instance, in Asterisk:
register => user:pass@registrar/DID1
register => user:pass@registrar/DID2
Of course, lookup() doesn't care what those contacts actually are. If
it sees multiple contacts for one username, t_relay() will simply create
branches for all of them and and ring them all. I can't actually have
that happen.
I'm looking for suggestions on how to handle this most elegantly. The
two options I've got in mind are:
1. Stop using lookup() and do my own URI rewrites and branch forking (if
the contact URIs are identical) with attention to the contact.
2. Use BRANCH-ROUTEs to arrest the call leg if it is going to an RURI
user part that does not match the user part of the contact URI, and...
drop() the branches?
I also need to build in some other logic, such that for example if a
user has only one contact registered and it does not match the DID, or
none of the contacts match the DID, proceed as normal anyway.
Is it possible there is a better way? Recommendations welcome.
Cheers,
-- Alex
--
Alex Balashov
Evariste Systems
Web : http://www.evaristesys.com/
Tel : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599
*Hi all,
** I'm trying to register few ata's to openser.*
*i puted two registrations to subscribers table.*
*but registaration allwais unauthorized.*
**
**
*ngrep output: *
*interface: eth0 (192.168.27.0/255.255.255.0)
filter: (ip) and ( port 5060 )*
*U 192.168.27.117:10186 -> 192.168.27.201:5060
REGISTER sip:192.168.27.201 SIP/2.0.
Via: SIP/2.0/UDP 192.168.27.117:10186;branch=z9hG4bK645148049;rport.
From: <sip:1000@192.168.27.201 <sip%3A1000(a)192.168.27.201>>;tag=604945105.
To: <sip:1000@192.168.27.201 <sip%3A1000(a)192.168.27.201>>.
Call-ID: 53873712-10186-1(a)192.168.27.117.
CSeq: 2000 REGISTER.
Contact: *.
Max-Forwards: 70.
User-Agent: Grandstream HT-502 V1.0B 1.0.1.8.
Expires: 0.
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER,
UPDATE.
Content-Length: 0.
.*
*
U 192.168.27.201:5060 -> 192.168.27.117:10186
SIP/2.0 401 Unauthorized.
Via: SIP/2.0/UDP 192.168.27.117:10186;branch=z9hG4bK645148049;rport=10186.
From: <sip:1000@192.168.27.201 <sip%3A1000(a)192.168.27.201>>;tag=604945105.
To: <sip:1000@192.168.27.201 <sip%3A1000(a)192.168.27.201>
>;tag=329cfeaa6ded039da25ff8cbb8668bd2.b963.
Call-ID: 53873712-10186-1(a)192.168.27.117.
CSeq: 2000 REGISTER.
WWW-Authenticate: Digest realm="192.168.27.201",
nonce="48998a3ba4544026eab5a8f7cf93dc258a5d26d7".
Server: OpenSER (1.3.2-notls (i386/linux)).
Content-Length: 0.
.
U 192.168.27.117:10186 -> 192.168.27.201:5060
REGISTER sip:192.168.27.201 SIP/2.0.
Via: SIP/2.0/UDP 192.168.27.117:10186;branch=z9hG4bK142179605;rport.
From: <sip:1000@192.168.27.201 <sip%3A1000(a)192.168.27.201>>;tag=604945105.
To: <sip:1000@192.168.27.201 <sip%3A1000(a)192.168.27.201>>.
Call-ID: 53873712-10186-1(a)192.168.27.117.
CSeq: 2001 REGISTER.
Contact: *.
Authorization: Digest username="1000", realm="192.168.27.201",
nonce="48998a3ba4544026eab5a8f7cf93dc258a5d26d7", uri="sip:19$
Max-Forwards: 70.
User-Agent: Grandstream HT-502 V1.0B 1.0.1.8.
Expires: 0.
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER,
UPDATE.
Content-Length: 0.
.
U 192.168.27.201:5060 -> 192.168.27.117:10186
SIP/2.0 401 Unauthorized.
Via: SIP/2.0/UDP 192.168.27.117:10186;branch=z9hG4bK142179605;rport=10186.
From: <sip:1000@192.168.27.201 <sip%3A1000(a)192.168.27.201>>;tag=604945105.
To: <sip:1000@192.168.27.201 <sip%3A1000(a)192.168.27.201>
>;tag=329cfeaa6ded039da25ff8cbb8668bd2.3c26.
Call-ID: 53873712-10186-1(a)192.168.27.117.
CSeq: 2001 REGISTER.
WWW-Authenticate: Digest realm="192.168.27.201",
nonce="48998a3ba4544026eab5a8f7cf93dc258a5d26d7".
Server: OpenSER (1.3.2-notls (i386/linux)).
Content-Length: 0.
openser.cfg
:#
# $Id: openser.cfg 1676 2007-02-21 13:16:34Z bogdan_iancu $
#
# simple quick-start config script
# Please refer to the Core CookBook at
http://www.openser.org/dokuwiki/doku.php
# for a explanation of possible statements, functions and parameters.
#
# ----------- global configuration parameters ------------------------
debug=3 # debug level (cmd line: -dddddddddd)
fork=yes
log_stderror=no # (cmd line: -E)
children=4
# Uncomment these lines to enter debugging mode
#fork=no
#log_stderror=yes
#
port=5060
# ------------------ module loading ----------------------------------
#set module path
mpath="//lib/openser/modules/"
# Uncomment this if you want to use SQL database
loadmodule "mysql.so"
loadmodule "sl.so"
loadmodule "tm.so"
loadmodule "rr.so"
loadmodule "maxfwd.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "textops.so"
loadmodule "mi_fifo.so"
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
loadmodule "auth.so"
loadmodule "auth_db.so"
# ----------------- setting module-specific parameters ---------------
# -- mi_fifo params --
modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")
# -- 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_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");
exit;
};
if (msg:len >= 2048 ) {
sl_send_reply("513", "Message too big");
exit;
};
# 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);
};
if (!uri==myself) {
# mark routing logic in request
append_hf("P-hint: outbound\r\n");
# if you have some interdomain connections via TLS
#if(uri=~"@tls_domain1.net") {
# t_relay("tls:domain1.net");
# exit;
#} else if(uri=~"@tls_domain2.net") {
# t_relay("tls:domain2.net");
# exit;
#}
route(1);
};
# 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.
if (!www_authorize("", "subscriber")) {
www_challenge("", "0");
exit;
};
save("location");
exit;
};
if (!proxy_authorize("","subscriber")) {
proxy_challenge("","0");
exit;
};
consume_credentials();
lookup("aliases");
if (!uri==myself) {
append_hf("P-hint: outbound alias\r\n");
route(1);
};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
exit;
};
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();
};
exit;
}
can not understand why this configuration is not working to me???
any help will be apreciated.
*
Hello List,
I have call forwarding on no answer and the possibility to set the time
out for the call. I do this by setting the value of "fr_inv_timer" with
"avp_fr_timer_avp".
Then when the call is route to user's phone and he has call forwarding
on no answer activate I overwrite the default INVITE timer with his
value. If the call is answered with the error message "Request Timeout
(408)" I replace the RURI with the new number, call append_branch() and
relay the message to myself.
Now the message goes again to my routing logic and will be relayed. I
also set a new timeout for the INVITE message, but still the value of
the customer is used. For example if the users has a ring time of 10
seconds the second call also rings only for 10 seconds.
How can I set the ringtime after append_branch() to my default value again?
Is this possible or should I change me routing logic to handle this kind
of feature? When I have to change it what is the best way to do this?
Thanks in advance
Jens
Hi all,
Bogdan-Andrei Iancu prepared this fork from Kamailio (formerly known as
OpenSER) since July. This was done secretly, we were not aware of this. We've
all done a great amount of work to resolve the existing trademark issues and
create a better organisational backing for the project. Many contributors
tried hard to improve the quality of the code base, a big number of bug and
documentation fixes were done, doxygen code documentation was greatly
extended.
Because of the project renaming our release schedule needed some adaptions. We
discussed this in the last week on the developer list and found a new release
date for Kamailio [1]. Version 1.4.0 will be released on the thursday, the 7.
august.
Cheers,
Henning Westerholt
[1] http://lists.kamailio.org/pipermail/devel/2008-July/014926.html
2008-08-06
cindy.cao
>Hello all:
>
>I am trying to add a user to mysql database with the command:
> serctl add 1000 1000 1000(a)ser.com
> but I get an error: SER/FIFO not accessible!
>and i consulted some documents which said it should be the permission
>problem. so i insert a line "fif0_mode=0777" into my "ser.cfg" and try the
>command again, but now my system halt!
>
> Any pointers to where to start debuging this error?
> Thanks so much
>
> Best Regards.
>Cindy
Hello,
I already received the first proposal, courtesy of Darren Sessions. You
can check at:
http://www.kamailio.org/pub/kamailio-logos/
This message is an invitation for all of you to submit proposals for the
new project logo. We are aware that the name is not making happy many
people out there and we can work to solve it, maybe over the time will
not look that bad or just send name suggestions. However, this should
not stop you being creative and help the project, in a transitional or
definitive state.
Looking forward to your contributions.
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.com
I'm just wondering if folks using the 2.0 have found so far any issue
which has not been tracked -- I've been off-line for vacation, IETF and
a couple of other trips and began to be uncertain if I might have missed
something. Any concerns/issues/comments regarding 2.0 are most welcome,
publicly or privately.
Thanks a lot
-jiri
Hello,
I was reading the README file on the download page of Mediaproxy and found
this statement:
This version of MediaProxy (2.0 or higher) cannot be used in combination
with any version of OpenSER older than 1.4 or any components of MediaProxy
older than 2.0. You must completely upgrade any previous installation of
OpenSER and MediaProxy to these new versions.
What i want to ask you is if this is really true because Openser 1.4
(kamailio) isn't available yet...
Can i use Mediaproxy 2.0 with Openser 1.3.2 or i need to wait for the
Openser 1.4?
Thanks in advance,
Nuno Marques
Hello Everybody,
as many expressed their intention for an openser/kamailio event in
Bucharest, next week, I am going to organize a dinner in a place with
nice Romanian beer, wine and food. Seeing the suggestions for the date,
I am proposing August 11, 2008 (Monday) -- let me know if you have
opinions. Exact hour and place will be sent as soon as I get an idea
about number of participants.
So far, expressed the intention to participate:
- Henning Westerholt, developer and board member
- Elena-Ramona Modroiu, developer and board member
- Daniel-Constantin Mierla, developer and board member
- Michiel ten Hagen
- Sebastian Schuman
Please write me if you want to attend, I need to know the number of
attendants to make the reservation. The event is in the same fashion as
the ones happening in Barcelona, Vienna, Berlin, ..., in the past --
everybody pays for its expenses.
If you want to have some preamble (might not be same place, but...), you
can check some photos from last similar event in Bucharest after the
ROSDEV2008 conference:
http://www.asipto.com/photos/ROSDEV2008-1-ALBUM/index1.html
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.com
David,
After double checking, I do seem to be getting E.164 formatted numbers
coming from the Cisco datasource, at least for the numbers we care about.
Following is an example, you can see that I am able to successfully match a
1800 # as 1800, test (I just can't rate a price to it).
id,StartTime,Username,CallerParty,Destination,DestinationId,DestinationName,Duration,Price,Gateway,KBIn,KBOut,Disconnect,Channel,Direction,CallType
1,2008-08-05 08:55:28,,5635833713,2415453,,,0,,208.66.128.72-ISDN-7,0,0,0,Normal
release,ISDN 7/2:D:2,outgoing,Telephony
2,2008-08-05 08:55:28,,5635833713,2415453,,,0,,208.66.128.72-ISDN-7,0,0,0,Normal
release,ISDN 7/0:D:1,incoming,Telephony
3,2008-08-05 08:55:11,,6082516000,19206750230,,,0,,208.66.128.72-ISDN-7,0,0,0,Normal
release,ISDN 7/1:D:22,outgoing,Telephony
4,2008-08-05 08:55:11,,6082516000,19206750230,,,0,,,0,0,0,Normal
release,,incoming,VoIP
5,2008-08-05 08:54:37,,6082888583,18004266918,1800,test,0,,208.66.128.72-ISDN-7,0,0,0,Normal
release,ISDN 7/1:D:18,outgoing,Telephony
On Fri, Aug 1, 2008 at 8:23 PM, David Villasmil <
david.villasmil.work(a)gmail.com> wrote:
> correct
>
> On Fri, Aug 1, 2008 at 8:11 PM, Brian Del Shasta <briandelshasta(a)gmail.com
> > wrote:
>
>> Okay, I'm using a Cisco datasource, so I'm assuming that would replace
>> OpenSER in the general schema, correct?
>>
>> _______________________________________________
>> Users mailing list
>> Users(a)lists.kamailio.org
>> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>>
>>
>