On Jan 24, 2014, at 3:03 AM, Eeri Kask <Eeri.Kask at mailbox.tu-dresden.de> wrote: > On Thu, 23 Jan 2014 09:45:30 -0500, Daniel Ellison wrote: >> On Jan 23, 2014, at 9:02 AM, Dennis Guse <dennis.guse at alumni.tu-berlin.de> wrote: >>> >>> Just two question: >>> 1. for how many people are going to deploy this? >>> 2. how does the API to the CNS look like? (Any restrictions? is it reliable and responsive enough for VoIP calls [limited time to setup]?) >> >> 1. At first this would only be for me. So one person. :) Eventually, after it's matured a bit, I would release it for people to use on their own servers. > > > Why would you want to relay/proxy outgoing connections too? This has probably more to do with my inexperience with the SIP protocol than anything else. But I want the fact that the UAC is registered with the UAS to be a flag that I don't have to send a third-party notification. If there's a better way I'm certainly open to suggestions. > Maybe it would be worth to take a look at > "pjsip-apps/src/samples/sipstateless.c" in pjsip distribution, esp. > "static pj_bool_t on_rx_request()" there. I'll definitely take a look! Thanks for the ptr. > Though it looks like this small utility currently doesn't work (doesn't > do what its supposed to do (tcpip connections don't get through to the > rx_request callback), if I understand it correctly) if started like > > sipstateless 302 -H 'Expires: 300' -H 'Contact: <sip:192.168.1.1>' > > but the intention is clear: to utilise a minimalistic redirect-server > for personal use (i.e. not something supposed to accomplish like 500000 > requests per second) to be run publicly accessibly in order to make you > available for incoming calls. That's exactly what I'm going for! Very cool. > > Currently "sipstateless" would ask the caller to redirect *any* methods > to you (192.168.1.1), but tweaking rx_request above to respond only to > PJSIP_INVITE_METHOD (and PJSIP_SC_NOT_IMPLEMENTED to anything else, or > if a particular INVITE is to be denied) should be straightforward. > > Someone knowledgeable in pjsip datastructures and internals could easily > turn this little tool into something very useful, like creating an > interface to some externally running "pseudo-registrar/authorisation" > utility (in order to ensure flexibility; e.g. by local file socket or > whatever), passing into this external utility the "From" and "To" fields > of the invite request, reading back a SIP status code with to be > appended headers and then executing "pjsip_endpt_respond_stateless()". > > Wouldn't such tool be great? :-) I think it might just qualify as great. I'm going to take a look at sipstateless.c and see what I can learn. Thanks for the information, Eeri! +Dan