[Users] P-Asserted-Identity

Ty Manthey ty at doublehorncommunications.com
Tue May 23 15:33:20 CEST 2006


You are not able to understand because I only partially understand what I am
doing, and am therefore confused. Perhaps if I explain what I want to happen
it would help? I would like to insert into the invite the P-Asserted-Id
header in the format "<sip:+1NPANXXXXXX at customer.com>". I thought it best
this info be pulled out of the From header. The way I understand it, data
would be pulled out of the From header and placed into table "p_assert" in
MySQL database. It is then pulled out of database and inserted into the
invite header in the above format. However, I have gotten lost because I
have never worked with avpops before, and the more I read the less sense it
makes to me. I was running 0.9.5 until last week when I realized I would
need 1.0.1 to accomplish this. Is this enough info?

mysql> describe p_assert;
+-----------+---------------+-------+-----+---------+--------+
|  Field    |  Type         |  Null | Key | Default | Extra  |
+-----------+---------------+-------+-----+---------+--------+
| contact   | varchar(255)  | YES   |     | NULL    |        |
| username  | varchar(64)   | YES   |     | NULL    |        |
| domain    | varchar(128)  | YES   |     | NULL    |        |
| privacy   | varchar(11)   | YES   |     | NULL    |        |
| attribute | varchar(255)  | YES   |     | NULL    |        |
| value     | varchar(255)  | YES   |     | NULL    |        |
| type      | varchar(255)  | YES   |     | NULL    |        |
| uuid      | varchar(255)  | YES   |     | NULL    |        |
+-----------+---------------+-------+-----+---------+--------+

The point of privacy would be so that if privacy=yes the P-Asserted-Id would
read something like "<sip:anonymous at anonymous.invalid>" or similar.

I kind of understand what Klaus was saying, so in the mean time I will try
what he was saying.

Thanks again.

Ty Manthey
 
 
-----Original Message-----
From: Daniel-Constantin Mierla [mailto:daniel at voice-system.ro] 
Sent: Tuesday, May 23, 2006 4:30
To: Ty Manthey
Cc: users at openser.org
Subject: Re: [Users] P-Asserted-Identity

I am not able to understand the steps you want to do to compose the PAI 
header. You write some values in different AVPs and use other to fill 
the PAI header. If you can explain a bit how your data is structured, we 
may be able to help.

Cheers,
Daniel

On 05/23/06 01:31, Ty Manthey wrote:
> This is kicking my butt.
>
> OpenSER 1.0.1
>
> I just want the P-Asserted-Identity field to populate with info it gets
out
> of the "from" header.
>
> modules loaded:
> loadmodule "/usr/lib/openser/modules/mysql.so"
>
> loadmodule "/usr/lib/openser/modules/avpops.so"
> loadmodule "/usr/lib/openser/modules/sl.so"
> loadmodule "/usr/lib/openser/modules/tm.so"
> loadmodule "/usr/lib/openser/modules/rr.so"
> loadmodule "/usr/lib/openser/modules/maxfwd.so"
> loadmodule "/usr/lib/openser/modules/usrloc.so"
> loadmodule "/usr/lib/openser/modules/registrar.so"
> loadmodule "/usr/lib/openser/modules/textops.so"
>
> avpops params:
>
> modparam("avpops", "avp_url", "mysql://openser:xxxxxxx@localhost/openser")
> modparam("avpops", "avp_aliases", "from=s:from")
> modparam("avpops", "avp_table", "avptable")
> modparam("avpops", "uuid_column", "contact")
> modparam("avpops", "username_column", "username")
> modparam("avpops", "domain_column", "domain")
> modparam("avpops", "attribute_column", "attribute")
> modparam("avpops", "value_column", "value")
> modparam("avpops", "type_column", "type")
> modparam("avpops", "db_scheme",
>
"scheme0:table=p_assert;uuid_col=uuid;username_col=username;value_type=strin
> g")
>
> ( I built a table "p_assert" in the openser database with the above
columns,
> varchar(255) )
>
>
> attempted insertion:
>
> # P-Asserted-Identity Insertion
> 				#
> 				avp_write("$from", "s:from");
> 				avp_db_load("$from", "s:pai/p_assert");
> 				avp_printf("s:from",
> "<sip:$fu(s:pai)@64.192.174.8>");		
> 				remove_hf("P-Asserted-Identity");
> 				#avp_pushto("$P-Asserted-Identity/request",
> "s:pai");
> 				append_hf("P-Asserted-Identity:
> <sip:7034633348 at 64.192.174.8>\r\n");
> 				log(1,"***P asserted ID  placed *** \n");
>
> I think it's obvious I know enough to get myself into trouble, but I
thought
> populating the P-asserted header field with info out of the "From" header
> wouldn't be this complicated. What am I missing/doing wrong?
>
> Thanks.
>
>
> Ty Manthey
>
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>
>   





More information about the sr-users mailing list