[Serusers] Clueless newbie question - integrating SER and Asterisk

SIP sip at arcdiv.com
Tue May 8 13:25:06 CEST 2007


John Breen wrote:
> Help!
>
> I've followed the SER documentation and searched the web like a mad 
> thing and found nothing useful.
>
> I have an asterisk box here at home and want to put SER on it so I can 
> use SIP clients out in the real world (on the other side of my 
> firewall) to get to it.
>
> Now, I have got SER set up and the phones register fine and 
> everything, BUT I cannot see how to get it to pass calls through to 
> Asterisk.
>
> I'm not using Asterisk realtime or anything like that - just plain old 
> asterisk with plain old config files.
>
> I thought I had it right, but calls are just not getting to asterisk 
> so far as I can see.
>
> I know it must be possible, I just can't see how to do it.
>
> Regards
>
> John Breen
> _______________________________________________
> Serusers mailing list
> Serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers


Say you wanted to forward all your users who dial the number 21xx to 
Asterisk, running on IP 10.1.1.2 at port 5090. The relevant portions of 
your SER config might look like this:

if(uri =~ "^sip:21[0-9]{2}@.*")
{
   # Sending to the asterisk server
   rewritehostport("10.1.1.2:5090");
   if(!t_relay())
   {
      sl_reply_error();
   };
};


On your asterisk server, in your extensions.conf file (in the right 
context, which I won't go into here), you'd need something like:

exten => _21XX,1,Answer
exten => _21XX,n,Voicemail(${EXTEN})

etc, etc.


The BASICS of it are incredibly simple, but the details will sometimes 
get you. You need to ensure that you're sending to the right context in 
Asterisk, have the proper sip.conf setup, etc.

N.



More information about the sr-users mailing list