<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2627" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=362174415-07062005><FONT face=Arial 
size=2>Whenever I make a call I get these entries in the 
log....</FONT></SPAN></DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Jun&nbsp; 7 17:56:29 ns2 ser[520]: WARNING: script 
writer didn't release transaction<BR>Jun&nbsp; 7 17:56:42 ns2 ser[522]: ERROR: 
t_get_trans_ident: no transaction found<BR>Jun&nbsp; 7 17:56:42 ns2 ser[522]: 
assemble_msg: t_get_trans_ident failed<BR>Jun&nbsp; 7 17:56:42 ns2 ser[522]: 
ERROR:tm:t_write_req: Error int assemble_msg<BR>Jun&nbsp; 7 17:56:42 ns2 
ser[522]: ERROR: t_reply: cannot send a t_reply to a message for which no 
T-state has been established<BR></FONT></DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial><FONT size=2><SPAN 
class=493024305-08062005><FONT 
color=#0000ff>&nbsp;</FONT></SPAN></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial><FONT size=2><SPAN 
class=493024305-08062005>&nbsp;</SPAN>If the user is online I get connected 
properly, if user is offline I get connected to sems. So It seems to be working 
after all. But I had this config running for three days then I got a lot of 
errors regarding t_newtran and out of memory... and phones lost their 
registration.</FONT></FONT></SPAN></DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial size=2>Also does any have 
any idea where to put t_release() to avoid the first WARNING 
message...</FONT></SPAN></DIV>
<DIV><SPAN class=362174415-07062005></SPAN><SPAN class=362174415-07062005><FONT 
face=Arial size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial size=2>This is my 
ser.cfg</FONT></SPAN></DIV>
<DIV><SPAN class=362174415-07062005></SPAN><SPAN class=362174415-07062005><FONT 
face=Arial size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial 
size=2>debug=3<BR>fork=yes<SPAN class=493024305-08062005><FONT 
color=#0000ff>&nbsp;</FONT></SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial 
size=2>log_stderror=no</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial 
size=2>listen=212.247.91.237<BR>port=5060&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial><SPAN class=362174415-07062005><FONT 
size=2>children=4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>alias=sip.serverhallen.com&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>rev_dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN 
class=493024305-08062005><FONT 
color=#0000ff>&nbsp;</FONT></SPAN></FONT></SPAN></FONT></DIV>
<DIV><FONT face=Arial><SPAN class=362174415-07062005><FONT size=2><SPAN 
class=493024305-08062005>&nbsp;</SPAN></FONT></SPAN></FONT></DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial 
size=2>fifo_mode=0666&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>fifo="/tmp/ser_fifo"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>fifo_db_url="mysql://ser:heslo@localhost/ser"&nbsp;&nbsp;</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial size=2>#LADDA IN DE MODULER 
VI 
BEHÖVER<BR>#----------------------------------------------------------------------------------------------<BR>loadmodule 
"/usr/local/lib/ser/modules/mysql.so"&nbsp;#MySQL database support<BR>loadmodule 
"/usr/local/lib/ser/modules/sl.so"&nbsp;&nbsp;#Stateless replies<BR>loadmodule 
"/usr/local/lib/ser/modules/tm.so"&nbsp;&nbsp;#Transaction 
Management<BR>loadmodule "/usr/local/lib/ser/modules/rr.so"&nbsp;&nbsp;#Routing 
and Record-Routing<BR>loadmodule 
"/usr/local/lib/ser/modules/maxfwd.so"&nbsp;#Max-Forwards check<BR>loadmodule 
"/usr/local/lib/ser/modules/usrloc.so"&nbsp;#User location support<BR>loadmodule 
"/usr/local/lib/ser/modules/registrar.so"&nbsp;#Registrar<BR>loadmodule 
"/usr/local/lib/ser/modules/auth.so"&nbsp;&nbsp;#Common functions for digest 
authentication<BR>loadmodule 
"/usr/local/lib/ser/modules/auth_db.so"&nbsp;#Database support for digest 
authentication<BR>loadmodule 
"/usr/local/lib/ser/modules/uri.so"&nbsp;&nbsp;#Various URI checks<BR>loadmodule 
"/usr/local/lib/ser/modules/uri_db.so"&nbsp;#URI checking using 
DB&nbsp;<BR>loadmodule "/usr/local/lib/ser/modules/mediaproxy.so"&nbsp;#RTP 
Mediaproxy for NATed UAs<BR>loadmodule 
"/usr/local/lib/ser/modules/nathelper.so"&nbsp;#Functions to handle NAT 
traversal<BR>loadmodule "/usr/local/lib/ser/modules/textops.so"&nbsp;#Message 
Textual Operations<BR>loadmodule 
"/usr/local/lib/ser/modules/avpops.so"&nbsp;#avp operations, pseudo-variable 
support<BR>loadmodule "/usr/local/lib/ser/modules/domain.so"&nbsp;#checks if a 
host part of an URI is "local" or not.<BR>loadmodule 
"/usr/local/lib/ser/modules/permissions.so"&nbsp;#determine if a call has 
appropriate permission to be established</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial size=2>#VARIABLER FÖR 
DATABAS OCH HANTERINGA 
AUTENTISIERING<BR>#----------------------------------------------------------------------------------------------<BR>modparam("auth_db|permissions|uri_db|usrloc", 
"db_url", "mysql://ser:heslo@localhost/ser")<BR>modparam("auth_db", 
"calculate_ha1", 
1)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>modparam("auth_db", 
"password_column", "password")&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN 
class=493024305-08062005><FONT 
color=#0000ff>&nbsp;</FONT></SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=362174415-07062005><FONT><FONT face=Arial><FONT size=2><SPAN 
class=493024305-08062005>&nbsp;</SPAN>modparam("usrloc", "db_mode", 
2)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN 
class=493024305-08062005><FONT 
color=#0000ff>&nbsp;</FONT></SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=362174415-07062005><FONT><FONT face=Arial><FONT size=2><SPAN 
class=493024305-08062005>&nbsp;</SPAN>modparam("rr", "enable_full_lr", 
1)</FONT></FONT></FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial size=2>#VARIABLER FÖR 
HANTERING AV NATade 
UAs<BR>#-----------------------------------------------------------------------------------------------<BR>modparam("nathelper", 
"rtpproxy_disable", 1)<SPAN class=493024305-08062005><FONT 
color=#0000ff>&nbsp;</FONT></SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial size=2><SPAN 
class=493024305-08062005>&nbsp;</SPAN>modparam("nathelper", "natping_interval", 
0)</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial 
size=2>modparam("mediaproxy","natping_interval", 
30)<BR>modparam("mediaproxy","mediaproxy_socket", 
"/var/run/mediaproxy.sock")&nbsp;<SPAN class=493024305-08062005><FONT 
color=#0000ff>&nbsp;&nbsp;</FONT></SPAN>&nbsp;<SPAN 
class=493024305-08062005><FONT 
color=#0000ff>&nbsp;</FONT></SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial 
size=2>modparam("mediaproxy","sip_asymmetrics","/usr/local/etc/ser/sip-clients")&nbsp;&nbsp;&nbsp;<BR>modparam("mediaproxy","rtp_asymmetrics","/usr/local/etc/ser/rtp-clients")&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;<BR>modparam("registrar", 
"nat_flag", 
6)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial size=2>#VARIABLER FÖR 
HANTERING AV 
PSTN<BR>#-----------------------------------------------------------------------------------------------<BR>modparam("tm", 
"fr_inv_timer", 
27)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>modparam("tm", 
"fr_inv_timer_avp", 
"inv_timeout")&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial 
size=2>modparam("permissions", "db_mode", 
1)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>modparam("permissions", 
"trusted_table", 
"trusted")&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial size=2>#MEDDELANDEHANTERING 
AV SIP 
MEDDELANDEN<BR>#-----------------------------------------------------------------------------------------------<BR>#Alla 
meddelanden kommer behandlas enligt detta regelverk i sekventiell 
ordning</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial size=2>route {<BR>&nbsp;# 
-----------------------------------------------------------------<BR>&nbsp;# 
Sanity Check Section, Kontrollera hur många gånger ett meddelande tagits 
emot.<BR>&nbsp;# 
-----------------------------------------------------------------<BR>&nbsp;if 
(!mf_process_maxfwd_header("10")) 
{&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;sl_send_reply("483", "Too Many 
Hops");&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;break;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;};</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial size=2>&nbsp;if (msg:len 
&gt; max_len) 
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;sl_send_reply("513", "Message 
Overflow");&nbsp;&nbsp;<BR>&nbsp;&nbsp;break;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;};</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial size=2>&nbsp;# 
-----------------------------------------------------------------<BR>&nbsp;# 
Record Route Section, Sektion som lägger till vår egen sip server i routing 
kedjan så att svaren kommer tillbaka till oss.<BR>&nbsp;# 
-----------------------------------------------------------------<BR>&nbsp;if 
(method=="INVITE" &amp;&amp; client_nat_test("3")) 
{&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;record_route_preset("212.247.91.237:5060;nat=yes");&nbsp;&nbsp;<BR>&nbsp;} 
else if (method!="REGISTER") 
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;record_route();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;};</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial size=2>&nbsp;# 
-----------------------------------------------------------------<BR>&nbsp;# 
Call Tear Down Section, Denna sektion hanterar nedtagning av samtal<BR>&nbsp;# 
-----------------------------------------------------------------<BR>&nbsp;if 
(method=="BYE" || method=="CANCEL") 
{&nbsp;&nbsp;&nbsp;&nbsp;#<BR>&nbsp;&nbsp;end_media_session();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;#<BR>&nbsp;&nbsp;if(!t_write_req("/tmp/am_fifo","bye")) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_reply("500","error contacting 
sems");<BR>&nbsp;&nbsp;};<BR>&nbsp;};</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial size=2>&nbsp;# 
-----------------------------------------------------------------<BR>&nbsp;# 
Loose Route Section, <BR>&nbsp;# 
-----------------------------------------------------------------<BR>&nbsp;if 
(loose_route()) 
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;if (has_totag() 
&amp;&amp; (method=="INVITE" || method=="ACK")) {&nbsp;<BR>&nbsp;&nbsp;&nbsp;if 
(client_nat_test("3")||search("^Route:.*;nat=yes")){<BR>&nbsp;&nbsp;&nbsp;&nbsp;setflag(6);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;use_media_proxy();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;};<BR>&nbsp;&nbsp;};</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial 
size=2>&nbsp;&nbsp;route(1);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;break;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;};</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial size=2>&nbsp;# 
-----------------------------------------------------------------<BR>&nbsp;# 
Call Type Processing Section, om meddelandet inte skulle skickas vidare är det 
förmodligen riktat till SER<BR>&nbsp;# 
-----------------------------------------------------------------</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial size=2>&nbsp;if 
(uri!=myself) 
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;route(5);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;route(1);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;break;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;};</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial size=2>&nbsp;if 
(uri==myself) 
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial size=2>&nbsp;&nbsp;# switch 
to statefull mode:<BR>&nbsp;&nbsp;if (!t_newtran()){<BR>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;sl_send_reply("500","could not create 
transaction");<BR>&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;};</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV><SPAN 
class=362174415-07062005>
<DIV><FONT color=#0000ff></FONT><FONT color=#0000ff></FONT><FONT 
color=#0000ff></FONT><BR><FONT face=Arial size=2>&nbsp;&nbsp;if (method=="ACK") 
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;route(6);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;break;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;} 
else if (method=="CANCEL") 
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;route(3);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;break;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;} 
else if (method=="INVITE") 
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;route(3);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;break;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;} 
else if (method=="REGISTER") 
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;route(2);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;break;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;};</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>&nbsp;&nbsp;lookup("aliases");&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;if 
(uri!=myself) 
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;route(5);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;route(1);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;break;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;};</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;if (!lookup("location")) 
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
sl_send_reply("404", "User not 
found");&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
break;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;};<BR>&nbsp;};<BR>&nbsp;log("NO 
MATCH");&nbsp;<BR>&nbsp;route(1);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>}</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>route[1] {</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;# 
-----------------------------------------------------------------<BR>&nbsp;# 
Default Message Handler, Standardhantering av Meddelanden<BR>&nbsp;# 
-----------------------------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>&nbsp;t_on_reply("1");&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;if 
(!t_relay()){&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;if 
(method=="INVITE" || method=="ACK") 
{&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;end_media_session();&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;};</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>&nbsp;&nbsp;sl_reply_error();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;};<BR>}</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>route[2] {</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;# 
-----------------------------------------------------------------<BR>&nbsp;# 
REGISTER Message Handler<BR>&nbsp;# 
-----------------------------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;sl_send_reply("100", 
"Trying");&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;if (!search("^Contact:\ +\*") &amp;&amp; 
client_nat_test("7")) 
{&nbsp;<BR>&nbsp;&nbsp;setflag(6);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;fix_nated_register();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;force_rport();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;};</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;if (!www_authorize("","subscriber")) 
{&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;www_challenge("","0");&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;break;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;};</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;if (!check_to()) 
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;sl_send_reply("401", 
"Unauthorized");&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;break;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;};</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>&nbsp;consume_credentials();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;if 
(!save("location")) 
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;sl_reply_error();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;};<BR>}</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>route[3] {</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;# 
-----------------------------------------------------------------<BR>&nbsp;# 
CANCEL and INVITE Message Handler<BR>&nbsp;# 
-----------------------------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;if (client_nat_test("3")) 
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;setflag(7);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;force_rport();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;fix_nated_contact();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;};</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;if (method=="INVITE" &amp;&amp; 
!allow_trusted()) {&nbsp;&nbsp;&nbsp;</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;if (!proxy_authorize("","subscriber")) 
{&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;proxy_challenge("","0");&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;break;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;} 
else if (!check_from()) 
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;sl_send_reply("403", "Use 
From=ID");&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;break;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;};</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>&nbsp;&nbsp;consume_credentials();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;};<BR>&nbsp;<BR>&nbsp;lookup("aliases");&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;if 
(uri!=myself) 
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;route(5);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;route(1);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;break;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;};</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;if (uri=~"^sip:[+|00][0-9]*@") 
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;route(4);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;break;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;};</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;if (uri=~"^sip:0[1-9]*@") 
{&nbsp;<BR>&nbsp;&nbsp;route(4);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;break;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;};</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;if (uri=~"sip:100.*@") 
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;if(!t_write_req("/tmp/am_fifo","conference")) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_reply("500","error contacting 
sems");<BR>&nbsp;&nbsp;};<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;if (!lookup("location")) 
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;#Send caller to users 
answering machine if uri is 
local<BR>&nbsp;&nbsp;if(!t_write_req("/tmp/am_fifo","voicemail")) 
{&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_reply("500","error contacting 
sems");<BR>&nbsp;&nbsp;};<BR>&nbsp;&nbsp;break;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN 
class=493024305-08062005><FONT color=#0000ff>&nbsp;</FONT></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=493024305-08062005>&nbsp;</SPAN>&nbsp;};</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;if (method=="CANCEL") 
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;route(1);<BR>&nbsp;&nbsp;break;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;};</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>&nbsp;route(5);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;route(1);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>}</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>route[4] {</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;# 
-----------------------------------------------------------------<BR>&nbsp;# 
PSTN Handler<BR>&nbsp;# 
-----------------------------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;rewritehost("<SPAN 
class=493024305-08062005><FONT 
color=#0000ff>&nbsp;192.168.0.1&nbsp;</FONT></SPAN>");&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;avp_write("i:45", 
"inv_timeout");&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>&nbsp;route(5);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;route(1);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>route[5] {</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;# 
-----------------------------------------------------------------<BR>&nbsp;# RTP 
Proxy Enabler, aktiverar proxyn<BR>&nbsp;# 
-----------------------------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;if (isflagset(6) || isflagset(7)) 
{&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;use_media_proxy();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;};<BR>}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>route[6] {</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;# 
------------------------------------------------------------------------<BR>&nbsp;# 
ACK Handler<BR>&nbsp;# 
------------------------------------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;# 
------------------------------------------------------------------------<BR>&nbsp;# 
Aliases Section, hanterar acks<BR>&nbsp;# 
------------------------------------------------------------------------<BR>&nbsp;lookup("aliases");&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;if 
(uri!=myself) 
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;route(1);<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;lookup("location");</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;route(1);<BR>}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT><BR><FONT face=Arial 
size=2>onreply_route[1] {</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;if ((isflagset(6) || isflagset(7)) &amp;&amp; 
<BR>&nbsp;&nbsp;&nbsp;&nbsp; (status=~"(180)|(183)|2[0-9][0-9]")) {</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;if (!search("^Content-Length:\ +0")) 
{<BR>&nbsp;&nbsp;&nbsp;use_media_proxy();<BR>&nbsp;&nbsp;};<BR>&nbsp;};</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;if (client_nat_test("1")) 
{<BR>&nbsp;&nbsp;fix_nated_contact();<BR>&nbsp;};<BR>}<BR></FONT></SPAN></DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=362174415-07062005><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV></BODY></HTML>