diff options
-rw-r--r-- | main.c | 31 | ||||
-rw-r--r-- | readme.md | 25 | ||||
-rw-r--r-- | sip.c | 18 |
3 files changed, 63 insertions, 11 deletions
@@ -7,6 +7,27 @@ int debug; +//Channel *ingress; +//Channel *egress; +// +// +//void +//threadnetrecv(void *arg) +//{ +// +//} +// +//void +//threadnetppu(void *) +//{ +// +//} +// +//void +//threadnetsend(void *arg) +//{ +// +//} void usage(void) @@ -40,10 +61,16 @@ threadmain(int argc, char *argv[]) fd = dial(addr, nil, nil, nil); if(fd < 0) sysfatal("couldn't establish the connection"); - - if(debug) + else if(debug) fprint(2, "connection established\n"); +// ingress = chancreate(sizeof(Sipmsg*), 8); +// egress = chancreate(sizeof(Sipmsg*), 8); +// threadcreate(threadnetrecv, &fd, mainstacksize); +// threadcreate(threadnetppu, nil, mainstacksize); +// threadcreate(threadnetsend, &fd, mainstacksize); +// yield(); + sip = mksip(fd); if(sip == nil) sysfatal("mksip: %r"); @@ -0,0 +1,25 @@ +# Catphone + +A VoIP softphone operated by a cat. + +## Roadmap + +- [ ] SIP + - [x] REGISTER + - [x] MD5 + - [ ] SHA-2 + - [ ] INVITE +- [ ] SDP +- [ ] RTP/RTCP +- [ ] Codecs + - [ ] G.711 + - [ ] PCMU (ยต-law) + - [ ] PCMA (a-law) + +## References + +- rfc3261 - SIP: Session Initiation Protocol +- rfc8760 - The Session Initiation Protocol (SIP) Digest Access Authentication Scheme +- rfc5626 - Managing Client-Initiated Connections in the Session Initiation Protocol (SIP) +- rfc8866 - SDP: Session Description Protocol +- rfc3264 - An Offer/Answer Model with the Session Description Protocol (SDP) @@ -318,19 +318,19 @@ getheader(Hdrtab *ht, char *name) void delheader(Hdrtab *ht, char *name) { - Hdr **h, *nh; + Hdr *h, *nh; uint key; key = hash(name); - h = &ht->headers[key]; - while(*h != nil){ - nh = (*h)->next; - if(cistrcmp((*h)->name, name) == 0){ - free((*h)->name); - free((*h)->value); - free(*h); + h = ht->headers[key]; + while(h != nil){ + nh = h->next; + if(cistrcmp(h->name, name) == 0){ + free(h->name); + free(h->value); + free(h); } - *h = nh; + h = nh; } } |