X-ClientCode and useclientcode=yes for AOC

Discussion in 'General' started by mcsuelli, Feb 20, 2011.

  1. mcsuelli

    Joined:
    Feb 20, 2011
    Messages:
    2
    Likes Received:
    0
    Hej Folks!

    I am trying to get AOC-Information into the “userfield” of CDR-Records. I know my berofix – box is transmitting the information (traced it), I also know asterisk is receiving the X-ClientCode – Header (sip set debug on...), I enabled “useclientcode=yes” in sip.conf. BUT: I get nothing in the CDR's.

    My System: elastix 2.x current with freePBX 2.8 current. The berofix ISDN – Gateway is equipped with a custom firmware to transmit aoc-information in SIP – headers.

    Any idea about what I might be missing?

    Thanks for your support,
    Alexander
     
  2. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    You might want to look into/delete

    /etc/asterisk/extensions_override_freepbx.conf

    Elastix has ( IMHO ) decided to improperly use the userfield for it's own purposes.
     
  3. mcsuelli

    Joined:
    Feb 20, 2011
    Messages:
    2
    Likes Received:
    0
    Hej dicko!

    Thanks for your help! Commenting out the lines actually brought me exactly ONE record in the CDR. The Information is still running into asterisk, but for some reason, again, it does not get into the CDR.

    I did a cat * | grep userfield in /etc/asterisk and found no appearances of a Set(CDR(userfield)=xxx other than in your already mentioned file (and a backup).

    I have done several reloads, checked sip_general_additional.conf for useclientcode=yes (it's there) … nothing.

    Maybe there is something with ResetCDR() involved?!

    Any further ideas where I could have a look at?

    Alexander
     
  4. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    Forgive me if I mis-understand you, but it is up to YOU to populate the userfield with anything you care to, hence it's name, if you want it to contain something from the sip headers on an incoming call, you will need a custom context for incoming calls to extract and insert that datum into that field, because otherwise "how will it know" what you want it to be?. From the source:-

    useclientcode = yes|no : If yes, then the Call Originator as stated in the CDR will be changed to whatever is specified in a X-ClientCode SIP Header. Default no. (New in v1.2.x)

    no mention here of the userfield or accountcode fields:)

    The caveat as stated is that it has been preempted by PaloSanto in all current Elastix Distributions. (which really p***ed me off ;) its called userfield not distributorfield, oh well. . .)
     

Share This Page