[Users] manipulate $from under avops module
Daniel-Constantin Mierla
daniel at voice-system.ro
Thu Oct 13 01:27:24 CEST 2005
Hello,
you have to write the From URI in an avp, then use the avp_subst() to
strip the first char. Afterwards,you can use the result in
avp_db_load(). All these are possible with the latest CVS version of
openser.
Cheers,
Daniel
On 10/13/05 00:04, Brandon Price wrote:
> I am having some trouble with avpops and the from variable. I am doing
> something like
>
> avp_db_load("$to","$disabled");
>
> which produces a query like
> select value,attribute,type from usr_preferences where
> username='+15183207486' AND attribute='50'
> the problem is I need a query like select value,attribute,type from
> usr_preferences where username='15183207486' AND attribute='50'
> ,without the "+"
> is there any way I can strip the 1st digit from the $from variable? I
> have already tried using strip(1);
>
> As always any help greatly appreciated.
>
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>
More information about the Users
mailing list