Asterisk-sip

From 탱이의 잡동사니
Revision as of 13:51, 8 October 2015 by Pchero (talk | contribs)
Jump to navigation Jump to search

Overview

Asterisk sip 명령어.

sip help

sip help 명령어.

vpbx11*CLI> help sip
    sip notify Send a notify packet to a SIP peer
    sip prune realtime [peer|all] Prune cached Realtime users/peers
    sip qualify peer Send an OPTIONS packet to a peer
    sip reload Reload SIP configuration
    sip set debug {on|off|ip|peer} Enable/Disable SIP debugging
    sip set history {on|off} Enable/Disable SIP history
    sip show {channels|subscriptio List active SIP channels or subscriptions
    sip show channelstats List statistics for active SIP channels
    sip show channel Show detailed SIP channel info
    sip show domains List our local SIP domains
    sip show history Show SIP dialog history
    sip show inuse List all inuse/limits
    sip show mwi Show MWI subscriptions
    sip show objects List all SIP object allocations
    sip show peers List defined SIP peers
    sip show peer Show details on specific SIP peer
    sip show registry List SIP registration status
    sip show sched Present a report on the status of the scheduler queue
    sip show settings Show SIP global settings
    sip show tcp List TCP Connections
    sip show users List defined SIP users
    sip show user Show details on specific SIP user
    sip unregister Unregister (force expiration) a SIP peer from the registry

sip show peers

Asterisk 등록되어 있는 모든 sip account 를 표시한다. 전체 목록이 표시되지만, 각각의 정보는 중요한 부분들만 표시된다.

vpbx11*CLI> sip show peers
Name/username              Host                                    Dyn Forcerport ACL Port     Status     
200-ipvstk-softphone-1     (Unspecified)                            D                 0        UNKNOWN    
201-ipvstk-softphone-2     (Unspecified)                            D                 0        UNKNOWN    

sip show peer

특정 sip account 에 대한 정보를 표시한다.

vpbx11*CLI> sip show peer 200-ipvstk-softphone-1


  * Name       : 200-ipvstk-softphone-1
  Secret       : <Set>
  MD5Secret    : <Not set>
  Remote Secret: <Not set>
  Context      : CallFromSipDevice
  Subscr.Cont. : Hints-user1
  Language     : da
  AMA flags    : Unknown
  Transfer mode: open
  CallingPres  : Presentation Allowed, Not Screened
  Callgroup    : 
  Pickupgroup  : 
  MOH Suggest  : 
  Mailbox      : user1
  VM Extension : +4550609999
  LastMsgsSent : 32767/65535
  Call limit   : 100
  Max forwards : 0
  Dynamic      : Yes
  Callerid     : "user 1" <200>
  MaxCallBR    : 384 kbps
  Expire       : -1
  Insecure     : invite
  Force rport  : No
  ACL          : No
  DirectMedACL : No
  T.38 support : Yes
  T.38 EC mode : FEC
  T.38 MaxDtgrm: 400
  DirectMedia  : Yes
  PromiscRedir : No
  User=Phone   : No
  Video Support: No
  Text Support : No
  Ign SDP ver  : No
  Trust RPID   : No
  Send RPID    : No
  Subscriptions: Yes
  Overlap dial : Yes
  DTMFmode     : rfc2833
  Timer T1     : 500
  Timer B      : 32000
  ToHost       : 
  Addr->IP     : (null)
  Defaddr->IP  : (null)
  Prim.Transp. : UDP
  Allowed.Trsp : UDP
  Def. Username: 
  SIP Options  : (none)
  Codecs       : 0xc (ulaw|alaw)
  Codec Order  : (alaw:20,ulaw:20)
  Auto-Framing :  No 
  Status       : UNKNOWN
  Useragent    : 
  Reg. Contact : 
  Qualify Freq : 60000 ms
  Sess-Timers  : Refuse
  Sess-Refresh : uas
  Sess-Expires : 1800 secs
  Min-Sess     : 90 secs
  RTP Engine   : asterisk
  Parkinglot   : 
  Use Reason   : Yes
  Encryption   : No

sip show channels

현재 sip 프로토콜로 활성화 된 전체 채널 정보를 보여준다.

vpbx11*CLI> sip show channels
Peer                User/ANR         Call ID          Format           Hold     Last Message    Expiry     Peer      
192.168.100.10      testnumber       1d36925b11f3c12  0x8 (alaw)       No       Init: INVITE               testnumber
192.168.100.11      200-ipvstk-soft  7d2f44c4593a30b  0x8 (alaw)       No       Tx: ACK                    200-ipvstk
2 active SIP dialogs

sip show channel

현재 활성화된 sip 프로토콜 채널의 상세 정보를 표시한다. 파라미터로 call id 를 입력한다. channel id 와 같은 정보들을 확인할 수 있다.

sip show channel <call_id>

vpbx11*CLI> sip show channel 1d36925b11f3c12

  * SIP Call
  Curr. trans. direction:  Outgoing
  Call-ID:                1d36925b11f3c12f776c4133176fdec8@192.168.100.10:5060
  Owner channel ID:       SIP/testnumber-00000479
  Our Codec Capability:   0xc (ulaw|alaw)
  Non-Codec Capability (DTMF):   1
  Their Codec Capability:   0x8 (alaw)
  Joint Codec Capability:   0x8 (alaw)
  Format:                 0x8 (alaw)
  T.38 support            No
  Video support           No
  MaxCallBR:              384 kbps
  Theoretical Address:    192.168.100.10:5060
  Received Address:       192.168.100.10:5060
  SIP Transfer mode:      open
  Force rport:            No
  Audio IP:               100.64.49.68 (local)
  Our Tag:                as56b27411
  Their Tag:              as3b71103e
  SIP User agent:         
  Username:               testnumber
  Peername:               testnumber
  Original uri:           sip:testnumber@192.168.100.10:5060
  Caller-ID:              testnumber
  Need Destroy:           No
  Last Message:           Tx: ACK
  Promiscuous Redir:      No
  Route:                  sip:testnumber@192.168.100.10:5060
  DTMF Mode:              rfc2833
  SIP Options:            (none)
  Session-Timer:          Inactive