[Spce-user] Diversion headers in SIPWISE 2.6 // Call forwarding
Joel Smith | VOZELIA
joel at vozelia.com
Tue Feb 12 10:43:20 EST 2013
Hi Jon,
To start with, we'll try just touching kamailio.cfg in custom templates...
Would this modified "ROUTE_ACC_CALLER" route be valid?
Code:
route[ROUTE_ACC_CALLER]
{
if($avp(s:caller_ext_subscriber_id) == $null)
$avp(s:caller_ext_subscriber_id) = '';
if($avp(s:caller_ext_contract_id) == $null)
$avp(s:caller_ext_contract_id) = '';
if($avp(s:caller_peer_auth_user) != $null)
$(avp(s:acc_caller_pau)[*]) = $avp(s:caller_peer_auth_user);
else
$(avp(s:acc_caller_pau)[*]) = '';
if($avp(s:caller_peer_auth_realm) != $null)
$(avp(s:acc_caller_par)[*]) =
$avp(s:caller_peer_auth_realm);
else
$(avp(s:acc_caller_par)[*]) = '';
if(is_present_hf("P-Charge-Info")) {
$avp(s:acc_caller_user) = $(hdr(P-Charge-Info){uri.user});
xlog("L_INFO","Found P-Charge-Info header, setting
source-user to: '$avp(s:acc_caller_user)' - R=$ru ID=$ci\n");
}
xlog("L_INFO", "Setting acc source-leg for uuid
'$avp(s:caller_uuid)':
'$avp(s:caller_uuid)|$avp(s:acc_caller_user)|$avp(s:acc_caller_domain)|$avp(s:caller_cli_userprov)|$avp(s:caller_ext_subscriber
_id)|$avp(s:caller_ext_contract_id)|$avp(s:caller_account_id)|$avp(s:acc_caller_pau)|$avp(s:acc_caller_par)|$avp(s:caller_clir)|$avp(s:acc_state)|$TV(Sn)'
- R=$ru ID=$ci\n");
$avp(i:901) = $avp(s:caller_uuid) + "|" + $avp(s:acc_caller_user)
+ "|" + $avp(s:acc_caller_domain) + "|" + $avp(s:caller_cli_userprov) + "|"
+ $avp(s:caller_ext_subscriber_id) + "|" + $avp(s:calle
r_ext_contract_id) + "|" + $avp(s:caller_account_id) + "|" +
$avp(s:acc_caller_pau) + "|" + $avp(s:acc_caller_par) + "|" +
$avp(s:caller_clir) + "|" + $avp(s:acc_state) + "|" + $TV(Sn);
}
Thanks for your help :)
Best regards.
--
Joel Smith
Cell: +34 639 03 13 53
E-Mail: joel at vozelia.com
<joel at vozelia.com>
<http://www.vozelia.com> <http://twitter.com/vozelia>
<http://www.facebook.com/pages/Vozelia-Operador-de-telefonia-IP-para-empresas/165574849908?v=info>
On Tue, Feb 12, 2013 at 1:10 PM, Jon Bonilla <jbonilla at sipwise.com> wrote:
> El Mon, 11 Feb 2013 11:33:08 +0100
> "Joel Smith | VOZELIA" <joel at vozelia.com> escribió:
>
>
> >
> > On our case, it is PSTN and the call comes in to SPCE with an
> > additional header like:
> >
> > P-Charge-Info: <sip:602225522 at 192.168.80.23>;npi=UNKNOWN;noa=3
> >
> > What I need to do, is something like:
> >
> > if "header P-Charge-Info" exists, then SRC in CDR = "the src from the
> > P-Charge-Info header".
>
> This is quite easy. You can check the presence of that header
> and do the change in ROUTE_ACC_CALLER for example.
>
>
>
>
> >
> > Or, add a new field in the exported CDRs (touching as you said,
> > cdr-exporter, mediator and kamailio-proxy) with this info
> >
>
> This is more complicated. Yes, you can add a new field in kamailio-config
> and
> later on change mediator and rate-o-mat and cdrexporter to match the new
> format. This would be a better solution for external rating engines but
> more
> difficult for you to mantain during upgrades.
>
>
> > What solution do you recommend we use to focus on it? I think I prefer
> > adding a new field in CDR (for later auditing purposes), but I'm not
> > sure how complicated that can be.
> >
>
> Not that complicated.
>
> We might include a new "userfield" into the cdrs for next version allowing
> people to add to the cdrs all the information they need without changing
> mediator, rateomat and cdrexport.
>
>
> _______________________________________________
> Spce-user mailing list
> Spce-user at lists.sipwise.com
> http://lists.sipwise.com/listinfo/spce-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20130212/881ba8a1/attachment-0001.html>
More information about the Spce-user
mailing list