ผลต่างระหว่างรุ่นของ "Session Initiation Protocol"

เนื้อหาที่ลบ เนื้อหาที่เพิ่ม
Suriyun (คุย | ส่วนร่วม)
ไม่มีความย่อการแก้ไข
Suriyun (คุย | ส่วนร่วม)
ไม่มีความย่อการแก้ไข
บรรทัด 87:
John วางหู |--------------------------------------------------------> |
| |
 
 
== ตัวอย่าง SIP Request ==
 
NVITE sip:junk@realm SIP/2.0
Route: <sip:192.168.0.79;lr>
Via: SIP/2.0/UDP 192.168.0.200:5060;branch=z9hG4bKrfpISNp7Z6jqn
From: sip:original@192.168.0.79;tag=aEJISW8Nwm
To: sip:junk@realm
Supported: 100rel,sec-agree
Contact: sip:original@192.168.0.200
CSeq: 5714 INVITE
Call-ID: 34VISPImLSPTBk0OgCZ3lgbCyjup48
s: subject
Max-Forwards: 70
Content-Type: application/sdp
Content-Length: 157
v=0
o=original 3326093141 3326093142 IN IP4 192.168.0.200
s=SipSession
c=IN IP4 192.168.0.200
t=0 0
m=application 49152 TCP Chipflip
a=direction:both
 
 
== ตัวอย่างภาษา Perl ==
 
use Net::SIP;
 
# create new agent
my $ua = Net::SIP::Simple->new(
outgoing_proxy => '192.168.0.10',
registrar => '192.168.0.10',
domain => 'example.com',
from => 'me',
auth => [ 'me','secret' ],
);
 
# Register agent
$ua->register;
 
# Invite other party, send anncouncement once connected
$ua->invite( 'you',
init_media => $ua->rtp( 'send_recv', 'announcement.pcmu-8000' ),
asymetric_rtp => 1,
);
 
# Mainloop
$ua->loop;