开发者

How to implement SIP packages in C#

开发者 https://www.devze.com 2022-12-11 08:10 出处:网络
INVITE sip:john@domain.com SIP/2.0 From: <sip:doe@domain.com>;tag=2084442460 To:Via: SIP/2.0/UDP domain.com:5060;branch=z9hG4bK2df7b9194cd51e25

INVITE sip:john@domain.com SIP/2.0

From:

<sip:doe@domain.com>;tag=2084442460

To: Via:

SIP/2.0/UDP

domain.com:5060;branch=z9hG4bK2df7b9194cd51e25

Call-ID: john@domain.com-4524j CSeq: 1

INVITE Contact:

<sip:doe@domain.com:5060>

Content-Length: 226 Content-Type:

application/sdp

I found this on the net. It seems to have those things that a packet has to have. How do I write a program in C# to send this packet?

开发者_JAVA技巧I have to build a program that can do a call setup.


A couple of years ago I worked with the JAIN-SIP library in Java- I spent quite alot of time looking for a .Net equivalent but it seems SIP as a protocol is too old to be of any interest to .Net developers. I guess what im saying is, do you absolutely have to create this in C#?

If so, this document will help you - http://www.ietf.org/rfc/rfc3261.txt.

The packet you described above was the "INVITE" message- the first in a chain of messages. You invite a user, who will return with "OK" if they accept the invitation. After receiving this, send an ACK packet and then the two clients will be setup to comunicate. See the RFC for more information on the structure of these packets- what headers must be present, etc.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号