The easiest way you can do is label INVITEs which are rtp-proxied with a special header
(append_hf('P-Nat-foo: bar\r\n')) and don't rtp-proxy an INVITE if such a header is
already present (is_present_hf("P-Nat-foo")). The rationale is one RTP proxy in the
path is good enough.
There is lot of other heuristics you could do, but that would be no longer a short
email.
-jiri
At 11:43 AM 12/8/2003, dhiraj.2.bhuyan(a)bt.com wrote:
>Hello List,
>
>I have the following settings -
>
>[ UA1 ] <-------> [ SER/RTP Proxy 1] <--------> [ SER/RTP Proxy 2] <-------> [ UA2 ]
>
>Both SERs are configured to force RTP Proxy whether or not the UA is behind NAT (I know this is not required, but is necessary for what I am trying to do - basically some IPSec and 3GPP things). UA1 is registered to SER1 and UA2 is registered to SER2. I tried setting up a call between UA1 and UA2 - but could not hear anything on either ends. I monitored the network traffic (SIP and SDP messages appear to be fine - ethereal dump attached) and found that the RTP Proxy 1 does not forward the traffic to RTP Proxy 2 and vice versa. RTP traffic from UA1 goes to RTP Proxy 1 and does not go any further. Similary, RTP traffic from UA2 just hangs at RTP Proxy 2. I am aware of the fact that the RTP proxy waits for one UDP packet from both UAs before forwarding the RTP traffic only if both the UAs have SIP URI that belong to the same domain - otherwise they should forward the traffic immediately. In my test case, the RTP proxies should have forwarded the RTP traffic without waiting (since UA1 and UA2 belong to two different domain) - and this appears to be failing. Can anyone throw some light on this? I am attaching my SER config file (both SERs have exactly the same config file - other than the alias domain part). I am using SER from the CVS (1st December).
>
>I am attaching the ethereal dump of the SIP messaging (just to confirm that SIP/SDP exchanges went fine). Note that -
>UA1 - 132.146.196.18
>UA2 - 132.146.196.49
>SER1 - 132.146.196.75 (bump1.alien.bt.co.uk)
>SER2 - 132.146.196.49 (eniac.alien.bt.co.uk)
>
>Thanks,
>
>Dhiraj Bhuyan
>Network Security Specialist,
>BT Exact Business Assurance Solutions
>
>Tel: +44 1473 643932
>Mob: +44 7962 012145
>Email: dhiraj.2.bhuyan(a)bt.com
>
>
>_______________________________________________
>Serusers mailing list
>serusers(a)lists.iptel.org
>http://lists.iptel.org/mailman/listinfo/serusers
--
Jiri Kuthan http://iptel.org/~jiri/
Hello List,
I have the following settings -
[ UA1 ] <-------> [ SER/RTP Proxy 1] <--------> [ SER/RTP Proxy 2] <-------> [ UA2 ]
Both SERs are configured to force RTP Proxy whether or not the UA is behind NAT (I know this is not required, but is necessary for what I am trying to do - basically some IPSec and 3GPP things). UA1 is registered to SER1 and UA2 is registered to SER2. I tried setting up a call between UA1 and UA2 - but could not hear anything on either ends. I monitored the network traffic (SIP and SDP messages appear to be fine - ethereal dump attached) and found that the RTP Proxy 1 does not forward the traffic to RTP Proxy 2 and vice versa. RTP traffic from UA1 goes to RTP Proxy 1 and does not go any further. Similary, RTP traffic from UA2 just hangs at RTP Proxy 2. I am aware of the fact that the RTP proxy waits for one UDP packet from both UAs before forwarding the RTP traffic only if both the UAs have SIP URI that belong to the same domain - otherwise they should forward the traffic immediately. In my test case, the RTP proxies should have forwarded the RTP traffic without waiting (since UA1 and UA2 belong to two different domain) - and this appears to be failing. Can anyone throw some light on this? I am attaching my SER config file (both SERs have exactly the same config file - other than the alias domain part). I am using SER from the CVS (1st December).
I am attaching the ethereal dump of the SIP messaging (just to confirm that SIP/SDP exchanges went fine). Note that -
UA1 - 132.146.196.18
UA2 - 132.146.196.49
SER1 - 132.146.196.75 (bump1.alien.bt.co.uk)
SER2 - 132.146.196.49 (eniac.alien.bt.co.uk)
Thanks,
Dhiraj Bhuyan
Network Security Specialist,
BT Exact Business Assurance Solutions
Tel: +44 1473 643932
Mob: +44 7962 012145
Email: dhiraj.2.bhuyan(a)bt.com
Wangji,
Not sure, but normally you need to force_rport and fix_nated_contact at
registration, before you save to DB.
Jaime
From: jimmy way <jimway71(a)yahoo.com> on 01/12/2003 04:15
To: serusers(a)lists.iptel.org
cc:
Subject: Re: [Serusers] nathelper question
I use Ser verion 0.8.12-0 (rpm).
System use redhat linux 7.2
--- jimmy way <jimway71(a)yahoo.com> wrote:
> Hi all,
> The problem is I can't register two SIP UAs to
> SER
> server.
>
> This is my environment:
> Internet
> |
> router (X.X.X.163)
> |
> |Fiber |---- Ser server (X.X.X.166)
> | |
> Switch------|---- Trunk Gateway (X.X.X.167)
> |
> |---- Other servers
> |
> |---- Router( cisco 26xx) (X.X.X.163)
> |
> Switch
> |
> _____________________|_________________
> Users SIP UA1(172.16.2.11) SIP UA2(172.16.2.23)
>
>
>
>
> My ser.cfg like:
> route{
> if ( msg:len > max_len ) {
>
> sl_send_reply("513", "Message too
> big");
> break;
> };
> record_route();
> if (loose_route()) {
> t_relay();
> break;
> };
>
> if (!method=="BYE") {
> force_rport();
> fix_nated_contact();
> };
>
> if (method=="REGISTER") {
> if (!www_authorize("novsky.com",
> "subscriber")) {
> www_challenge("novsky.com",
> "1");
> break;
> };
> save("location");
> break;
> };
>
> if (method=="INVITE") {
>
> if(!proxy_authorize("novsky.com","subscriber")) {
>
> proxy_challenge("novsky.com","1");
> break;
> };
> };
>
> if(uri=~"^sip:6169[0-9]*@[0-9|\.]*") {
> if(!lookup("location")) {
> sl_send_reply("404", "Not
> Found");
> break;
> };
> }else {
> forward(172.16.255.2,6050);
> break;
> };
> if (!t_relay()) {
> sl_reply_error();
> };
> }
> I use ethereal to look the packet, first UA1 send
> REGISTER to SER server, on NAT it use 5060 port, and
> SER return to corrent address/port.
> When UA2 send REGISTER to SER server, on NAT it use
> 1027 port, but SER return to NAT:5060 port and the
> packet transfered to UA1.
> So UA2 can't register.
> I can see the NAT table on route, like
> udp x.x.x.165:5060 172.16.2.11:5060 x.x.x.165:5060
> x.x.x.x.165:5060
> udp x.x.x.165:5060 172.16.2.23:5060 x.x.x.165:1025
> x.x.x.x.165:1025
>
> Wangji
> 12/1/03
>
> __________________________________
> Do you Yahoo!?
> Protect your identity with Yahoo! Mail AddressGuard
> http://antispam.yahoo.com/whatsnewfree
>
> _______________________________________________
> Serusers mailing list
> serusers(a)lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers
*******************************************************************************
Important.
Confidentiality: This communication is intended for the above-named person and
may be confidential and/or legally privileged. Any opinions expressed in this
communication are not necessarily those of the company. If it has come to you
in error you must take no action based on it, nor must you copy or show it to
anyone; please delete/destroy and inform the sender immediately.
Monitoring/Viruses
Orange may monitor all incoming and outgoing emails in line with current
legislation. Although we have taken steps to ensure that this email and
attachments are free from any virus, we advise that in keeping with good
computing practice the recipient should ensure they are actually virus free.
Orange PCS Limited is a subsidiary of Orange SA and is registered in England No
2178917, with its address at St James Court, Great Park Road, Almondsbury Park,
Bradley Stoke, Bristol BS32 4QJ.
*******************************************************************************
Guys, please help me out here.
When I uncomment this in my ser.cfg:
if (!www_authorize("telepacket.com", "subscriber")) {
www_challenge("telepacket.com", "0");
break;
};
my Cisco 7960 phones are unable to register with the ser Server.
Basically, the phone sends a REGISTER, and the ser server sends back 401 Unauthorized. How do I allow the phones to be authorized? If I comment these lines, the ser works great and my two phones can call each other.
I am using a mysql database... Is there a command to add a registered device?
NGREP shows this:
U 206.194.77.243:50208 -> 206.194.77.241:5060
REGISTER sip:206.194.77.241 SIP/2.0..Via: SIP/2.0/UDP 206.194.77.243:5060..From: sip:ctest@206.194.77.241..To: sip:ctest@206.194.77.241..Call-ID: 00036b3c-2e33007e-653539fe-
314cbc28@206.194.77.243..Date: Thu, 04 Dec 2003 21:40:40 GMT..CSeq: 102 REGISTER..User-Agent: CSCO/4..Contact: sip:ctest@206.194.77.243:5060..Authorization: Digest username=
"LINE 2",realm="telepacket.com",uri="sip:206.194.77.241",response="1c90541dc3d33153cfd9d278c2171e18",nonce="3fcfaa82021d76bd83d8ef539ff0a49ca92e2d54",algorithm=md5..Content-
Length: 0..Expires: 3600....
#
U 206.194.77.241:5060 -> 206.194.77.243:5060
SIP/2.0 401 Unauthorized..Via: SIP/2.0/UDP 206.194.77.243:5060..From: sip:ctest@206.194.77.241..To: sip:ctest@206.194.77.241;tag=b27e1a1d33761e85846fc98f5f3a7e58.904a..Call-
ID: 00036b3c-2e33007e-653539fe-314cbc28@206.194.77.243..CSeq: 102 REGISTER..WWW-Authenticate: Digest realm="telepacket.com", nonce="3fcfaa82021d76bd83d8ef539ff0a49ca92e2d54"
..Server: Sip EXpress router (0.8.12 (i386/linux))..Content-Length: 0..Warning: 392 206.194.77.241:5060 "Noisy feedback tells: pid=13375 req_src_ip=206.194.77.243 req_src_p
ort=50208 in_uri=sip:206.194.77.241 out_uri=sip:206.194.77.241 via_cnt==1"....
It would appear that SER v0.8.12 is performing URI matching against the
INVITE line rather than the To: header. This appears to cause problems
with Snom phones. Below is the initial INVITE request sent by a Snom
200:
INVITE sip:172.21.30.53 SIP/2.0..Via: SIP/2.0/UDP 172.21.20.89:5060;branch=
z9hG4bK-d4iq2xxwsyff..Route: <sip:5803932@172.21.30.53;user=phone>..From: "
xxxxxx" <sip:IC89@172.21.30.53>;tag=tf5tyz77r1..To: <sip:5803932@172.21.30.
53;user=phone>..Call-ID: 3c267820f20d-hj2ilvrq6eoj@172-21-20-89..CSeq: 1 IN
VITE..Max-Forwards: 70..Contact: <sip:IC89@172.21.20.89:5060;line=1>..User-
Agent: snom200-2.02t..Accept-Language: en..Accept: application/sdp..Allow:
INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, NOTIFY, SUBSCRIBE, PRACK, MESSAGE
, INFO..Supported: timer, 100rel, replaces..Session-Expires: 7200..Content-
Type: application/sdp..Content-Length: 270....v=0..o=root 9679 9679 IN IP4
172.21.20.89..s=SIP Call..c=IN IP4 172.21.20.89..t=0 0..m=audio 10010 RTP/A
VP 0 8 3 18 97..a=rtpmap:0 pcmu/8000..a=rtpmap:8 pcma/8000..a=rtpmap:3 gsm/
8000..a=rtpmap:18 g729/8000..a=rtpmap:97 telephone-event/8000..a=fmtp:97 0-
15..a=sendrecv..
The SER configuration has the following directive:
if (uri=~"^sip:580[0-9][0-9][0-9][0-9]@") {
log(1, "Local call sent to gateway");
rewritehost("172.21.30.51");
t_relay();
break;
};
This fails to match the above request even though the To: header in the
above request contains the necessary pattern. This same configuration
works fine with a Cisco phone, but it's INVITE request contains the a
complete URI:
INVITE sip:5803932@172.21.30.51 SIP/2.0..Max-Forwards: 10..Record-Route: <s
ip:5803932@172.21.30.53;ftag=f2be0b0014cdf23a7f153-5b3b8b0b;lr=on>..Via: SI
P/2.0/UDP 172.21.30.53;branch=z9hG4bK72cc.024d7ee4.0..Via: SIP/2.0/UDP 172.
21.20.225:5060..From: "IC225" <sip:IC225@172.21.30.53>;tag=f2be0b0014cdf23a
7f153-5b3b8b0b..To: <sip:5803932@172.21.30.53>..Call-ID: 000bbef2-df4c0003-
6004eb37-6333d578@172.21.20.225..Date: Thu, 04 Dec 2003 20:42:51 GMT..CSeq:
101 INVITE..Expires: 180..User-Agent: Cisco-SIP-IP-Phone/2..Accept: applic
ation/sdp..Contact: sip:IC225@172.21.20.225:5060..Content-Type: application
/sdp..Content-Length: 222....v=0..o=CiscoSystemsSIP-IPPhone-UserAgent 8030
16590 IN IP4 172.21.20.225..s=SIP Call..c=IN IP4 172.21.20.225..t=0 0..m=au
dio 26274 RTP/AVP 0 8 18 96..a=rtpmap:0 pcmu/8000..a=rtpmap:96 telephone-ev
ent/8000..a=fmtp:96 0-11..
Is there anything I can change in the ser.cfg to instruct SER to match
against the To: header?
--
Jamin W. Collins
Remember, root always has a loaded gun. Don't run around with it unless
you absolutely need it. -- Vineet Kumar
works fine, thanks
Klaus
> -----Original Message-----
> From: Jiri Kuthan [mailto:jiri@iptel.org]
> Sent: Friday, December 05, 2003 4:25 AM
> To: Klaus Darilion; serusers
> Subject: RE: [Serusers] OT: reaching ENUM numbers via iptel.org
>
>
> should now work even if # or * is used instead of leading +. -jiri
>
> At 05:23 PM 12/3/2003, Klaus Darilion wrote:
> >+4369911160036 (->darilion(a)obelix.ict.tuwien.ac.at) should
> be me or my
> >answering machine.
> >
> >Klaus
> >
> >> -----Original Message-----
> >> From: Jiri Kuthan [mailto:jiri@iptel.org]
> >> Sent: Wednesday, December 03, 2003 4:57 PM
> >> To: Klaus Darilion; serusers
> >> Subject: RE: [Serusers] OT: reaching ENUM numbers via iptel.org
> >>
> >>
> >> Tell me please a whole number so I can retry. thanks, -jiri
> >>
> >> At 10:30 AM 12/3/2003, Klaus Darilion wrote:
> >> >Hi Jiri!
> >> >
> >> >I tried *43699... but it doesn't work.
> >> >
> >> >Klaus
> >> >
> >> >> -----Original Message-----
> >> >> From: Jiri Kuthan [mailto:jiri@iptel.org]
> >> >> Sent: Monday, December 01, 2003 4:50 PM
> >> >> To: Klaus Darilion; serusers
> >> >> Subject: Re: [Serusers] OT: reaching ENUM numbers via iptel.org
> >> >>
> >> >>
> >> >> At 12:09 PM 12/1/2003, Klaus Darilion wrote:
> >> >> >Hi!
> >> >> >
> >> >> >How do I reach an ENUM subscriber when I'm registered to
> >> >> iptel.org? It works
> >> >> >using the '+' sign and the number (+43699...). But how can I
> >> >> call such a
> >> >> >number using a SIP-phone which doesn't support the '+'
> sign (like
> >> >> >BudgeTone)? I tried using double zeros (0043699...) but that
> >> >> doesn't work.
> >> >>
> >> >> Its changed to allow * as the lead character too.
> >> >>
> >> >> -jiri
> >> >>
> >> >>
> >>
> >> --
> >> Jiri Kuthan http://iptel.org/~jiri/
> >>
> >>
>
> --
> Jiri Kuthan http://iptel.org/~jiri/
>
>
I don't know the default time between subscribes (but it should not be more than a few mins) - but use ethereal to see the network traffic.
Also note that there is another bug with messenger 5.0 - it tries to send an instant message with the INVITE method instead of MESSAGE method (as per the standard). So instant messaging does not work with 5.0. Like someone suggested, use 4.6. But I prefer using linphone and kphone - they are very much reliable.
Dhiraj
-----Original Message-----
From: Morris, Scott [mailto:MorrisS@orau.gov]
Sent: 04 December 2003 19:30
To: Bhuyan,D,Dhiraj,XVR3 R
Subject: RE: [Serusers] Windows Messenger 5.0
What is that amount of time between subscribes? They never seem to update
no matter how long I leave them up.
Scott Morris
Enterprise Network Engineer
DOE - ORAU / ORISE
865-576-4672
-----Original Message-----
From: dhiraj.2.bhuyan(a)bt.com [mailto:dhiraj.2.bhuyan@bt.com]
Sent: Thursday, December 04, 2003 12:25 PM
To: Morris, Scott
Subject: RE: [Serusers] Windows Messenger 5.0
Maybe you missed my reply. Should answer your question - appending it again.
When UserA sends a SUBSCRIBE message to UserB, if UserB has UserA in its
list, it sends back a OK message. However it is not smart enough to update
the status of UserA (to online) on its own list. It just waits for its turn
to send the SUBSCRIBE message to UserA and then only if it gets an OK
response back from UserA will it update the status of UserA on its list. So
if you let UserA and UserB to be both online for a certain duration of time
( == time between two SUBSCRIBE attempts atleast), you will see the correct
status. Another stupid MS implememtation.
Dhiraj
-----Original Message-----
From: Morris, Scott [mailto:MorrisS@orau.gov]
Sent: 04 December 2003 13:32
To: Morris, Scott; 'Mario Kolberg'; serusers(a)lists.iptel.org
Subject: RE: [Serusers] Windows Messenger 5.0
Let me rephrase. I don't think it is SER. And I do agree it is Messenger.
When UserA signs out, the update is immediately seen by UserB that UserA is
offline. So, where is the update failing?
Scott Morris
Enterprise Network Engineer
DOE - ORAU / ORISE
865-576-4672
-----Original Message-----
From: Morris, Scott
Sent: Thursday, December 04, 2003 8:29 AM
To: 'Mario Kolberg'; serusers(a)lists.iptel.org
Subject: RE: [Serusers] Windows Messenger 5.0
I can't say it's a messenger issue. Messenger wants a contact list, and to
show you who is online and offline. Your phone doesn't do that. The phone
talks to SER to see if the person is signed in. Or does kphone and sipc
show users signed in?
Scott Morris
Enterprise Network Engineer
DOE - ORAU / ORISE
865-576-4672
-----Original Message-----
From: Mario Kolberg [mailto:mko@cs.stir.ac.uk]
Sent: Thursday, December 04, 2003 5:47 AM
To: Morris, Scott; serusers(a)lists.iptel.org
Subject: Re:[Serusers] Windows Messenger 5.0
I have made exactly the same observation. I treat it as a problem with
Messenger as it works fine between two kphone UAs or between sipc and
kphone. I'm running ser 0.8.12.
Mario
> I have 0.8.1 running on Suse 9.0. It works great with my Zultys
> phone, Polycom IP 600, and the Helmsen agent. When I try to use
> Windows Messenger 5.0 I have a slight problem.
>
> UserA signs in. UserB signs in, and sees that UserA is online, and
> there changes the UserA in the contact list on ONLINE. But UserB
> never shows as ONLINE on UserA's desktop. So UserA can't call UserB.
> The update never goes to UserA's desktop. What am I missing here?
--
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.
_______________________________________________
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
should now work even if # or * is used instead of leading +. -jiri
At 05:23 PM 12/3/2003, Klaus Darilion wrote:
>+4369911160036 (->darilion(a)obelix.ict.tuwien.ac.at) should be me or my
>answering machine.
>
>Klaus
>
>> -----Original Message-----
>> From: Jiri Kuthan [mailto:jiri@iptel.org]
>> Sent: Wednesday, December 03, 2003 4:57 PM
>> To: Klaus Darilion; serusers
>> Subject: RE: [Serusers] OT: reaching ENUM numbers via iptel.org
>>
>>
>> Tell me please a whole number so I can retry. thanks, -jiri
>>
>> At 10:30 AM 12/3/2003, Klaus Darilion wrote:
>> >Hi Jiri!
>> >
>> >I tried *43699... but it doesn't work.
>> >
>> >Klaus
>> >
>> >> -----Original Message-----
>> >> From: Jiri Kuthan [mailto:jiri@iptel.org]
>> >> Sent: Monday, December 01, 2003 4:50 PM
>> >> To: Klaus Darilion; serusers
>> >> Subject: Re: [Serusers] OT: reaching ENUM numbers via iptel.org
>> >>
>> >>
>> >> At 12:09 PM 12/1/2003, Klaus Darilion wrote:
>> >> >Hi!
>> >> >
>> >> >How do I reach an ENUM subscriber when I'm registered to
>> >> iptel.org? It works
>> >> >using the '+' sign and the number (+43699...). But how can I
>> >> call such a
>> >> >number using a SIP-phone which doesn't support the '+' sign (like
>> >> >BudgeTone)? I tried using double zeros (0043699...) but that
>> >> doesn't work.
>> >>
>> >> Its changed to allow * as the lead character too.
>> >>
>> >> -jiri
>> >>
>> >>
>>
>> --
>> Jiri Kuthan http://iptel.org/~jiri/
>>
>>
--
Jiri Kuthan http://iptel.org/~jiri/
hi all,
Try to use presence feature with MS messager 5.0, seems SUBSCRIBER can not work.
Can anybody have a look for the attached ser.cfg ?
Many thanks,
hong
----------------------------------
#debug=4 # debug level (cmd line: -dddddddddd)
#listen=192.168.8.96
#fork=no
#log_stderror=yes # (cmd line: -E)
#debug=7
#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
fifo="/tmp/ser_fifo"
# ------------------ 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"
# 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)
# -- 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");
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
record_route();
# loose-route processing
if (loose_route()) {
t_relay();
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("iptel.org", "subscriber")) {
# www_challenge("iptel.org", "0");
# break;
# };
save("location");
break;
};
if (method=="SUBSCRIBE") {
if (t_newtran()) {
handle_subscription("registrar");
};
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; use stateful forwarding; that
# works reliably even if we forward from TCP to UDP
if (!t_relay()) {
sl_reply_error();
};
}