[Users] Re: SER/OpenSER + Asterisk Voicemail

Marc Lewis marc at avvanta.com
Wed Jul 19 22:15:27 CEST 2006


Daniel (and others), I found my solution for rewriting.  I was missing a
key point in that I wasn't loading things correctly beforehand.  This does
*exactly* what I want it to:

    if (avp_db_load("$ruri/username", "s:mailboxuser")) {
        avp_pushto("$ruri/username", "s:mailboxuser");
    }

Thanks for pointing me in the right direction on this.

 - Marc


On Wed, Jul 19, 2006 at 12:44:12PM +0300, Daniel-Constantin Mierla wrote:
> To rewrite the username part of r-uri you have to use 
> avp_pushto("$ruti/username", "..."), not avp_write(). See:
> 
> http://www.openser.org/docs/modules/1.0.x/avpops.html#AEN347
> 
> If you start new deplyment, consider v1.1.0, it has more features.
> 
> Cheers,
> Daniel
> 
> On 07/19/06 03:31, Marc Lewis wrote:
> >I've got OpenSER 1.0.1 working very well taking care of SIP UA's and
> >have them going into asterisk voicemail correctly using Asterisk Realtime
> >and MySQL 5.0 views.
> >
> >To ease our customers into this and give them a signle sign-on for all of
> >the services we offer, we're using their username/email address on our main
> >system.  This gives them a single username/password combination for their
> >POP email, DSL connection, webmail access, Jabber services and (soon) SIP
> >services.
> >
> >My problem is this:  Its no problem getting Asterisk to accept an
> >alphanumeric mailbox for storing the user's voicemail.  The problem is when
> >they want to access it.  If they're on a Linksys or Grandstream ATA and
> >want to dial into their voicemail, it prompts them for their mailbox
> >number.  If their mailbox number is alphanumeric there is no way for them
> >to enter that and they won't be able to get at their voicemail.
> >
> >What I would like to do is assign a mailbox number that is equal to their
> >"primary" phone number.  This can be stored in the usr_preferences table as
> >an AVP.  What I haven't figured out yet is how to rewrite that RURI before
> >it sends it off to the asterisk server for voicemail.  By doing this, we
> >could use alphanumeric SIP logins, and then phone numbers for voicemail
> >boxes.
> >
> >Given this configuration, how would I rewrite the user?
> >
> >I've tried:
> >
> >  modparam("avpops", "avp_aliases", "mailboxuser=s:801")
> >
> >And then:
> >
> >    avp_write("$ruri/username", "s:mailboxuser/g");
> >    rewritehostport("10.0.0.2:5060");
> >    append_branch();
> >
> >But the user never changes.  I've tried various things with rewriteuser and
> >AVP's but haven't had any success so far.
> >
> >The usr_preferences row looks like this:
> >
> >+------+----------+--------+-----------+------+------------+
> >| uuid | username | domain | attribute | type | value      |
> >+------+----------+--------+-----------+------+------------+
> >|      | sipuser  |        | 801       |    0 | 4255551212 |
> >+------+----------+--------+-----------+------+------------+
> >
> >Anyone have any suggestions on how to solve this problem?
> >
> >Thanks.
> >
> > - Marc
> >
> >  
> 

-- 
Marc Lewis
Avvanta Communications Corporation




More information about the sr-users mailing list