[Serusers] Newbie question

sip sip at arcdiv.com
Wed Sep 13 13:08:20 CEST 2006


Hello, Mario. 

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:

if(method=="INVITE")
{
   
   if(uri=~ "^sip:9[0-9]{7}@.*")
   {
      rewritehostport("10.11.12.13:5060");
      route(1);
      break;
   };

};

route[1]
{

   if(!t_relay())
   {
       sl_reply_error();
   };
}

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):

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. 

Something like:

t_on_failure("1");

perhaps somewhere in your invite block. 

Then, you'd create a failure route in your config:

failure_route[1]
{
   rewritehostport("10.11.12.13:5060");
   append_branch();
   t_relay_to_udp("your.asterisk.server", "5060");
}

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. 

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

if(method=="INVITE")
{
   if(uri =~ "^sip:\*8500 at .*")
   {
      strip(1);
      rewritehostport("10.11.12.13:5060");
      route(1);
      break;
   };
};

Then, if a user dials *8500, he'll be sent to asterisk (but first, it will strip off the first character -- the *)

On the Asterisk side, you'd need an 8500 extension which looks something like:

exten => 8500,1,VoicemailMain
exten => 8500,n,Hangup

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

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

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: 

site:lists.iptel.org  search terms

Hope that helps a little. 

N.

On Tue, 12 Sep 2006 22:42:59 -0400, Mario François Jauvin wrote
> Hi,
>  
> I have installed SER and asterisk on a redhat enterprise 4linux box. I would like to find out how to:
>  
 configure SER so that when people dial 9,2226665555 it will redirect the call to asterisk for processing and forwarding to PSTN 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 I would also like to know how users can be notified of their message indicators. In addition to the info above I would like to know if there are links that describe this in greater details.

>  
> Thanks,
> Mario


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


More information about the sr-users mailing list