Hi
I'm in need of some help using the schemes with AVPops!
What I would like to do, is extract a value from the coloum:username in table:aliases, matched by a specific user. First of all I'm uncertain of how to create such a scheme and match it with a specific user, and second of all, can I push this in to the header as a P-Asserted-Identity? And I'm not mistaken, when I under the impression thatI dont need to create a AVP table for this, am I?
Thank you in advance
Kind regards Martin
Hi Martin,
you may find more info regarding the DB scheme with avpops here : http://www.voice-system.ro/docs/avpops/ar01s04.html
you may load form any kind of table that has at least the username, domain like columns. For example, to load the email from subscriber table, define:
modparam("avpops", "db_scheme", "email_scheme:username_col=username; \ domain_col=domain;value_col=email_address;table=subscriber")
in this way you may load the PAI value from some table.
To load the a value into a header just do: avp_db_load("$ruri","i:14/$email_scheme") avp_pushto("$Email-Hdr/request","i:14");
for the function syntax see the tutorial: http://www.voice-system.ro/docs/avpops/
regards, bogdan
Martin Kjeldsen wrote:
Hi
I'm in need of some help using the schemes with AVPops!
What I would like to do, is extract a value from the coloum:username in table:aliases, matched by a specific user. First of all I'm uncertain of how to create such a scheme and match it with a specific user, and second of all, can I push this in to the header as a P-Asserted-Identity? And I'm not mistaken, when I under the impression thatI dont need to create a AVP table for this, am I?
Thank you in advance
Kind regards Martin
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Try:
modparam("avpops", "db_scheme", "scheme0:uuid_col=contact; \ value_col=username;value_type=string;table=aliases") ... avp_db_load("$uri_avp","s:pai/$scheme0"); avp_pushto("$P-Asserted-Identity","s:pai");
Note that $uri_avp is an alias to the avp storing user's uri to match the contact column from the table aliases. As I suppose, it should be the From uri and in this case you can use directly $from as first parameter in avp_db_load(). You may have some problems if the UA adds parameters in From URI (it will not match the contact column) and in this case you have to use avp_subst() to get rid of them.
An easier solution would be if you use the dbaliases table (alias_db module).
Daniel
On 08/12/05 21:39, Martin Kjeldsen wrote:
Hi
I'm in need of some help using the schemes with AVPops!
What I would like to do, is extract a value from the coloum:username in table:aliases, matched by a specific user. First of all I'm uncertain of how to create such a scheme and match it with a specific user, and second of all, can I push this in to the header as a P-Asserted-Identity? And I'm not mistaken, when I under the impression thatI dont need to create a AVP table for this, am I?
Thank you in advance
Kind regards Martin
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hi
Thanks for the help. So far I'm still having some trouble getting the info out of the DB via the load function. I'm trying to get the username in tha alias table with these settings.
modparam("avpops", "db_scheme", "scheme0:uuid_col=contact;value_col=username;value_type=string;table=aliases")
avp_db_load("$from","s:pai/$scheme0");
But not getting anything!!!
And a second thought is how will I be able to push it into the header as "P-Asserted-Identity", when the only accepts headers of Request or Reply?
Thanks in advance
Regards Martin
Daniel-Constantin Mierla wrote:
Try:
modparam("avpops", "db_scheme", "scheme0:uuid_col=contact; \ value_col=username;value_type=string;table=aliases") ... avp_db_load("$uri_avp","s:pai/$scheme0"); avp_pushto("$P-Asserted-Identity","s:pai");
Note that $uri_avp is an alias to the avp storing user's uri to match the contact column from the table aliases. As I suppose, it should be the From uri and in this case you can use directly $from as first parameter in avp_db_load(). You may have some problems if the UA adds parameters in From URI (it will not match the contact column) and in this case you have to use avp_subst() to get rid of them.
An easier solution would be if you use the dbaliases table (alias_db module).
Daniel
On 08/12/05 21:39, Martin Kjeldsen wrote:
Hi
I'm in need of some help using the schemes with AVPops!
What I would like to do, is extract a value from the coloum:username in table:aliases, matched by a specific user. First of all I'm uncertain of how to create such a scheme and match it with a specific user, and second of all, can I push this in to the header as a P-Asserted-Identity? And I'm not mistaken, when I under the impression thatI dont need to create a AVP table for this, am I?
Thank you in advance
Kind regards Martin
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hello,
On 08/16/05 01:31, Martin Kjeldsen wrote:
Hi
Thanks for the help. So far I'm still having some trouble getting the info out of the DB via the load function. I'm trying to get the username in tha alias table with these settings.
modparam("avpops", "db_scheme", "scheme0:uuid_col=contact;value_col=username;value_type=string;table=aliases")
avp_db_load("$from","s:pai/$scheme0");
But not getting anything!!!
could you watch the log of mysql server (usually it is /var/log/mysql.log or /var/log/mysql/mysql.log) and see the SQL query for this case? That will help to understand what happens and what has to be corrected.
And a second thought is how will I be able to push it into the header as "P-Asserted-Identity", when the only accepts headers of Request or Reply?
I am not sure that I get the question here, but you can add the value in the P-Asserted-Identity header to the request with avp_pushto("$P-Asserted-Identity","s:pai");
Daniel
Thanks in advance
Regards Martin
Daniel-Constantin Mierla wrote:
Try:
modparam("avpops", "db_scheme", "scheme0:uuid_col=contact; \ value_col=username;value_type=string;table=aliases") ... avp_db_load("$uri_avp","s:pai/$scheme0"); avp_pushto("$P-Asserted-Identity","s:pai");
Note that $uri_avp is an alias to the avp storing user's uri to match the contact column from the table aliases. As I suppose, it should be the From uri and in this case you can use directly $from as first parameter in avp_db_load(). You may have some problems if the UA adds parameters in From URI (it will not match the contact column) and in this case you have to use avp_subst() to get rid of them.
An easier solution would be if you use the dbaliases table (alias_db module).
Daniel
On 08/12/05 21:39, Martin Kjeldsen wrote:
Hi
I'm in need of some help using the schemes with AVPops!
What I would like to do, is extract a value from the coloum:username in table:aliases, matched by a specific user. First of all I'm uncertain of how to create such a scheme and match it with a specific user, and second of all, can I push this in to the header as a P-Asserted-Identity? And I'm not mistaken, when I under the impression thatI dont need to create a AVP table for this, am I?
Thank you in advance
Kind regards Martin
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hi Daniel
Thanks for the help. I'll watch the log for actions. Regarding the pushto() function, I just misunderstood the meaning of reply and request!
Thanks Martin
Daniel-Constantin Mierla wrote:
Hello,
On 08/16/05 01:31, Martin Kjeldsen wrote:
Hi
Thanks for the help. So far I'm still having some trouble getting the info out of the DB via the load function. I'm trying to get the username in tha alias table with these settings.
modparam("avpops", "db_scheme", "scheme0:uuid_col=contact;value_col=username;value_type=string;table=aliases")
avp_db_load("$from","s:pai/$scheme0");
But not getting anything!!!
could you watch the log of mysql server (usually it is /var/log/mysql.log or /var/log/mysql/mysql.log) and see the SQL query for this case? That will help to understand what happens and what has to be corrected.
And a second thought is how will I be able to push it into the header as "P-Asserted-Identity", when the only accepts headers of Request or Reply?
I am not sure that I get the question here, but you can add the value in the P-Asserted-Identity header to the request with avp_pushto("$P-Asserted-Identity","s:pai");
Daniel
Thanks in advance
Regards Martin
Daniel-Constantin Mierla wrote:
Try:
modparam("avpops", "db_scheme", "scheme0:uuid_col=contact; \ value_col=username;value_type=string;table=aliases") ... avp_db_load("$uri_avp","s:pai/$scheme0"); avp_pushto("$P-Asserted-Identity","s:pai");
Note that $uri_avp is an alias to the avp storing user's uri to match the contact column from the table aliases. As I suppose, it should be the From uri and in this case you can use directly $from as first parameter in avp_db_load(). You may have some problems if the UA adds parameters in From URI (it will not match the contact column) and in this case you have to use avp_subst() to get rid of them.
An easier solution would be if you use the dbaliases table (alias_db module).
Daniel
On 08/12/05 21:39, Martin Kjeldsen wrote:
Hi
I'm in need of some help using the schemes with AVPops!
What I would like to do, is extract a value from the coloum:username in table:aliases, matched by a specific user. First of all I'm uncertain of how to create such a scheme and match it with a specific user, and second of all, can I push this in to the header as a P-Asserted-Identity? And I'm not mistaken, when I under the impression thatI dont need to create a AVP table for this, am I?
Thank you in advance
Kind regards Martin
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hello, does anybody here already have this problem while starting openser? And, what does this Aliases exactly means?
WARNING: fix_socket_list: could not rev. resolve 200.17.49.196 Listening on udp: 127.0.0.1 [127.0.0.1]:5060 udp: 200.17.49.196 [200.17.49.196]:5060 tcp: 127.0.0.1 [127.0.0.1]:5060 tcp: 200.17.49.196 [200.17.49.196]:5060 Aliases: tcp: localhost:5060 tcp: arm:5060 tcp: arm.muru.com:5060 udp: localhost:5060 udp: arm:5060 udp: arm.muru.com:5060
Bus error
Thanks, Andrea Giordanna
_______________________________________________________ Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora! http://br.acesso.yahoo.com/
Are you using a non usual platform?
I think the error message is from the OS, not from openser. I've never seen this error message yet.
regards klaus
Andréa Giordanna wrote:
Hello, does anybody here already have this problem while starting openser? And, what does this Aliases exactly means?
WARNING: fix_socket_list: could not rev. resolve 200.17.49.196 Listening on udp: 127.0.0.1 [127.0.0.1]:5060 udp: 200.17.49.196 [200.17.49.196]:5060 tcp: 127.0.0.1 [127.0.0.1]:5060 tcp: 200.17.49.196 [200.17.49.196]:5060 Aliases: tcp: localhost:5060 tcp: arm:5060 tcp: arm.muru.com:5060 udp: localhost:5060 udp: arm:5060 udp: arm.muru.com:5060
Bus error
Thanks, Andrea Giordanna
_______________________________________________________ Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora! http://br.acesso.yahoo.com/
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
What are the funcionalities that OS must have implemented to OpenSER works properly?
--- Klaus Darilion klaus.mailinglists@pernau.at escreveu:
Are you using a non usual platform?
I think the error message is from the OS, not from openser. I've never seen this error message yet.
regards klaus
Andréa Giordanna wrote:
Hello, does anybody here already have this problem while starting openser? And, what does this Aliases exactly means?
WARNING: fix_socket_list: could not rev. resolve 200.17.49.196 Listening on udp: 127.0.0.1 [127.0.0.1]:5060 udp: 200.17.49.196
tcp: 127.0.0.1 [127.0.0.1]:5060 tcp: 200.17.49.196
Aliases: tcp: localhost:5060 tcp: arm:5060 tcp: arm.muru.com:5060 udp: localhost:5060 udp: arm:5060 udp: arm.muru.com:5060
Bus error
Thanks, Andrea Giordanna
_______________________________________________________
Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora!
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
__________________________________________________ Converse com seus amigos em tempo real com o Yahoo! Messenger http://br.download.yahoo.com/messenger/
Hi Andréa,
does the error prevents OpenSER to start - I mean it a failure? If so, can you give more info about your system (hardware architecture and OS - use "openser -V") and the output in full debug (set debug to 6 and log_stderror=yes)?
regards, bogdan
Andréa Giordanna wrote:
Hello, does anybody here already have this problem while starting openser? And, what does this Aliases exactly means?
WARNING: fix_socket_list: could not rev. resolve 200.17.49.196 Listening on udp: 127.0.0.1 [127.0.0.1]:5060 udp: 200.17.49.196 [200.17.49.196]:5060 tcp: 127.0.0.1 [127.0.0.1]:5060 tcp: 200.17.49.196 [200.17.49.196]:5060 Aliases: tcp: localhost:5060 tcp: arm:5060 tcp: arm.muru.com:5060 udp: localhost:5060 udp: arm:5060 udp: arm.muru.com:5060
Bus error
Thanks, Andrea Giordanna
_______________________________________________________ Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora! http://br.acesso.yahoo.com/
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
On Tuesday 16 August 2005 22:53, Andréa Giordanna wrote:
Hello, does anybody here already have this problem while starting openser? And, what does this Aliases exactly means?
[...]
Bus error
Thanks, Andrea Giordanna
"Bus error" is a very critical OS error message, it has nothing to do with OpenSER. You either have faulty hardware or hit a kernel bug ;-)
C'ya, Marc