Add "username" to sip show peer (bug #2163) as well as a few config cleanups

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3531 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer 2004-07-28 21:07:38 +00:00
parent baef4818d2
commit deb02a000f
2 changed files with 23 additions and 21 deletions

View File

@ -5582,6 +5582,7 @@ static int sip_show_peer(int fd, int argc, char *argv[])
ast_cli(fd, " ToHost : %s\n", peer->tohost); ast_cli(fd, " ToHost : %s\n", peer->tohost);
ast_cli(fd, " Addr->IP : %s Port %d\n", peer->addr.sin_addr.s_addr ? ast_inet_ntoa(iabuf, sizeof(iabuf), peer->addr.sin_addr) : "(Unspecified)", ntohs(peer->addr.sin_port)); ast_cli(fd, " Addr->IP : %s Port %d\n", peer->addr.sin_addr.s_addr ? ast_inet_ntoa(iabuf, sizeof(iabuf), peer->addr.sin_addr) : "(Unspecified)", ntohs(peer->addr.sin_port));
ast_cli(fd, " Defaddr->IP : %s Port %d\n", ast_inet_ntoa(iabuf, sizeof(iabuf), peer->defaddr.sin_addr), ntohs(peer->defaddr.sin_port)); ast_cli(fd, " Defaddr->IP : %s Port %d\n", ast_inet_ntoa(iabuf, sizeof(iabuf), peer->defaddr.sin_addr), ntohs(peer->defaddr.sin_port));
ast_cli(fd, " Username : %s\n", peer->username);
ast_cli(fd, " Codecs : "); ast_cli(fd, " Codecs : ");
/* This should really be a function in frame.c */ /* This should really be a function in frame.c */
if (peer->capability & AST_FORMAT_G723_1) if (peer->capability & AST_FORMAT_G723_1)

View File

@ -22,7 +22,8 @@
[general] [general]
context=default ; Default context for incoming calls context=default ; Default context for incoming calls
;recordhistory=yes ; Record SIP history by default (see sip history / sip no history) ;recordhistory=yes ; Record SIP history by default
; (see sip history / sip no history)
;realm=mydomain.tld ; Realm for digest authentication ;realm=mydomain.tld ; Realm for digest authentication
; defaults to "asterisk" ; defaults to "asterisk"
; Realms MUST be globally unique according to RFC 3261 ; Realms MUST be globally unique according to RFC 3261
@ -38,12 +39,12 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls
;pedantic=yes ; Enable slow, pedantic checking for Pingtel ;pedantic=yes ; Enable slow, pedantic checking for Pingtel
; and multiline formatted headers for strict ; and multiline formatted headers for strict
; SIP compatibility ; SIP compatibility (defaults to "no")
;tos=184 ; Set IP QoS to either a keyword or numeric val ;tos=184 ; Set IP QoS to either a keyword or numeric val
;tos=lowdelay ; lowdelay,throughput,reliability,mincost,none ;tos=lowdelay ; lowdelay,throughput,reliability,mincost,none
;maxexpirey=3600 ; Max length of incoming registration we allow ;maxexpirey=3600 ; Max length of incoming registration we allow
;defaultexpirey=120 ; Default length of incoming/outoing registration ;defaultexpirey=120 ; Default length of incoming/outoing registration
;notifymimetype=text/plain ; Allow overriding of mime type in NOTIFY ;notifymimetype=text/plain ; Allow overriding of mime type in MWI NOTIFY
;videosupport=yes ; Turn on support for SIP video ;videosupport=yes ; Turn on support for SIP video
;disallow=all ; First disallow all codecs ;disallow=all ; First disallow all codecs
@ -135,7 +136,6 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls
; accountcode ; accountcode
; amaflags ; amaflags
; incominglimit ; incominglimit
; outgoinglimit
; restrictcid ; restrictcid
; mailbox ; mailbox
; username ; username
@ -158,22 +158,21 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls
;[sip_proxy-out] ;[sip_proxy-out]
;type=peer ; we only want to call out, not be called ;type=peer ; we only want to call out, not be called
;secret=guessit ;secret=guessit
;username=yourusername ;username=yourusername ; Authentication user for outbound proxies
;fromuser=yourusername ; Many SIP providers require this! ;fromuser=yourusername ; Many SIP providers require this!
;host=box.provider.com ;host=box.provider.com
;[grandstream1] ;[grandstream1]
;type=friend ; either "friend" (peer+user), "peer" or "user" ;type=friend ; either "friend" (peer+user), "peer" or "user"
;context=from-sip ;context=from-sip
;username=grandstream1 ; usually matches the [section] title
;fromuser=grandstream1 ; overrides the callerid, e.g. required by FWD ;fromuser=grandstream1 ; overrides the callerid, e.g. required by FWD
;callerid=John Doe <1234> ;callerid=John Doe <1234>
;host=192.168.0.23 ; we have a static but private IP address ;host=192.168.0.23 ; we have a static but private IP address
;nat=no ; there is not NAT between phone and Asterisk ;nat=no ; there is not NAT between phone and Asterisk
;canreinvite=yes ; allow RTP voice traffic to bypass Asterisk ;canreinvite=yes ; allow RTP voice traffic to bypass Asterisk
;dtmfmode=info ; either RFC2833 or INFO for the BudgeTone ;dtmfmode=info ; either RFC2833 or INFO for the BudgeTone
;outgoinglimit=1 ; disable callwaiting signal (2nd call to phone)
;incominglimit=1 ; permit only 1 outgoing call at a time ;incominglimit=1 ; permit only 1 outgoing call at a time
; from the phone to asterisk
;mailbox=1234@default ; mailbox 1234 in voicemail context "default" ;mailbox=1234@default ; mailbox 1234 in voicemail context "default"
;disallow=all ; need to disallow=all before we can use allow= ;disallow=all ; need to disallow=all before we can use allow=
;allow=ulaw ; Note: In user sections the order of codecs ;allow=ulaw ; Note: In user sections the order of codecs
@ -202,9 +201,11 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls
;type=friend ; Friends place calls and receive calls ;type=friend ; Friends place calls and receive calls
;context=from-sip ; Context for incoming calls from this user ;context=from-sip ; Context for incoming calls from this user
;secret=blah ;secret=blah
;language=de ; Use German prompts for this user
;host=dynamic ; This peer register with us ;host=dynamic ; This peer register with us
;dtmfmode=inband ; Choices are inband, rfc2833, or info ;dtmfmode=inband ; Choices are inband, rfc2833, or info
;defaultip=192.168.0.59 ; IP used until peer registers ;defaultip=192.168.0.59 ; IP used until peer registers
;username=snom ; Username to use in INVITE until peer registers
;mailbox=1234,2345 ; Mailboxes for message waiting indicator ;mailbox=1234,2345 ; Mailboxes for message waiting indicator
;restrictcid=yes ; To have the callerid restriced -> sent as ANI ;restrictcid=yes ; To have the callerid restriced -> sent as ANI
;disallow=all ;disallow=all