[asterisk-dev] [Code Review] Add 'description' field for SIP peers

Leif Madsen reviewboard at asterisk.org
Thu Apr 7 14:47:06 CDT 2011



> On 2011-04-07 01:38:18, Olle E Johansson wrote:
> > I think this is a great addition. A few comments:
> > 
> > - This should apply to ALL channels, not only SIP. I need descriptions also for PRI channels.
> > - You forgot to add it to the manager "sip show peer/Peers"
> > - People will quickly ask for "sip show peer described as sexy" CLI commands.
> >
> 
> lathama wrote:
>     This feature already exists in users.conf.  It may be good to keep the naming of "fullname = New User" unless I am missing something.  It does update the callerID.
>     
>     *CLI> sip show peer 1234
>     ...
>     Callerid     : "Andrew Latham" <1234>
>     ...
> 
> Leif Madsen wrote:
>     If fullname in users.conf updates the callerid, then I would say they aren't really the same thing. I like 'description' a lot more because it's a more general option name rather than 'fullname' which seems to imply a callerID type name.
> 
> lathama wrote:
>     I do agree with you. I just wanted to make sure that duplication did not happen.  Is this description field also parsed from the users.conf for DAHDI, SIP, IAX and H323?
> 
> Leif Madsen wrote:
>     I'm not exactly sure how users.conf fits in with all of this, but I didn't specifically add any code for users.conf.
> 
> lathama wrote:
>     Looks like it should work fine with users.conf  I am applying and testing.  If so you may want to add the note there too.
> 
> lathama wrote:
>     :)  Works from users.conf too.  Maybe copy your sip.conf comments to users.conf.

OK great! If it works fine, let me know and I'll add some documentation to users.conf.sample.


- Leif


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1163/#review3297
-----------------------------------------------------------


On 2011-04-07 14:47:03, Leif Madsen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1163/
> -----------------------------------------------------------
> 
> (Updated 2011-04-07 14:47:03)
> 
> 
> Review request for Asterisk Developers and Olle E Johansson.
> 
> 
> Summary
> -------
> 
> Using some of the best practices names for SIP peers provides the quandary of knowing exactly what peer is where, or who it is assigned to.
> 
> If you name all your peers as the MAC address of the device, then it's difficult to determine what device is assigned to whom, or at least knowing where the device physically resides.
> 
> I've added a description field that can help. When you do 'sip show peers' then a new column called Description outputs 32 chars of a description to the Asterisk console.
> 
> 
> This addresses bug 19076.
>     https://issues.asterisk.org/view.php?id=19076
> 
> 
> Diffs
> -----
> 
>   trunk/CHANGES 312991 
>   trunk/channels/chan_dahdi.c 312991 
>   trunk/configs/chan_dahdi.conf.sample 312991 
>   trunk/configs/users.conf.sample 312991 
> 
> Diff: https://reviewboard.asterisk.org/r/1163/diff
> 
> 
> Testing
> -------
> 
> Added "description=My Awesome Peer" to [0004f2040001] definition in sip.conf, then did 'sip show peers' and 'sip show peer 0004f2040001'. Output was as expected. Compiled without error or warning.
> 
> 
> Thanks,
> 
> Leif
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110407/64016c47/attachment.htm>


More information about the asterisk-dev mailing list