[Users] openSER and SEMS: pb with voicemail when phone is busy or on no answer

Christophe Irles christophe.irles at alcatel.fr
Thu Aug 17 17:44:56 CEST 2006


Hi, 
I want to have voicemail feature when phone is busy or on no answer 

My configuration file is like that:
	.. 
	# route block used only to have voicemail if phone is busy or on no
answer 
	route[6] { 
	  append_branch(); 
	  avp_db_load("$ruri", "$avp(email)/$email_scheme"); 
	  if(!t_write_unix("/tmp/sems_socket",
"voicemail/voicemail_headers")) { 
	    t_reply("500", "error contacting sems"); 
	    return; 
	  } 
	  route(5); 
	  route(4); 
	  route(1); 
	} 

	failure_route[1] { 
	  # flagset 26 <=> if phone busy we want a voicemail 
	  if ( (isflagset(26)) && (t_check_status("486")) ) { 
	    resetflag(26); 
	    route(6); 
	    return; 
	  } 

	  # flagset 27 <=> on no answer we want a voicemail 
	  if ( (isflagset(27)) && (t_check_status("408")) ){ 
	    resetflag(27); 
	    route(6); 
	    return; 
	   } 
	  end_media_session(); 
	} 

Now if I use a "default.template" (used by the voicemail module)  with the
line: 
	from:voicemail@%domain%, 

SEMS cannot send correctly a email: 
	(3988) INFO: connect (AmSmtpClient.cpp:96): 127.0.0.1 welcomes us 
	(3988) DEBUG: send_line (AmSmtpClient.cpp:173): SENDED: HELO
127.0.0.1 
	(3988) DEBUG: read_line (AmSmtpClient.cpp:145): RECEIVED: 250
christophe.rv.fr 
	(3988) DEBUG: run (AmMail.cpp:119): Mail deamon starting its work 
	(3988) DEBUG: send_line (AmSmtpClient.cpp:173): SENDED: mail from:
<voicemail at 172.20.250.1> 
	(3988) DEBUG: read_line (AmSmtpClient.cpp:145): RECEIVED: 501 Bad
address syntax 

SEMS is trying to send a mail from "voicemail at 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" .

In this case the SEMS log file is: 
	(4494) INFO: connect (AmSmtpClient.cpp:96): 127.0.0.1 welcomes us 
	(4494) DEBUG: send_line (AmSmtpClient.cpp:173): SENDED: HELO
127.0.0.1 
	(4494) DEBUG: read_line (AmSmtpClient.cpp:145): RECEIVED: 250
christophe.rv.fr 
	(4494) DEBUG: run (AmMail.cpp:119): Mail deamon starting its work 
	(4494) DEBUG: send_line (AmSmtpClient.cpp:173): SENDED: mail from:
<voicemail at christophe.rv.fr> 
	(4494) DEBUG: read_line (AmSmtpClient.cpp:145): RECEIVED: 250 Ok 

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".

What I must change in my OpenSER configuration file in order to resolve this
problem ?  

NOTE: I'm using sems-0.1.1 in revision 68 

Thanks in advance, 
Christophe 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20060817/98f9bb86/attachment.htm>


More information about the sr-users mailing list