Hi Günther,
Indeed, accounting the transferred calls may be trick. A short idea that might help you: - spy the REFER request and add to the "Refer-to" header's URI a parameter containing the billing user (usually is FROM URI of the REFER) - use avpops to do this -> avp_write() to get the from URI into an AVP and subst() to added the AVP as a Refer-to URI parameter (for example named "billing". - look for INVITEs which have in RURI, URI with the "billing" parameter; if so, move its value to the X-Account header; For this you need the new avp_subst() function (only in OpenSER 0.10.x)-> the idea will be like this: move RURI in an AVP (avp_write), extract from the avp only the param (avp_subst) and push the avp as header (avp_pushto).
not sure if it's correct....just a thought.
regards, bodgan
Günther Starnberger wrote:
Hello,
I'm currently working on a VOIP network where the phones register to an OpenSER server - we also have a PSTN Gateway (Asterisk).
To be able to account the PSTN calls of a user we insert a custom header "X-Account" which stores information about the user account. We can't just use the From-Header for this as we allow users to e.g. create unconditional forwards which forward the call to a defined SIP uri when the user isn't available. If somebody creates a forward to the PSTN it is still his account which should be accounted and which is therefor put in the X-Account header.
This part works fine, but I'm still not sure how to handle call transfers - e.g. when a user wants to transfer his conversational partner to the PSTN. An unattended transfer in SIP is implemented with a REFER request which causes the remote phone to send an INVITE to the SIP uri in question[1]. I'm not sure how to account these transfers. On a traditional PSTN network the person who caused the transfer would be the one who is paying for the call. But I see no solution how to implement this behaviour in SIP (because the old call isn't transfered, but the conversational partner starts a new call with the INVITE request).
Is it somehow possible to detect if a call was caused by a transfer so that I can insert the right X-Account header? Do I need a B2BUA like Asterisk to implement the traditional behaviour? How do other VOIP providers solve this problem (IMO call transfers shouldn't be such an uncommon feature).
tia for all suggestions on how to solve this problem /gst
[1] http://www.ietf.org/internet-drafts/draft-ietf-sipping-service-examples-08.t...
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
"