[Serusers] Asterisks to ser to asterisk (voicemail)

GR S gr_sh2003 at yahoo.com
Thu Jul 29 12:44:10 CEST 2004


Hi Dave,

--- Dave Bath <dave at fuuz.com> wrote:

> Please see reply's inline...
<snip> 
> 
> Hmm... what do you mean about fetching from the database?  I am using
> the mysql module and have the subscribers and aliases stored in the
> database...  it sounds like I want to do exactly what you are doing -
> lookup the alias in the database and then modify the URI.  Do you have
> any advice as to how you are doing this?
>

We wrote a small loadable module for SER and we have exported parameters and methods from the
module. So when an INVITE comes, we call those methods and the URI is modified depending on the
values in the database. Then SER t_relays/forwards the call to the specified destination in the
URI. So far it has been serving our needs. The following lines will give you an idea of this:

ser.cfg:

loadmodule "/usr/local/lib/ser/modules/ourmodule.so"
modparam ("ourmodule", "media_server", "192.168.68.10:5070")

and when we receive calls:

if (uri =~ "sip:1[0-9]{10}@*")
{
    #Method form the module 
    if (! get_extension ("1")
    {
        sl_send_reply ("404", "Not Found!");
        break;
    }

    t_on_failure ("2");
    t_relay();
    break
}

SER Developers guide will give you a better idea of how to do this. Pls checkout this URL:
http://www.iptel.org/ser/doc/serdev/serdev.html 

Hope that helps...


=====
Girish Gopinath  <gr_sh2003 at yahoo.com>


		
__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail




More information about the sr-users mailing list