[Home]

Summary:ASTERISK-03549: Accountcode setting in sip.conf not being stored in CDRs for certain SIP clients.
Reporter:eko1 (eko1)Labels:
Date Opened:2005-02-19 14:30:15.000-0600Date Closed:2011-06-07 14:10:37
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:I have this really funky SIP client with the corresponding entry in sip.conf:

[hondusoft-panayotti-quintum1]
type = friend
context = hondusoft-out
host = dynamic
canreinvite = no
accountcode = hondusoft-panayotti
language = es
qualify = yes

and this is what 'sip show peer' shows me:

 * Name       : hondusoft-panayotti-quintum1
 Secret       : <Not set>
 MD5Secret    : <Not set>
 Context      : hondusoft-out
 Language     : es
 FromUser     :
 FromDomain   :
 Callgroup    :  (0)
 Pickupgroup  :  (0)
 Mailbox      :
 LastMsgsSent : -1
 Dynamic      : Yes
 Expire       : 25988
 Expiry       : 900
 Insecure     : No
 Nat          : No
 ACL          : No
 CanReinvite  : No
 PromiscRedir : No
 DTMFmode     : rfc2833
 LastMsg      : 0
 ToHost       :
 Addr->IP     : 172.16.0.150 Port 5060
 Defaddr->IP  : 0.0.0.0 Port 5060
 Username     : 12345
 Codecs       : 0x104 (ulaw|g729)
 Codec Order  : (g729|ulaw)
 Status       : OK (60 ms)
 Useragent    : Quintum/1.0.0
 Full Contact : sip:12345@172.16.0.150

As you can see, the username is completely different from the name and I think this is causing some confusion when trying to figure out the accountcode of this device because a CDR from this device has the accountcode field empty.

****** ADDITIONAL INFORMATION ******

From looking at cdr.c, I see

strncpy(cdr->accountcode, chan->accountcode, sizeof(cdr->accountcode) - 1);

but since the channel is different from the name shown in 'sip show peer', the correct accountcode never gets set. Shouldn't the accountcode be determined by [hondusoft-panayotti-quintum1] and not by SIP/12345-xxxx?
Comments:By: Mark Spencer (markster) 2005-02-19 14:44:29.000-0600

Try using CVS head and make sure you don't have a friend named "12345"

By: Olle Johansson (oej) 2005-02-20 00:49:09.000-0600

Are you sure that the incoming call matches the peer?
If you have type=friend, it matches the *user* and not the *peer*, so "sip show peer" is of no relevance.

Please take support issues to the mailing list, I think you have a configuration issue and not a bug.

By: Olle Johansson (oej) 2005-02-20 00:51:13.000-0600

Configuration issue, not a bug. If it, after discussion on mailing list or the #irc, turns out to be a bug, we will reopen the bug report.

(Please read http://lists.digium.com/pipermail/asterisk-users/2005-February/090271.html )

Thank you.

/Olle