<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7036.0">
<TITLE>openSER and SEMS: pb with voicemail when phone is busy or on no answer</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">Hi,</FONT><FONT FACE="Times New Roman"> </FONT>
<BR><FONT SIZE=2 FACE="Arial">I want to have voicemail feature when phone is busy or on no answer</FONT><FONT FACE="Times New Roman"> </FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">My configuration file is like that:</FONT>
<UL>
<P><FONT SIZE=2 FACE="Arial">….</FONT>
<BR><FONT SIZE=2 FACE="Arial"># route block used only to have voicemail if phone is busy or on no answer</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New">route[6] {</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New"> append_branch();</FONT><FONT FACE="Times New Roman"> </FONT>
<BR><FONT SIZE=2 FACE="Courier New"> avp_db_load("$ruri", "$avp(email)/$email_scheme");</FONT><FONT FACE="Times New Roman"> </FONT>
<BR><FONT SIZE=2 FACE="Courier New"> if(!t_write_unix("/tmp/sems_socket", "voicemail/voicemail_headers")) {</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New"> t_reply("500", "error contacting sems");</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New"> return;</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New"> }</FONT><FONT FACE="Times New Roman"> </FONT>
<BR><FONT SIZE=2 FACE="Courier New"> route(5);</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New"> route(4);</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New"> route(1);</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New">}</FONT><FONT FACE="Times New Roman"> </FONT>
</P>
<P><FONT SIZE=2 FACE="Courier New">failure_route[1] {</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New"> # flagset 26 <=> if phone busy we want a voicemail</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New"> if ( (isflagset(26)) && (t_check_status("486")) ) {</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New"> resetflag(26);</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New"> route(6);</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New"> return;</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New"> }</FONT><FONT FACE="Times New Roman"> </FONT>
</P>
<P><FONT SIZE=2 FACE="Courier New"> # flagset 27 <=> on no answer we want a voicemail</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New"> if ( (isflagset(27)) && (t_check_status("408")) ){</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New"> resetflag(27);</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New"> route(6);</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New"> return;</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New"> }</FONT><FONT FACE="Times New Roman"> </FONT>
<BR><FONT SIZE=2 FACE="Courier New"> end_media_session();</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New">}</FONT><FONT FACE="Times New Roman"> </FONT>
</P>
</UL>
<P><FONT SIZE=2 FACE="Arial">Now if I use a "default.template" (used by the voicemail module) with the line:</FONT><BR>
<FONT SIZE=2 FACE="Arial">from:voicemail@%domain%, </FONT>
<BR>
<BR><FONT SIZE=2 FACE="Arial">SEMS cannot send correctly a email:</FONT><FONT FACE="Times New Roman"> </FONT>
<BR> <FONT SIZE=2 FACE="Arial">(3988) INFO: connect (AmSmtpClient.cpp:96): 127.0.0.1 welcomes us</FONT><FONT FACE="Times New Roman"><BR>
</FONT> <FONT SIZE=2 FACE="Arial">(3988) DEBUG: send_line (AmSmtpClient.cpp:173): SENDED: HELO 127.0.0.1</FONT><FONT FACE="Times New Roman"><BR>
</FONT> <FONT SIZE=2 FACE="Arial">(3988) DEBUG: read_line (AmSmtpClient.cpp:145): RECEIVED: 250 christophe.rv.fr</FONT><FONT FACE="Times New Roman"> </FONT>
<BR> <FONT SIZE=2 FACE="Arial">(3988) DEBUG: run (AmMail.cpp:119): Mail deamon starting its work</FONT><FONT FACE="Times New Roman"><BR>
</FONT> <FONT SIZE=2 FACE="Arial">(3988) DEBUG: send_line (AmSmtpClient.cpp:173): SENDED: mail from: <voicemail@172.20.250.1></FONT><FONT FACE="Times New Roman"><BR>
</FONT> <FONT SIZE=2 FACE="Arial">(3988) DEBUG: read_line (AmSmtpClient.cpp:145): RECEIVED: 501 Bad address syntax</FONT><FONT FACE="Times New Roman"> </FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">SEMS is trying to send a mail from "voicemail@172.20.250.1" ! The SMTP server doesn't accept an IP and this IP is the IP of the callee SIP device … Strange. It's important to notice that "voicemail" works fine when is used on a phone not registered with the line "from:voicemail@%domain%" in file "default.template" .</FONT></P>
<BR>
<P><FONT SIZE=2 FACE="Arial">In this case the SEMS log file is:</FONT><FONT FACE="Times New Roman"><BR>
</FONT> <FONT SIZE=2 FACE="Arial">(4494) INFO: connect (AmSmtpClient.cpp:96): 127.0.0.1 welcomes us</FONT><FONT FACE="Times New Roman"><BR>
</FONT> <FONT SIZE=2 FACE="Arial">(4494) DEBUG: send_line (AmSmtpClient.cpp:173): SENDED: HELO 127.0.0.1</FONT><FONT FACE="Times New Roman"><BR>
</FONT> <FONT SIZE=2 FACE="Arial">(4494) DEBUG: read_line (AmSmtpClient.cpp:145): RECEIVED: 250 christophe.rv.fr</FONT><FONT FACE="Times New Roman"> </FONT>
<BR> <FONT SIZE=2 FACE="Arial">(4494) DEBUG: run (AmMail.cpp:119): Mail deamon starting its work</FONT><FONT FACE="Times New Roman"><BR>
</FONT> <FONT SIZE=2 FACE="Arial">(4494) DEBUG: send_line (AmSmtpClient.cpp:173): SENDED: mail from: <voicemail@christophe.rv.fr></FONT><FONT FACE="Times New Roman"><BR>
</FONT> <FONT SIZE=2 FACE="Arial">(4494) DEBUG: read_line (AmSmtpClient.cpp:145): RECEIVED: 250 Ok</FONT><FONT FACE="Times New Roman"> </FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">So I suspect the "%domain%" in "default.template" file is not correctly read by the module "voicemail" after a "failure_route" or after a "append_branch".</FONT></P>
<P><FONT SIZE=2 FACE="Arial">What I must change in my OpenSER configuration file in order to resolve this problem ? </FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">NOTE: I'm using sems-0.1.1 in revision 68</FONT><FONT FACE="Times New Roman"> </FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Thanks in advance,</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Arial">Christophe</FONT><FONT FACE="Times New Roman"> </FONT>
</P>
</BODY>
</HTML>