[Serusers] About rewriteuser()

chungyu chungyu at ms11.voip.edu.tw
Wed Dec 13 16:45:41 CET 2006


Hi
     I used subst_uri() and AVP.
ex:
subst_uri('/^sip:(.*)@(.*)$/sip:4761 at 10\.10\.20\.154/'); 

the result is OK

changed this
avp_write("4761", "s:phone");
subst_uri('/^sip:(.*)@(.*)$/sip:$avp(phone)@10\.10\.20\.154/'); 
the result is error.

On the AVP configuration was not wrong?
thank you!!
Changyu
2006/12/13


  ----- Original Message ----- 
  From: chungyu 
  To: serusers at lists.iptel.org 
  Sent: Wednesday, December 13, 2006 9:56 PM
  Subject: [Serusers] About rewriteuser()


  Hi

       I have a field called "phone_number" in subscriber,and would append to rewriteuser().
  But rewriteuser() type is string. So have a problem.

  problem:
        I used AVpops.

        modparam("avpops","avp_aliases","phone=i:660")
        modparam("avpops","db_scheme","phone_scheme:table=subscriber;value_col=phone_number;value_type=string")

        avp_db_load("$ruri","$phone/$phone_scheme");
        rewriteuser("$phone");
        
        result is error. because rewriteuser(string).

        and i want if value of "$phone" is 4761
    
        the result is 4761 at domain

  How should I use rewriteuser()

  Thank you!!

  Chungyu
  2006/12/13



------------------------------------------------------------------------------


  _______________________________________________
  Serusers mailing list
  Serusers at lists.iptel.org
  http://lists.iptel.org/mailman/listinfo/serusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20061213/ab8be6d0/attachment.htm>


More information about the sr-users mailing list