Insert blank after REFER (bug #997)

Correct path to VM sample (bug #994)
Make manager interface non-blocking (bug #861)
Don't bork on empty from in SIP (bug #887)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2004-02-07 07:13:33 +00:00
parent cf4825233d
commit ae4adad5c4
4 changed files with 11 additions and 3 deletions

View File

@@ -397,7 +397,7 @@ samples: all datafiles adsi
for x in vm-theperson digits/1 digits/2 digits/3 digits/4 vm-isunavail; do \
cat $(DESTDIR)$(ASTVARLIBDIR)/sounds/$$x.gsm >> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/unavail.gsm ; \
done
:> $(DESTDIR)$(ASTVARLIBDIR)/sounds/voicemail/default/1234/busy.gsm
:> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/busy.gsm
for x in vm-theperson digits/1 digits/2 digits/3 digits/4 vm-isonphone; do \
cat $(DESTDIR)$(ASTVARLIBDIR)/sounds/$$x.gsm >> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/busy.gsm ; \
done

View File

@@ -3305,6 +3305,7 @@ static int transmit_refer(struct sip_pvt *p, char *dest)
add_header(&req, "Refer-To", referto);
if (strlen(p->our_contact))
add_header(&req, "Referred-By", p->our_contact);
add_blank_header(&req);
return send_request(p, &req, 1, p->ocseq);
}
@@ -3888,8 +3889,10 @@ static int get_destination(struct sip_pvt *p, struct sip_request *oreq)
if ((a = strchr(c, ';'))) {
*a = '\0';
}
if ((a = strchr(fr, '@')) || (a = strchr(fr, ';'))) {
*a = '\0';
if (fr) {
if ((a = strchr(fr, '@')) || (a = strchr(fr, ';'))) {
*a = '\0';
}
}
if (sipdebug)
ast_verbose("Looking for %s in %s\n", c, p->context);

View File

@@ -8,6 +8,7 @@
;[dlinkgw]
;host = 192.168.0.64
;context = default
;canreinvite = no
;line => aaln/2
;line => aaln/1

View File

@@ -727,6 +727,7 @@ static void *accept_thread(void *ignore)
struct mansession *s;
struct protoent *p;
int arg = 1;
int flags;
pthread_attr_t attr;
pthread_attr_init(&attr);
@@ -752,6 +753,9 @@ static void *accept_thread(void *ignore)
}
memset(s, 0, sizeof(struct mansession));
memcpy(&s->sin, &sin, sizeof(sin));
/* For safety, make sure socket is non-blocking */
flags = fcntl(as, F_GETFL);
fcntl(as, F_SETFL, flags | O_NONBLOCK);
ast_mutex_init(&s->lock);
s->fd = as;
ast_mutex_lock(&sessionlock);