[OpenSIPStack] Writing Custom UA Using OpenSIPStack - Was Re: TCP and TLS Support
Brought to you by:
joegenbaclor
From: <jo...@op...> - 2008-10-24 04:18:13
|
Hi Marshall, I am creating a new thread for this. Since there is lack of documentation currently, I am providing you the next best thing. I coded a template user agent and demonstrated how to do outbound calls. Attached is the cxx file. I have compiled and tested this code to be working using the current opensipstack in CVS. HTH, Joegen > For outgoing calls, we need something like this: > > 1. Our app will setup an RTP ip/port to listen on (UDP). > > 2. Our app will give this RTP ip/port information (as well as any > other necessary info) to the opensipstack > to make a call (INVITE and such). > > 3. The SIP stack will negotiate with the destination SIP stack > (wherever that might be). The negotiation, > of course, will tell us what ip/port to send the RTP for outgoing > voice. We need a mechanism to receive > this info after the SIP portion of the call as been accepted by the > foreign site. > > 4. Now the SIP part is done (w/o using the opensipstack RTP > handling facilities) > > 5. Now it is the job of our code to send/receive RTP from the > foreign host, and walaa all it happy. > > 6. We also need to be able to send/receive the call terminations > (BYEs) and such. > > > > For incoming calls, we need something like this: > > 1. We setup the SIP stack to listen on 5060. > > 2. It receives incoming calls, (potentially gives this to our code > for approval). > Or maybe we just want to allow the SIP stack to handle everything SIP > relate > > 3. The SIP stack will need to know what RTP port we want to listen > on (maybe it should ask us) > > 4. Once a call is setup, again, it is our code that will be > sending/receiving RTP. > > > |