Asterisk-sip: Difference between revisions
Jump to navigation
Jump to search
(Created page with "== Overview == Asterisk sip 명령어. == sip show peers == Asterisk 등록되어 있는 모든 sip account 를 표시한다. 전체 목록이 표시되지만, 각각의 정...") |
|||
(20 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Overview == | == Overview == | ||
Asterisk sip 명령어. | Asterisk sip 명령어 내용 정리. | ||
== sip show peers == | == help == | ||
<pre> | |||
pluto*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|subscriptions} -- 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 | |||
</pre> | |||
== show peers == | |||
Asterisk 등록되어 있는 모든 sip account 를 표시한다. 전체 목록이 표시되지만, 각각의 정보는 중요한 부분들만 표시된다. | Asterisk 등록되어 있는 모든 sip account 를 표시한다. 전체 목록이 표시되지만, 각각의 정보는 중요한 부분들만 표시된다. | ||
<pre> | |||
pluto*CLI> help sip show peers | |||
Usage: sip show peers [like <pattern>] | |||
Lists all known SIP peers. | |||
Optional regular expression pattern is used to filter the peer list. | |||
</pre> | |||
결과에는 다음의 항목들이 표시된다. | |||
<pre> | <pre> | ||
Name/username Host Dyn Forcerport Comedia ACL Port Status Description | |||
Name/username | |||
</pre> | </pre> | ||
* Name/username : | |||
* Host : | |||
* Dyn : | |||
* Forcerport : | |||
* Comedia : | |||
* ACL : | |||
* Port : | |||
* Status : | |||
* Description : | |||
== sip show peer == | === Example === | ||
<pre> | |||
pluto*CLI> sip show peers | |||
Name/username Host Dyn Forcerport Comedia ACL Port Status Description | |||
200 (Unspecified) D Auto (No) No 0 Unmonitored | |||
201 (Unspecified) D Auto (No) No 0 Unmonitored | |||
</pre> | |||
== show peer == | |||
특정 sip account 에 대한 정보를 표시한다. | 특정 sip account 에 대한 정보를 표시한다. | ||
Line 84: | Line 133: | ||
Encryption : No | Encryption : No | ||
</pre> | </pre> | ||
== show registry == | |||
현재 등록되어 있는 모든 registry 정보를 보여준다. | |||
<pre> | |||
pluto*CLI> help sip show registry | |||
Usage: sip show registry | |||
Lists all registration requests and status. | |||
</pre> | |||
=== Example === | |||
<pre> | |||
pluto*CLI> sip show registry | |||
Host dnsmgr Username Refresh State Reg.Time | |||
mysipprovider.com:5060 N 3456@mydomai 120 Request Sent | |||
1 SIP registrations. | |||
</pre> | |||
== show channels == | |||
현재 sip 프로토콜로 활성화 된 전체 채널 정보를 보여준다. | |||
<pre> | |||
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 | |||
</pre> | |||
== show channel == | |||
현재 활성화된 sip 프로토콜 채널의 상세 정보를 표시한다. 파라미터로 call id 를 입력한다. channel id 와 같은 정보들을 확인할 수 있다. | |||
<pre> | |||
pluto*CLI> help sip show channel | |||
Usage: sip show channel <call-id> | |||
Provides detailed status on a given SIP dialog (identified by SIP call-id). | |||
</pre> | |||
=== Example === | |||
<pre> | |||
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 | |||
</pre> | |||
== show users == | |||
설정된 사용자 정보를 나타낸다. | |||
<pre> | |||
pluto*CLI> help sip show users | |||
Usage: sip show users [like <pattern>] | |||
Lists all known SIP users. | |||
Optional regular expression pattern is used to filter the user list. | |||
</pre> | |||
=== Example === | |||
<pre> | |||
pluto*CLI> sip show users | |||
Username Secret Accountcode Def.Context ACL Forcerport | |||
202 761d449d-e66e-4 public No No | |||
201 fadfceef-8b42-4 public No No | |||
200 52364ed4-ca91-4 public No No | |||
... | |||
</pre> | |||
== show user == | |||
입력한 사용자의 상세 정보를 표시한다. load 옵션과 함께 사용시, 실시간 정보를 나타낸다. | |||
<pre> | |||
pluto*CLI> help sip show user | |||
Usage: sip show user <name> [load] | |||
Shows all details on one SIP user and the current status. | |||
Option "load" forces lookup of peer in realtime storage. | |||
</pre> | |||
=== Example === | |||
<pre> | |||
pluto*CLI> sip show user 200 load | |||
* Name : 200 | |||
Secret : <Set> | |||
MD5Secret : <Not set> | |||
Context : public | |||
Language : | |||
AMA flags : Unknown | |||
Tonezone : <Not set> | |||
Transfer mode: open | |||
MaxCallBR : 384 kbps | |||
CallingPres : Presentation Allowed, Not Screened | |||
Call limit : 2147483647 | |||
Callgroup : | |||
Pickupgroup : | |||
Named Callgr : | |||
Nam. Pickupgr: | |||
Callerid : "" <> | |||
ACL : No | |||
Sess-Timers : Accept | |||
Sess-Refresh : uas | |||
Sess-Expires : 1800 secs | |||
Sess-Min-SE : 90 secs | |||
RTP Engine : asterisk | |||
Auto-Framing: No | |||
</pre> | |||
== set debug == | |||
SIP 패킷 메시지를 표시를 on/off 한다. | |||
<pre> | |||
pluto*CLI> help sip set debug | |||
sip set debug {on|off|ip|peer} -- Enable/Disable SIP debugging | |||
</pre> | |||
=== Example === | |||
<pre> | |||
vpbx120*CLI> sip set debug on | |||
SIP Debugging enabled | |||
[2016-10-10 15:42:29.877] Reliably Transmitting (NAT) to 127.0.0.1:5060: | |||
OPTIONS sip:127.0.0.1 SIP/2.0 | |||
Via: SIP/2.0/UDP example.com:5060;branch=z9hG4bK0404bd94;rport | |||
Max-Forwards: 70 | |||
From: <sip:asterisk@example.com>;tag=as319e6958 | |||
To: <sip:127.0.0.1> | |||
Contact: <sip:asterisk@example.com:5060> | |||
Call-ID: 65050a601b9b03694c2221cf2915847f@example.com:5060 | |||
CSeq: 102 OPTIONS | |||
User-Agent: example.com vPBX | |||
Date: Mon, 10 Oct 2016 13:42:29 GMT | |||
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH | |||
Supported: replaces | |||
Content-Length: 0 | |||
... | |||
</pre> | |||
== set history == | |||
SIP call history Enable on/off. | |||
<pre> | |||
pluto*CLI> help sip set history | |||
sip set history {on|off} -- Enable/Disable SIP history | |||
</pre> | |||
=== Example === | |||
<pre> | |||
pluto*CLI> sip set history on | |||
SIP History Recording Enabled (use 'sip show history') | |||
pluto*CLI> sip set history off | |||
SIP History Recording Disabled | |||
</pre> | |||
== unregister == | |||
강제적으로 sip peer 를 unregister 한다. unregister 된 peers 콜을 받지 못한다. | |||
<pre> | |||
pluto*CLI> help sip unregister | |||
Usage: sip unregister <peer> | |||
Unregister (force expiration) a SIP peer from the registry | |||
</pre> | |||
=== Example === | |||
<pre> | |||
pluto*CLI> sip unregister 600-pluto-softphonetest-1 | |||
Unregistered peer '600-pluto-softphonetest-1' | |||
</pre> | |||
[[category:asterisk]] |
Latest revision as of 09:11, 14 March 2017
Overview
Asterisk sip 명령어 내용 정리.
help
pluto*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|subscriptions} -- 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
show peers
Asterisk 등록되어 있는 모든 sip account 를 표시한다. 전체 목록이 표시되지만, 각각의 정보는 중요한 부분들만 표시된다.
pluto*CLI> help sip show peers Usage: sip show peers [like <pattern>] Lists all known SIP peers. Optional regular expression pattern is used to filter the peer list.
결과에는 다음의 항목들이 표시된다.
Name/username Host Dyn Forcerport Comedia ACL Port Status Description
- Name/username :
- Host :
- Dyn :
- Forcerport :
- Comedia :
- ACL :
- Port :
- Status :
- Description :
Example
pluto*CLI> sip show peers Name/username Host Dyn Forcerport Comedia ACL Port Status Description 200 (Unspecified) D Auto (No) No 0 Unmonitored 201 (Unspecified) D Auto (No) No 0 Unmonitored
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
show registry
현재 등록되어 있는 모든 registry 정보를 보여준다.
pluto*CLI> help sip show registry Usage: sip show registry Lists all registration requests and status.
Example
pluto*CLI> sip show registry Host dnsmgr Username Refresh State Reg.Time mysipprovider.com:5060 N 3456@mydomai 120 Request Sent 1 SIP registrations.
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
show channel
현재 활성화된 sip 프로토콜 채널의 상세 정보를 표시한다. 파라미터로 call id 를 입력한다. channel id 와 같은 정보들을 확인할 수 있다.
pluto*CLI> help sip show channel Usage: sip show channel <call-id> Provides detailed status on a given SIP dialog (identified by SIP call-id).
Example
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
show users
설정된 사용자 정보를 나타낸다.
pluto*CLI> help sip show users Usage: sip show users [like <pattern>] Lists all known SIP users. Optional regular expression pattern is used to filter the user list.
Example
pluto*CLI> sip show users Username Secret Accountcode Def.Context ACL Forcerport 202 761d449d-e66e-4 public No No 201 fadfceef-8b42-4 public No No 200 52364ed4-ca91-4 public No No ...
show user
입력한 사용자의 상세 정보를 표시한다. load 옵션과 함께 사용시, 실시간 정보를 나타낸다.
pluto*CLI> help sip show user Usage: sip show user <name> [load] Shows all details on one SIP user and the current status. Option "load" forces lookup of peer in realtime storage.
Example
pluto*CLI> sip show user 200 load * Name : 200 Secret : <Set> MD5Secret : <Not set> Context : public Language : AMA flags : Unknown Tonezone : <Not set> Transfer mode: open MaxCallBR : 384 kbps CallingPres : Presentation Allowed, Not Screened Call limit : 2147483647 Callgroup : Pickupgroup : Named Callgr : Nam. Pickupgr: Callerid : "" <> ACL : No Sess-Timers : Accept Sess-Refresh : uas Sess-Expires : 1800 secs Sess-Min-SE : 90 secs RTP Engine : asterisk Auto-Framing: No
set debug
SIP 패킷 메시지를 표시를 on/off 한다.
pluto*CLI> help sip set debug sip set debug {on|off|ip|peer} -- Enable/Disable SIP debugging
Example
vpbx120*CLI> sip set debug on SIP Debugging enabled [2016-10-10 15:42:29.877] Reliably Transmitting (NAT) to 127.0.0.1:5060: OPTIONS sip:127.0.0.1 SIP/2.0 Via: SIP/2.0/UDP example.com:5060;branch=z9hG4bK0404bd94;rport Max-Forwards: 70 From: <sip:asterisk@example.com>;tag=as319e6958 To: <sip:127.0.0.1> Contact: <sip:asterisk@example.com:5060> Call-ID: 65050a601b9b03694c2221cf2915847f@example.com:5060 CSeq: 102 OPTIONS User-Agent: example.com vPBX Date: Mon, 10 Oct 2016 13:42:29 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH Supported: replaces Content-Length: 0 ...
set history
SIP call history Enable on/off.
pluto*CLI> help sip set history sip set history {on|off} -- Enable/Disable SIP history
Example
pluto*CLI> sip set history on SIP History Recording Enabled (use 'sip show history') pluto*CLI> sip set history off SIP History Recording Disabled
unregister
강제적으로 sip peer 를 unregister 한다. unregister 된 peers 콜을 받지 못한다.
pluto*CLI> help sip unregister Usage: sip unregister <peer> Unregister (force expiration) a SIP peer from the registry
Example
pluto*CLI> sip unregister 600-pluto-softphonetest-1 Unregistered peer '600-pluto-softphonetest-1'