aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-02-07 07:13:33 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-02-07 07:13:33 +0000
commit8ea5ae4418c3b1e36c3e107ca921d4b3b839fef4 (patch)
tree2eaf0b6ea450ded48ac40cf920a9c6906693eb8b
parent687781a1f8453c67ea49717fcbbbfd7d46401142 (diff)
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: http://svn.digium.com/svn/asterisk/trunk@2138 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-xMakefile2
-rwxr-xr-xchannels/chan_sip.c7
-rwxr-xr-xconfigs/mgcp.conf.sample1
-rwxr-xr-xmanager.c4
4 files changed, 11 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index b678b15fb..3cc44afff 100755
--- a/Makefile
+++ b/Makefile
@@ -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
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 873bc1dcb..6df1f5344 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -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);
diff --git a/configs/mgcp.conf.sample b/configs/mgcp.conf.sample
index 544940d30..73b7c6cee 100755
--- a/configs/mgcp.conf.sample
+++ b/configs/mgcp.conf.sample
@@ -8,6 +8,7 @@
;[dlinkgw]
;host = 192.168.0.64
;context = default
+;canreinvite = no
;line => aaln/2
;line => aaln/1
diff --git a/manager.c b/manager.c
index fe8d2769b..ed285ec69 100755
--- a/manager.c
+++ b/manager.c
@@ -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);