<!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.2668" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi</FONT></DIV><FONT face=Arial size=2>
<DIV><BR>I have configured ser and sems to have voicemail on my customers. To 
work with natted us I use mediaproxy and the ser.cfg from onsip.org</DIV>
<DIV>&nbsp;</DIV>
<DIV>Everything works fine when an user is offline, but when I try to use a 
failure route I am not able to get it working on natted custmers.</DIV>
<DIV>&nbsp;</DIV>
<DIV>The failure route is:</DIV>
<DIV>failure_route[1] {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if 
(t_check_status("408|486|480")){&nbsp;&nbsp; ## Do not include 
487!!<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
lookup("aliases") 
;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
rewritehostport("voip.italycomnet.it:5090");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
append_branch();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
t_relay();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
break;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<BR>}<BR><BR>It is called 
on route(1):</DIV>
<DIV>&nbsp;</DIV>
<DIV>route[1] {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
t_on_reply("1");</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!t_relay()) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
if (method=="INVITE" || method=="ACK") 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
end_media_session();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
};<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
sl_reply_error();</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (isflagset(4)) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
t_on_failure("1");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };</DIV>
<DIV>&nbsp;</DIV>
<DIV>}<BR></DIV>
<DIV>This is the sems log whe i call a natted us:</DIV>
<DIV>&nbsp;</DIV>
<DIV>(32382) DEBUG: write_to_fifo (SerClient.cpp:249): Write to fifo: 
completed<BR>(32382) DEBUG: getReturnCode (AmRequest.cpp:367): response from 
Ser: 200 fifo_t_reply succeeded<BR>(32382) DEBUG: setRAddr 
(AmRtpStream.cpp:394): RTP remote address set to 
213.178.208.130:13652<BR>(32382) DEBUG: negotiate (AmSession.cpp:184): Sending 
Rtp data to 213.178.208.130/13652<BR>(32382) DEBUG: onSessionStart 
(AnswerMachine.cpp:316): starting sending 
announce...(/usr/local/apache2/htdocs/html/audio/default_en.wav)<BR>(32382) 
DEBUG: trying to read WAV file<BR>(32382) DEBUG: tag = &lt;RIFF&gt;<BR>(32382) 
DEBUG: file size = &lt;391108&gt;<BR>(32382) DEBUG: tag = 
&lt;WAVE&gt;<BR>(32382) DEBUG: tag = &lt;fmt &gt;<BR>(32382) DEBUG: chunk_size = 
&lt;16&gt;<BR>(32382) DEBUG: fmt = &lt;01&gt;<BR>(32382) DEBUG: channels = 
&lt;1&gt;<BR>(32382) DEBUG: rate = &lt;8000&gt;<BR>(32382) DEBUG: bits/sample = 
&lt;16&gt;<BR>(32382) DEBUG: tag = &lt;data&gt;<BR>(32382) DEBUG: chunk size = 
&lt;391072&gt;<BR>(32382) DEBUG: run (AmServer.cpp:158): version= 
&lt;0.3&gt;<BR>(32382) DEBUG: run (AmServer.cpp:168): fct_name= 
&lt;sip_request.bye&gt;<BR>(32382) DEBUG: execute (AmServer.cpp:226): 
cmd.method= &lt;BYE&gt;<BR>(32382) DEBUG: execute (AmServer.cpp:227): cmd.user= 
&lt;voicemail+cyber&gt;<BR>(32382) DEBUG: execute (AmServer.cpp:228): 
cmd.domain= &lt;213.178.216.45&gt;<BR>(32382) DEBUG: execute (AmServer.cpp:229): 
cmd.dstip= &lt;213.178.216.45&gt;<BR>(32382) DEBUG: execute (AmServer.cpp:230): 
cmd.port= &lt;5090&gt;<BR>(32382) DEBUG: execute (AmServer.cpp:231): cmd.r_uri= 
&lt;sip:voicemail+cyber@213.178.216.45:5090&gt;<BR>(32382) DEBUG: execute 
(AmServer.cpp:232): cmd.from_uri= 
&lt;sip:6294209153@213.178.208.130&gt;<BR>(32382) DEBUG: execute 
(AmServer.cpp:233): cmd.from= &lt;"anonymous" 
&lt;sip:6294209153@213.178.208.130&gt;&gt;<BR>(32382) DEBUG: execute 
(AmServer.cpp:234): cmd.to= 
&lt;&lt;sip:08281895128@voadsl.italycomnet.it&gt;;tag=00007E7E32D96353&gt;<BR>(32382) 
DEBUG: execute (AmServer.cpp:235): cmd.callid= &lt;<A 
href="mailto:462465ae31a409b34ac2ccba108ed51d@213.178.208.130">462465ae31a409b34ac2ccba108ed51d@213.178.208.130</A>&gt;<BR>(32382) 
DEBUG: execute (AmServer.cpp:236): cmd.from_tag= &lt;as759a2b45&gt;<BR>(32382) 
DEBUG: execute (AmServer.cpp:237): cmd.to_tag= 
&lt;00007E7E32D96353&gt;<BR>(32382) DEBUG: execute (AmServer.cpp:240): cseq_str= 
&lt;103&gt;<BR>(32382) DEBUG: execute (AmServer.cpp:245): cseq= 
&lt;103&gt;(103)<BR>(32382) DEBUG: execute (AmServer.cpp:247): cmd.key= 
&lt;21048:437100943&gt;<BR>(32382) DEBUG: execute (AmServer.cpp:248): cmd.route= 
&lt;&lt;sip:213.178.216.45;ftag=as759a2b45;lr=on&gt;&gt;<BR>(32382) DEBUG: 
execute (AmServer.cpp:249): cmd.next_hop= 
&lt;sip:213.178.216.45;ftag=as759a2b45;lr=on&gt;<BR>(32382) DEBUG: execute 
(AmServer.cpp:255): hdrs: `P-MsgFlags: 0<BR>'<BR>(32382) DEBUG: execute 
(AmServer.cpp:262): body: `'<BR>(32382) DEBUG: execute (AmServer.cpp:275): 
everything is OK !<BR>(32382) DEBUG: sadSession (AmSession.cpp:358): searching 
for session to destroy (<A 
href="mailto:hash=462465ae31a409b34ac2ccba108ed51d@213.178.208.130as759a2b45,sess_key=00007E7E32D96353">hash=462465ae31a409b34ac2ccba108ed51d@213.178.208.130as759a2b45,sess_key=00007E7E32D96353</A>)<BR>(32382) 
DEBUG: findSession (AmSession.cpp:421): session found with key<BR>(32382) DEBUG: 
destroySession (AmSession.cpp:380): sess_it != a_sessions.end()<BR>(32382) 
DEBUG: destroySession (AmSession.cpp:383): it != 
sess_it-&gt;second.end()<BR>(32382) DEBUG: destroySession (AmSession.cpp:390): 
session found: stopping session<BR>(32382) DEBUG: stopAndQueue 
(AmSession.cpp:338): session cleaner trying to stop 32382<BR>(32382) DEBUG: stop 
(AmThread.cpp:93): Thread 32382 calling on_stop, give it a chance to clean 
up.<BR>(32382) DEBUG: postEvent (AmEventQueue.cpp:47): AmEventQueue: trying to 
post event<BR>(32382) DEBUG: postEvent (AmEventQueue.cpp:55): AmEventQueue: 
event posted<BR>(32382) DEBUG: stop (AmThread.cpp:107): Thread 32382 finished 
detach.<BR>(32382) DEBUG: destroySession (AmSession.cpp:394): session stopped 
and destroyed (#sessions=0)<BR>(32382) DEBUG: write_to_fifo (SerClient.cpp:242): 
write_to_fifo: 
&lt;:t_reply:00007E7E6EEFE477<BR>200<BR>OK<BR>21048:437100943<BR>00007E7E32D96353<BR>Contact: 
&lt;sip:bye+cyber@213.178.216.45:5090&gt;<BR></DIV>
<DIV>&nbsp;</DIV>
<DIV>Seems that the body is missing but I don't understend why???</DIV>
<DIV>&nbsp;</DIV>
<DIV>Any help?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks</DIV>
<DIV>Rosario</DIV>
<DIV>&nbsp;</DIV></FONT></BODY></HTML>