<HTML>
<HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="Open WebMail 2.20 20031014" name=GENERATOR>
</HEAD>
<BODY bgColor=#ffffff>

<font size="2">Hello, Mario. 
<br />
<br />1) This is pretty easy.  Assuming the IP address of the Asterisk server is 10.11.12.13 (running on port 5060), you'd need something in your SER config that looks like:
<br />
<br />if(method==&quot;INVITE&quot;)
<br />{
<br />   
<br />   if(uri=~ &quot;^sip:9[0-9]{7}@.*&quot;)
<br />   {
<br />      rewritehostport(&quot;10.11.12.13:5060&quot;);
<br />      route(1);
<br />      break;
<br />   };
<br />
<br />};
<br />
<br />route[1]
<br />{
<br />
<br />   if(!t_relay())
<br />   {
<br />       sl_reply_error();
<br />   };
<br />}
<br />
<br />
<br />2)  Assuming you have people's mailboxes on Asterisk (I'm not going to go into the details on how to set up the Asterisk box here, but you'll need to configure the extensions.conf for the user numbers you're expecting to use, and a voicemail.conf for each mailbox):
<br />
<br />You'd need to read up on failure routes in SER. Basically, you need to set a flag somewhere in your config that tells SER that you're intending to use a special routing block in case of a timeout (I also won't go into detail about setting timeouts here as there are a lot of ways) using t_on_failure. 
<br />
<br />Something like:
<br />
<br />t_on_failure(&quot;1&quot;);
<br />
<br />perhaps somewhere in your invite block. 
<br />
<br />Then, you'd create a failure route in your config:
<br />
<br />failure_route[1]
<br />{
<br />   rewritehostport(&quot;10.11.12.13:5060&quot;);
<br />   append_branch();
<br />   t_relay_to_udp(&quot;your.asterisk.server&quot;, &quot;5060&quot;);
<br />}
<br />
<br />
<br />Keep in mind, these are very SIMPLIFIED examples. You might want more in your failure route. You might want something else. You'll definitely want more in the rest of your SER config. 
<br />
<br />All that does is SEND the call to asterisk if someone's call times out (sending to voicemail).  If you then want users to be able to access their voicemail, the EASIEST way is to set up a voicemail number to call... like...  
<br />
<br />if(method==&quot;INVITE&quot;)
<br />{
<br />   if(uri =~ &quot;^sip:\*8500@.*&quot;)
<br />   {
<br />      strip(1);
<br />      rewritehostport(&quot;10.11.12.13:5060&quot;);
<br />      route(1);
<br />      break;
<br />   };
<br />};
<br />
<br />Then, if a user dials *8500, he'll be sent to asterisk (but first, it will strip off the first character -- the *)
<br />
<br />On the Asterisk side, you'd need an 8500 extension which looks something like:
<br />
<br />exten =&gt; 8500,1,VoicemailMain
<br />exten =&gt; 8500,n,Hangup
<br />
<br />All that does is drop them into the Voicemail main application which will ask for a mailbox number and password (you'll need to set up the mailboxes individually either in the asterisk voicemail.conf or using asterisk realtime and setting them up in the database). 
<br />
<br />3)  This is tricky.  Very tricky. There are lots of POSSIBLE methods for doing this, but none of them are terribly pretty.  Check out http://www.voip-info.org/wiki/view/Asterisk+at+large
<br />
<br />4) There are lots of links about setting up SER at http://www.onsip.org    Lots of information in general about setting up both Asterisk and SER (and both together, I imagine) can be found doing searches at http://www.voip-info.org     You can also search google to read the archives for this mailing list by doing: 
<br />
<br />site:lists.iptel.org  search terms
<br />
<br />
<br />Hope that helps a little. 
<br />
<br />N.
<br /><b style="font-weight: bold;">
<br /></b>
<br style="font-weight: bold;" /><b>
<br style="font-weight: bold;" />
<br style="font-weight: bold;" />
<br style="font-weight: bold;" />
<br />On Tue, 12 Sep 2006 22:42:59 -0400, Mario François Jauvin wrote</b>
<br />&gt; <font size="2" face="Arial"><span style="font-size: 10pt; font-family: arial;">Hi,<o:p /></span></font>

<br />&gt; <font size="2" face="Arial"><span style="font-size: 10pt; font-family: arial;"><o:p> </o:p></span></font>

<br />&gt; <font size="2" face="Arial"><span style="font-size: 10pt; font-family: arial;">I have installed SER and asterisk on a redhat enterprise 4
linux box.  I would like to find out how to:<o:p /></span></font>

<br />&gt; <font size="2" face="Arial"><span style="font-size: 10pt; font-family: arial;"><o:p> </o:p></span></font>

<ol type="1" start="1" style="margin-top: 0cm;">
 
<li style="" class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: arial;">configure SER so that when
     people dial 9,2226665555 it will redirect the call to asterisk for
     processing and forwarding to PSTN<o:p /></span></font></li>
 
<li style="" class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: arial;">I heard mentioned several times
     how asterisk can provide voicemail for SER clients and I would like to
     know how to set this up so that user can login to their mailbox<o:p /></span></font></li>
 
<li style="" class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: arial;">I would also like to know how users
     can be notified of their message indicators.<o:p /></span></font></li>
 
<li style="" class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: arial;">In addition to the info above I
     would like to know if there are links that describe this in greater
     details.<o:p /></span></font></li>
</ol>

<br />&gt; <font size="2" face="Arial"><span style="font-size: 10pt; font-family: arial;"><o:p> </o:p></span></font>

<br />&gt; <font size="2" face="Arial"><span style="font-size: 10pt; font-family: arial;">Thanks,<o:p /></span></font>

<br />&gt; <font size="2" face="Arial"><span style="font-size: 10pt; font-family: arial;">Mario<o:p /></span></font>

<br />
<br />
<br />
</font>
</BODY>
</HTML>