<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2604" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=755340805-10042005><FONT face=Arial
color=#0000ff size=2>Ok I found the problem, i wasn;t including the module
group.so, thats why i receievd the below error.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=755340805-10042005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=755340805-10042005><FONT face=Arial
color=#0000ff size=2>This is my issue now:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=755340805-10042005><FONT face=Arial
color=#0000ff size=2>budgetone with stun server set as fwd's , this phone works
fine</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=755340805-10042005><FONT face=Arial
color=#0000ff size=2>All others behind nat are broken, cant even dial to the
asterisk system.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=755340805-10042005><FONT face=Arial
color=#0000ff size=2>If I use a live ip on a phone it works
phone.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=755340805-10042005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=755340805-10042005><FONT face=Arial
color=#0000ff size=2>All i want to do is allow nat users to receive calls, i
seem to be heading round in circles.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=755340805-10042005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=755340805-10042005><FONT face=Arial
color=#0000ff size=2>My personal config allowed for nat users to call the
asterisk pabx & live ip phones, now the cfg </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=755340805-10042005><FONT face=Arial
color=#0000ff size=2>from onsip allows only calls between live ip
users.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=755340805-10042005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=755340805-10042005><FONT face=Arial
color=#0000ff size=2>When trying to call from my cisco 7940 which is behind nat
i receive this via ngrep:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=755340805-10042005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=755340805-10042005><FONT face=Arial
color=#0000ff size=2>U 202.150.105.150:5060 -> 203.167.185.23:50268<BR>
SIP/2.0 401 Unauthorized..Via: SIP/2.0/UDP
10.23.19.154:5060;branch=z9hG4bK3ab93baf;rport=50268;received=203.167.185.23.<BR>
.From: sip:64273040757@voip.fast.co.nz..To:
sip:64273040757@voip.fast.co.nz;tag=18deaabfa18843cd727e04c65fce5192.da71..C<BR>
all-ID: <A
href="mailto:0011219c-48830002-1e661ee5-7150bc32@10.23.19.154..CSeq">0011219c-48830002-1e661ee5-7150bc32@10.23.19.154..CSeq</A>:
106 REGISTER..WWW-Authenticate: Digest realm="voip.fast.<BR> co.nz",
nonce="4258b6d3ce0fecbbc523351ad0735ad555100a30"..Server: Sip EXpress router
(0.9.1 (i386/freebsd))..Content-Len<BR> gth: 0..Warning: 392
202.150.105.150:5060 "Noisy feedback tells: pid=5699
req_src_ip=203.167.185.23 req_src_port=50268<BR>
in_uri=sip:voip.fast.co.nz out_uri=sip:voip.fast.co.nz via_cnt==1"....<BR>#<BR>U
202.150.105.150:5060 -> 203.167.185.23:5060<BR> SIP/2.0 200 OK..Via:
SIP/2.0/UDP
10.23.19.154:5060;received=203.167.185.23;branch=z9hG4bK0d4fa640..Record-Route:
<sip:20<BR>
2.150.105.150;ftag=0011219c488300030377e0ea-4b9af92f;lr=on>..From: "Barry
Murphy" <sip:64273040757@voip.fast.co.nz>;tag=<BR>
0011219c488300030377e0ea-4b9af92f..To:
<sip:04@voip.fast.co.nz>;tag=as77998ba9..Call-ID:
0011219c-48830005-00bda4e9-5f27<BR> <A
href="mailto:bdc3@10.23.19.154..CSeq">bdc3@10.23.19.154..CSeq</A>: 101
INVITE..User-Agent: Asterisk PBX..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE,
REFER..Contact:<BR>
<sip:04@202.150.105.150:5070>..Content-Type:
application/sdp..Content-Length: 222....v=0..o=root 79264 79264 IN IP4
202<BR> .150.105.150..s=session..c=IN IP4 202.150.105.150..t=0 0..m=audio
19330 RTP/AVP 0 101..a=rtpmap:0 PCMU/8000..a=rtpmap:10<BR> 1
telephone-event/8000..a=fmtp:101 0-16..a=silenceSupp:off - - - -..<BR>#<BR>U
203.167.185.23:50268 -> 202.150.105.150:5060<BR> INVITE
sip:04@voip.fast.co.nz SIP/2.0..Via: SIP/2.0/UDP
10.23.19.154:5060;branch=z9hG4bK0d4fa640..From: "Barry Murphy" <<BR>
sip:64273040757@voip.fast.co.nz>;tag=0011219c488300030377e0ea-4b9af92f..To:
<sip:04@voip.fast.co.nz>..Call-ID: 0011219c-<BR> <A
href="mailto:48830005-00bda4e9-5f27bdc3@10.23.19.154..Date">48830005-00bda4e9-5f27bdc3@10.23.19.154..Date</A>:
Sun, 10 Apr 2005 05:12:06 GMT..CSeq: 101 INVITE..User-Agent:
CSCO/7..Cont<BR> act: <sip:64273040757@10.23.19.154:5060>..Expires:
180..Content-Type: application/sdp..Content-Length: 247..Accept: appl<BR>
ication/sdp....v=0..o=Cisco-SIPUA 26488 12465 IN IP4 10.23.19.154..s=SIP
Call..c=IN IP4 10.23.19.154..t=0 0..m=audio 235<BR> 72 RTP/AVP 0 8 18
101..a=rtpmap:0 PCMU/8000..a=rtpmap:8 PCMA/8000..a=rtpmap:18
G729/8000..a=rtpmap:101 telephone-event/8<BR> 000..a=fmtp:101
0-15..<BR>#<BR>U 202.150.105.150:5060 -> 203.167.185.23:5060<BR>
SIP/2.0 200 OK..Via: SIP/2.0/UDP
10.23.19.154:5060;received=203.167.185.23;branch=z9hG4bK0d4fa640..Record-Route:
<sip:20<BR>
2.150.105.150;ftag=0011219c488300030377e0ea-4b9af92f;lr=on>..From: "Barry
Murphy" <sip:64273040757@voip.fast.co.nz>;tag=<BR>
0011219c488300030377e0ea-4b9af92f..To:
<sip:04@voip.fast.co.nz>;tag=as77998ba9..Call-ID:
0011219c-48830005-00bda4e9-5f27<BR> <A
href="mailto:bdc3@10.23.19.154..CSeq">bdc3@10.23.19.154..CSeq</A>: 101
INVITE..User-Agent: Asterisk PBX..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE,
REFER..Contact:<BR>
<sip:04@202.150.105.150:5070>..Content-Type:
application/sdp..Content-Length: 222....v=0..o=root 79264 79264 IN IP4
202<BR> .150.105.150..s=session..c=IN IP4 202.150.105.150..t=0 0..m=audio
19330 RTP/AVP 0 101..a=rtpmap:0 PCMU/8000..a=rtpmap:10<BR> 1
telephone-event/8000..a=fmtp:101 0-16..a=silenceSupp:off - - - -..<BR>#<BR>U
202.150.105.150:5060 -> 203.167.185.23:5060<BR> SIP/2.0 200 OK..Via:
SIP/2.0/UDP
10.23.19.154:5060;received=203.167.185.23;branch=z9hG4bK0d4fa640..Record-Route:
<sip:20<BR>
2.150.105.150;ftag=0011219c488300030377e0ea-4b9af92f;lr=on>..From: "Barry
Murphy" <sip:64273040757@voip.fast.co.nz>;tag=<BR>
0011219c488300030377e0ea-4b9af92f..To:
<sip:04@voip.fast.co.nz>;tag=as77998ba9..Call-ID:
0011219c-48830005-00bda4e9-5f27<BR> <A
href="mailto:bdc3@10.23.19.154..CSeq">bdc3@10.23.19.154..CSeq</A>: 101
INVITE..User-Agent: Asterisk PBX..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE,
REFER..Contact:<BR>
<sip:04@202.150.105.150:5070>..Content-Type:
application/sdp..Content-Length: 222....v=0..o=root 79264 79264 IN IP4
202<BR> .150.105.150..s=session..c=IN IP4 202.150.105.150..t=0 0..m=audio
19330 RTP/AVP 0 101..a=rtpmap:0 PCMU/8000..a=rtpmap:10<BR> 1
telephone-event/8000..a=fmtp:101 0-16..a=silenceSupp:off - - - -..<BR>#<BR>U
202.150.105.150:5060 -> 203.167.185.23:5060<BR> SIP/2.0 200 OK..Via:
SIP/2.0/UDP
10.23.19.154:5060;received=203.167.185.23;branch=z9hG4bK0d4fa640..Record-Route:
<sip:20<BR>
2.150.105.150;ftag=0011219c488300030377e0ea-4b9af92f;lr=on>..From: "Barry
Murphy" <sip:64273040757@voip.fast.co.nz>;tag=<BR>
0011219c488300030377e0ea-4b9af92f..To:
<sip:04@voip.fast.co.nz>;tag=as77998ba9..Call-ID:
0011219c-48830005-00bda4e9-5f27<BR> <A
href="mailto:bdc3@10.23.19.154..CSeq">bdc3@10.23.19.154..CSeq</A>: 101
INVITE..User-Agent: Asterisk PBX..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE,
REFER..Contact:<BR>
<sip:04@202.150.105.150:5070>..Content-Type:
application/sdp..Content-Length: 222....v=0..o=root 79264 79264 IN IP4
202<BR> .150.105.150..s=session..c=IN IP4 202.150.105.150..t=0 0..m=audio
19330 RTP/AVP 0 101..a=rtpmap:0 PCMU/8000..a=rtpmap:10<BR> 1
telephone-event/8000..a=fmtp:101 0-16..a=silenceSupp:off - - - -..<BR>#<BR>U
10.23.14.16:5060 -> 202.150.105.150:5060<BR> ..<BR>#<BR>U
203.167.185.23:50268 -> 202.150.105.150:5060<BR> INVITE
sip:04@voip.fast.co.nz SIP/2.0..Via: SIP/2.0/UDP
10.23.19.154:5060;branch=z9hG4bK0d4fa640..From: "Barry Murphy" <<BR>
sip:64273040757@voip.fast.co.nz>;tag=0011219c488300030377e0ea-4b9af92f..To:
<sip:04@voip.fast.co.nz>..Call-ID: 0011219c-<BR> <A
href="mailto:48830005-00bda4e9-5f27bdc3@10.23.19.154..Date">48830005-00bda4e9-5f27bdc3@10.23.19.154..Date</A>:
Sun, 10 Apr 2005 05:12:06 GMT..CSeq: 101 INVITE..User-Agent:
CSCO/7..Cont<BR> act: <sip:64273040757@10.23.19.154:5060>..Expires:
180..Content-Type: application/sdp..Content-Length: 247..Accept: appl<BR>
ication/sdp....v=0..o=Cisco-SIPUA 26488 12465 IN IP4 10.23.19.154..s=SIP
Call..c=IN IP4 10.23.19.154..t=0 0..m=audio 235<BR> 72 RTP/AVP 0 8 18
101..a=rtpmap:0 PCMU/8000..a=rtpmap:8 PCMA/8000..a=rtpmap:18
G729/8000..a=rtpmap:101 telephone-event/8<BR> 000..a=fmtp:101
0-15..<BR>#<BR>U 202.150.105.150:5060 -> 203.167.185.23:5060<BR>
SIP/2.0 200 OK..Via: SIP/2.0/UDP
10.23.19.154:5060;received=203.167.185.23;branch=z9hG4bK0d4fa640..Record-Route:
<sip:20<BR>
2.150.105.150;ftag=0011219c488300030377e0ea-4b9af92f;lr=on>..From: "Barry
Murphy" <sip:64273040757@voip.fast.co.nz>;tag=<BR>
0011219c488300030377e0ea-4b9af92f..To:
<sip:04@voip.fast.co.nz>;tag=as77998ba9..Call-ID:
0011219c-48830005-00bda4e9-5f27<BR> <A
href="mailto:bdc3@10.23.19.154..CSeq">bdc3@10.23.19.154..CSeq</A>: 101
INVITE..User-Agent: Asterisk PBX..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE,
REFER..Contact:<BR>
<sip:04@202.150.105.150:5070>..Content-Type:
application/sdp..Content-Length: 222....v=0..o=root 79264 79264 IN IP4
202<BR> .150.105.150..s=session..c=IN IP4 202.150.105.150..t=0 0..m=audio
19330 RTP/AVP 0 101..a=rtpmap:0 PCMU/8000..a=rtpmap:10<BR> 1
telephone-event/8000..a=fmtp:101 0-16..a=silenceSupp:off - - - -..<BR>#<BR>U
202.150.105.150:5060 -> 203.167.185.23:5060<BR> SIP/2.0 200 OK..Via:
SIP/2.0/UDP
10.23.19.154:5060;received=203.167.185.23;branch=z9hG4bK0d4fa640..Record-Route:
<sip:20<BR>
2.150.105.150;ftag=0011219c488300030377e0ea-4b9af92f;lr=on>..From: "Barry
Murphy" <sip:64273040757@voip.fast.co.nz>;tag=<BR>
0011219c488300030377e0ea-4b9af92f..To:
<sip:04@voip.fast.co.nz>;tag=as77998ba9..Call-ID:
0011219c-48830005-00bda4e9-5f27<BR> <A
href="mailto:bdc3@10.23.19.154..CSeq">bdc3@10.23.19.154..CSeq</A>: 101
INVITE..User-Agent: Asterisk PBX..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE,
REFER..Contact:<BR>
<sip:04@202.150.105.150:5070>..Content-Type:
application/sdp..Content-Length: 222....v=0..o=root 79264 79264 IN IP4
202<BR> .150.105.150..s=session..c=IN IP4 202.150.105.150..t=0 0..m=audio
19330 RTP/AVP 0 101..a=rtpmap:0 PCMU/8000..a=rtpmap:10<BR> 1
telephone-event/8000..a=fmtp:101 0-16..a=silenceSupp:off - - -
-..<BR>^Cexit<BR>608 received, 0 dropped<BR></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=755340805-10042005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> serusers-bounces@lists.iptel.org
[mailto:serusers-bounces@lists.iptel.org] <B>On Behalf Of </B>Barry
Murphy<BR><B>Sent:</B> Sunday, 10 April 2005 4:50 p.m.<BR><B>To:</B> 'Java
Rockx'<BR><B>Cc:</B> serusers@lists.iptel.org<BR><B>Subject:</B> RE: [Serusers] Nat
incoming call<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial color=#0000ff size=2>Ok, so ser worked for a few minutes
in the following way:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>Me on live IP calling a nat user,
their phone would ring, however me the A party got no ring, after 20 seconds I
received NU tone.<BR>NAT user is able to call me with no problem.<BR>Then
things just died and now when I run ser I get the following:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><A
href="mailto:ser@max:/home/icepick$">ser@max:/home/icepick$</A> ser
-Edddddd<BR> 0(5134) read 244542925 from /dev/urandom<BR> 0(5134)
seeding PRNG with 1357656199<BR> 0(5134) test random number
985922484<BR>ERROR: bad config file (1 errors)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>ser.cfg (as per onsip.org, exact
copy of the rtpproxy.cfg with 2 additional fields for linking
asterisk)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial color=#0000ff
size=2>debug=3<BR>fork=yes<BR>log_stderror=no<BR>dns=no<BR>rev_dns=no<BR>fifo="/home/ser/ser_fifo"<BR>fifo_db_url="mysql://asterisk:4ster1skrawk5@localhost/ser"</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>loadmodule
"/usr/local/lib/ser/modules/mysql.so"<BR>loadmodule
"/usr/local/lib/ser/modules/sl.so"<BR>loadmodule
"/usr/local/lib/ser/modules/tm.so"<BR>loadmodule
"/usr/local/lib/ser/modules/rr.so"<BR>loadmodule
"/usr/local/lib/ser/modules/maxfwd.so"<BR>loadmodule
"/usr/local/lib/ser/modules/usrloc.so"<BR>loadmodule
"/usr/local/lib/ser/modules/registrar.so"<BR>loadmodule
"/usr/local/lib/ser/modules/auth.so"<BR>loadmodule
"/usr/local/lib/ser/modules/auth_db.so"<BR>loadmodule
"/usr/local/lib/ser/modules/nathelper.so"<BR>loadmodule
"/usr/local/lib/ser/modules/textops.so"<BR>loadmodule
"/usr/local/lib/ser/modules/uri_db.so"<BR>loadmodule
"/usr/local/lib/ser/modules/uri.so"<BR>loadmodule
"/usr/local/lib/ser/modules/domain.so"<BR>loadmodule
"/usr/local/lib/ser/modules/acc.so"</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial color=#0000ff
size=2>modparam("acc|auth_db|usrloc|uri_db", "db_url",
"mysql://ser:ser@localhost/ser")</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>modparam("auth_db",
"calculate_ha1", 1)<BR>modparam("auth_db", "password_column",
"password")</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>modparam("acc", "log_level",
2)<BR>modparam("acc", "log_flag", 1 )<BR>modparam("acc", "log_missed_flag",
2)<BR>modparam("acc", "log_fmt", "cdfimorstup") modparam("acc",
"failed_transactions", 1) modparam("acc", "report_cancels", 1) modparam("acc",
"db_flag", 1) modparam("acc", "db_missed_flag", 2)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>modparam("nathelper",
"natping_interval", 30) <BR>modparam("nathelper", "ping_nated_only",
1) <BR>modparam("nathelper", "rtpproxy_sock",
"unix:/var/run/rtpproxy.sock")</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>modparam("usrloc", "db_mode",
2)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>modparam("registrar", "nat_flag",
6)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>modparam("rr", "enable_full_lr",
1)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial color=#0000ff
size=2>alias="voip.fast.co.nz"<BR>alias=""</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>route {</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2> #
-----------------------------------------------------------------<BR> #
Sanity Check Section<BR> #
-----------------------------------------------------------------<BR> if
(!mf_process_maxfwd_header("10")) {<BR> sl_send_reply("483", "Too
Many Hops");<BR> break;<BR> };</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2> if (msg:len > max_len)
{<BR> sl_send_reply("513", "Message
Overflow");<BR> break;<BR> };</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2> #
-----------------------------------------------------------------<BR> #
Record Route Section<BR> #
-----------------------------------------------------------------<BR> if
(method!="REGISTER") {<BR> record_route();<BR> };</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2> if (method=="BYE" ||
method=="CANCEL") {<BR> unforce_rtp_proxy();<BR> }
</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2> #
-----------------------------------------------------------------<BR> #
Loose Route Section<BR> #
-----------------------------------------------------------------<BR> if
(loose_route()) {</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2> if (has_totag()
&& method=="INVITE") {<BR> if (nat_uac_test("19"))
{<BR> setflag(6);<BR> force_rport();<BR> fix_nated_contact();<BR> };<BR>
force_rtp_proxy("l");<BR> };<BR>
route(1);<BR> break;<BR> };<BR>
#
-----------------------------------------------------------------<BR>
# send out 0 prefix to asterisk for IVR
options<BR> #
-----------------------------------------------------------------<BR>
if (uri=~"^sip:0[1-9]*@voip.fast.co.nz")
{<BR>
setflag(1);<BR>
rewritehostport("202.150.105.150:5070");<BR>
log("free call");<BR> if
(!t_relay())
{<BR>
sl_reply_error();<BR>
};<BR>
break;<BR> }</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial color=#0000ff
size=2> #
-----------------------------------------------------------------<BR>
# send out 00 prefix to wholesale voip.fast.co.nz
termination<BR> #
-----------------------------------------------------------------<BR> if
(uri=~"^sip:00[0-9].*@voip.fast.co.nz")
{<BR> if (!is_user_in("From",
"ld"))
{<BR>
sl_send_reply("403", "Payment
required");<BR>
break;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial color=#0000ff
size=2>
};<BR>
setflag(1);<BR>
rewritehostport("voip.fast.co.nz:5070");<BR>
if (!t_relay())
{<BR>
sl_reply_error();<BR>
};<BR>
break;<BR> };</FONT></DIV>
<DIV> </DIV><FONT face=Arial color=#0000ff size=2>
<DIV><BR> #
-----------------------------------------------------------------<BR> #
Call Type Processing Section<BR> #
-----------------------------------------------------------------<BR> if
(uri==myself) {<BR> if (method=="INVITE")
{<BR> route(3);<BR> break;<BR> }
else if (method=="REGISTER")
{<BR> route(2);<BR> break;<BR> };</DIV>
<DIV> </DIV>
<DIV> if (!lookup("location"))
{<BR> sl_send_reply("404", "User Not
Found");<BR> break;<BR> };</DIV>
<DIV> </DIV>
<DIV> route(1);<BR> };<BR>}</DIV>
<DIV> </DIV>
<DIV>route[1] {</DIV>
<DIV> </DIV>
<DIV> #
-----------------------------------------------------------------<BR> #
Default Message Handler<BR> #
-----------------------------------------------------------------</DIV>
<DIV> </DIV>
<DIV> t_on_reply("1");</DIV>
<DIV> </DIV>
<DIV> if (!t_relay()) {<BR> if (method=="INVITE" &&
isflagset(6)) {<BR>
unforce_rtp_proxy();<BR> };<BR> sl_reply_error();<BR> };<BR>}</DIV>
<DIV> </DIV>
<DIV>route[2] {</DIV>
<DIV> </DIV>
<DIV> #
-----------------------------------------------------------------<BR> #
REGISTER Message Handler<BR> #
----------------------------------------------------------------</DIV>
<DIV> </DIV>
<DIV> if (!search("^Contact: \*") && nat_uac_test("19"))
{<BR> setflag(6);<BR> fix_nated_register();<BR> force_rport();<BR> };</DIV>
<DIV> </DIV>
<DIV> sl_send_reply("100", "Trying");</DIV>
<DIV> </DIV>
<DIV> if (!www_authorize("","subscriber"))
{<BR> www_challenge("","0");<BR> break;<BR> };</DIV>
<DIV> </DIV>
<DIV> if (!check_to()) {<BR> sl_send_reply("401",
"Unauthorized");<BR> break;<BR> };</DIV>
<DIV> </DIV>
<DIV> consume_credentials();</DIV>
<DIV> </DIV>
<DIV> if (!save("location"))
{<BR> sl_reply_error();<BR> };<BR>}</DIV>
<DIV> </DIV>
<DIV>route[3] {</DIV>
<DIV> </DIV>
<DIV> #
-----------------------------------------------------------------<BR> #
INVITE Message Handler<BR> #
-----------------------------------------------------------------</DIV>
<DIV> </DIV>
<DIV> if (nat_uac_test("19"))
{<BR> setflag(6);<BR> }</DIV>
<DIV> </DIV>
<DIV> if (!lookup("location")) {<BR> sl_send_reply("404",
"User Not Found");<BR> break;<BR> };</DIV>
<DIV> </DIV>
<DIV> if (!proxy_authorize("voip.fast.co.nz","subscriber"))
{<BR> proxy_challenge("voip.fast.co.nz","0");<BR> break;<BR> }
else if (!check_from()) {<BR> sl_send_reply("403", "Use
From=ID");<BR> break;<BR> };</DIV>
<DIV> </DIV>
<DIV> consume_credentials();</DIV>
<DIV> </DIV>
<DIV> if (isflagset(6))
{<BR> force_rport();<BR> fix_nated_contact();<BR> force_rtp_proxy();<BR> };</DIV>
<DIV> </DIV>
<DIV> t_on_reply("1");</DIV>
<DIV> </DIV>
<DIV> if (!t_relay()) {<BR> if(isflagset(6))
{<BR> unforce_rtp_proxy();<BR> }<BR> sl_reply_error();<BR> };<BR>}</DIV>
<DIV> </DIV>
<DIV>onreply_route[1] {</DIV>
<DIV> </DIV>
<DIV> if (isflagset(6) && status=~"(180)|(183)|2[0-9][0-9]")
{<BR> if (!search("^Content-Length:\ 0"))
{<BR> force_rtp_proxy();<BR> };<BR> } else if
(nat_uac_test("1"))
{<BR> fix_nated_contact();<BR> };<BR>}</DIV>
<DIV> </DIV>
<DIV></FONT> </DIV></BLOCKQUOTE></BODY></HTML>