Hi, in my opinion CPL language is not enough powerful, the absence of regular
expression or any header reading makes it poor (IMHO). It would become really
cool if it could match AVP's but it can :(
I'm trying to give some power to CPL logic. I want to implement "addressbook
categories" for each user, this is: each user has its own addressbook in which
he can set a category for each contact:
- Work
- Friend
- Family
- Custom
And of course what I need it a way to match that category **inside** the CPL logic.
This is impossible with CPL itself so I'm thinking in a very very dirty trick:
** Addressbook Categories **
- In an incoming call for "bob(a)domain.org" OpenSer will match the callerid against
Bob's addressbook. This will return a variable or AVP:
$avp(s:caller_category)
- CPL module just can match "Organization", "Subject", and "User-Agent", so
OpenSer will do:
append_hf("Bak_Organization: $hdr(Organization)\r\n"); # To preserve original Organization
remove_hf("Organization"); # Remove original Organization
append_hf("Organization: $avp(s:caller_category)\r\n"); # Set category as Organization
- But since OpenSer appends/removes headers when the message leaves the proxy I
can't run CPL now (it will not read the new "Organization" header), so I need to do a
dirty loop in order to append the header.
- When the message comes back into OpenSer the headers are updated so I do:
remove_hf("Organization"); # Remove current Organization (that is a hack)
append_hf("Organization: $hdr(Backup_Organization)\r\n"); # Restore original Organization
(those changes will be applied again when message leaves OpenSer, not now).
- And I run CPL:
cpl_run_script("incoming","FORCE_STATEFUL");
- Into CPL I match "Organization" header by:
<string-switch field="Organization">
<string is="Friends">
<reject status="reject" reason="I have no friends" />
</string>
</string-switch>
Is it enough dirty or could I make it more?
Any suggestion? how do you people implement things like this?
Thank a lot.
--
Iñaki Baz Castillo
ibc(a)in.ilimit.es
Asked this question earlier in the week, and didn't get an answer.
I'm using avp_db_query to log calls to MySQL. I'd like to be able to turn this and other functionality on and off in the openser.cfg file without having to comment lines. Obviously putting the settings into MySQL and reading them with avp_db_query() doesn't make much sense.
Does OpenSER have some sort of simple key/value pair configuration it read from a file so that I can control the basic configuration with? The db_text and db_berkeley modules are unfortunately only designed to be used for userloc data. Why is that?
Thanks,
Doug.
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
I can't make it work when testing the effect of validity element in conditions element in Openser+OpenXCAP,
also happen on sphere element and transformations. The presence document is based on rpid and it is quite simple. The only one
I got it work is like below(without validity and sphere elements):
<condition>
<one id="">
</condition>
<actions>
<sub-handling>allow</sub-handling>
</actions>
The following two(adding validity and sphere) are not working:
<condition>
<one id="">
<validity>
<from>...</from>
<until>...</until>
</validity>
</condition>
<actions>
<sub-handling>allow</sub-handling>
</actions>
<condition>
<shpere value="home">
<one id="">
</condition>
<actions>
<sub-handling>allow</sub-handling>
</actions>
Does OpenXCAP support these policies metioned above?
Or, Openser is not supporting sphere and validity auth, it only knows sub-handling(xcap_auth.c in openser/modules/presence_xml)?
Thank you!
Kevin,
_________________________________________________________________
Windows Live Photo gallery 数码相机的超级伴侣,轻松管理和编辑照片,还能制作全景美图!
http://get.live.cn/product/photo.html
I haven't had much luck getting replies to my questions lately, hopefully I'll have more luck with this one.
avp_db_query().... does it have a timeout? What is it? Can I set it?
If I use it, and there is a MySQL database problem, I don't want avp_db_query() to wait forever trying to connect to MySQL. If it can't connect after a few seconds, I'd like it to just give up. I have multiple calls to avp_db_query() in a typical call flow. It would be even better if I could set a flag on the first timeout and not try again during that call.
Can that be done?
Doug.
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
Hi,
Does anybody know where can I find more documentation on the new XML-RPC module of SER2. I want to write a management plugin for the application I am writing on top of SEMS using the XML-RPC interface. The documentation in the SER2.0 documentation page (http://www.iptel.org/rpc_xml_rpc) does not explain its full functionality and is not enough for writing a plugin.
Thanks
--Srinivas
Hello,
We have a lots of error log like this, what fills syslog
ERROR:tm:t_forward_nonack: discarding fwd for a cancelled transaction
ERROR:tm:w_t_relay: t_forward_nonack failed
ERROR: t_check_status: cannot check status for a reply which has no
T-state established
Could you tell me how could i avoid this?
I think these are not errors. Shall i just change the debug level for
this logs?
Thanks any help,
Tamas
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Good afternoon,
I'm trying to use the radius_does_uri_exist() function to check if the
user exist before forwarding it to voicemail when it's not enable.
I'm using radius AAA and the radius_does_uri_exist() seems to fail..
Any idea how to solve it?
Thanks
# -- uri_radius paramaters --
modparam("uri_radius", "radius_config",
"/etc/radiusclient-ng/radiusclient.conf")
modparam("uri_radius", "service_type", 11) # Radius service type
used in radius_does_uri_exist check.
.......
if (!lookup("location")) {
if (radius_does_uri_exist()) {
# Will Redirect to voicemail when fixed
sl_send_reply("480", "Temporarily
Unaivailable - Will Redirect To Voicemail");
exit;
};
xlog("L_DBG", "ACC RADIUS: 404 NOT FOUND FOR
$si \r\n");
sl_send_reply("404", "Not Found");
exit;
.....
When I'm trying to call aeron which is not connected but exists, I
have a 404 not found whereas I should have a 480...
root@krusty:[~L/freeradius]# tail -f radius.log
Mon Jan 14 16:08:18 2008 : Auth: Login incorrect:
[aeron(a)sip.bob.net/<no User-Password attribute>] (from client private
port 0)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHi311N4+o+2LtdFwRAgGNAKC4xB0R5mHjgZ0zNKCaEEcqCgCUaQCdG+p0
4KoP/SuAUHJ8u6GFnaOTLYw=
=OXcY
-----END PGP SIGNATURE-----
Hi OpenXCAP experts,
I am trying to setup a demo-configuration for XCAP with Eyebeam- and
Bria-client. OpenXCAP and OpenSER are running. When I start-up the
Bria-client (data storage via XCAP enabled) I get the following errors from
OpenXCAP - log (e.g. for resource-list):
Jan 2 13:15:38 sip openxcap[10367]: [HTTPChannel,2,192.168.0.2] error:
Invalid Document Selector xcap-root/resource-lists/users//resource-list.xml
(the Document Selector context must be 'users' or 'global':
'resource-lists')
Jan 2 13:15:38 sip openxcap[10367]: [-] error: Invalid Document Selector
xcap-root/resource-lists/users//resource-list.xml (the Document Selector
context must be 'users' or 'global': 'resource-lists')
The HTTP dialog between the client and the XCAP server is the following:
GET /xcap-root/resource-lists/users//resource-list.xml HTTP/1.1
Host: xcap.net1.test:8000
Keep-Alive:
Connection: TE, Keep-Alive
TE: trailers
HTTP/1.1 404 Not Found
Date: Wed, 02 Jan 2008 12:15:38 GMT
Content-Length: 75
Server: OpenXCAP/0.9.7
the Document Selector context must be 'users' or 'global':
'resource-lists'
PUT /xcap-root/resource-lists/users//resource-list.xml HTTP/1.1
Host: xcap.net1.test:8000
Connection: TE
TE: trailers
Content-Type: application/resource-lists+xml
Content-Length: 323
<?xml version="1.0" encoding="UTF-8"?>
<resource-lists xmlns="urn:ietf:params:xml:ns:resource-lists"
xmlns:cp="counterpath:properties">
<list name="Contact List">
<cp:prop name="category" value="Friends" />
<cp:prop name="category#2" value="Home" />
<cp:prop name="category#3" value="Work" />
</list></resource-lists>
HTTP/1.1 404 Not Found
Date: Wed, 02 Jan 2008 12:15:38 GMT
Content-Length: 75
Server: OpenXCAP/0.9.7
the Document Selector context must be 'users' or 'global':
'resource-lists'
Any hint highly appreciated!
Franz