Christophe Irles wrote:

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:[EMAIL PROTECTED],

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: <[EMAIL PROTECTED]> (3988) DEBUG: read_line (AmSmtpClient.cpp:145): RECEIVED: 501 Bad address syntax

SEMS is trying to send a mail from "[EMAIL PROTECTED]" ! 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:[EMAIL PROTECTED]" 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: <[EMAIL PROTECTED]>
(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 ?


Hi Christophe,

there are two solutions:

a) if you do not have a multi-domain configuration, you get rid of the %domain% and replace it with the your string domain name:
[EMAIL PROTECTED] ---> [EMAIL PROTECTED]

b) need to take care in your openser.cfg that the RURI in failure route contains a domain name in the domain part and not an IP address. Note that after lookup("location"), the RURI is replaced with the phone contact which is IP!! so you need to revert the RURI to the value from before the lookup.

regards,
bogdan

_______________________________________________
Users mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/users

Reply via email to