aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2007-04-05 07:45:54 +0800
committersobomax <sobomax@FreeBSD.org>2007-04-05 07:45:54 +0800
commit13ec2f560879618ec7b518b65afa92c3a594cb2e (patch)
treead3e7805cb32bd78c2889d795fcf253b57ef7ddf /net
parentc1de105edae1435df65ac45dce0acc4780d3c390 (diff)
downloadfreebsd-ports-gnome-13ec2f560879618ec7b518b65afa92c3a594cb2e.tar.gz
freebsd-ports-gnome-13ec2f560879618ec7b518b65afa92c3a594cb2e.tar.zst
freebsd-ports-gnome-13ec2f560879618ec7b518b65afa92c3a594cb2e.zip
Bring in few local changes from asterisk.
Diffstat (limited to 'net')
-rw-r--r--net/openpbx.org/files/patch-channels::chan_sip.c25
-rw-r--r--net/openpbx.org/files/patch-configs::Makefile.in10
2 files changed, 35 insertions, 0 deletions
diff --git a/net/openpbx.org/files/patch-channels::chan_sip.c b/net/openpbx.org/files/patch-channels::chan_sip.c
new file mode 100644
index 000000000000..b61076ccd2c6
--- /dev/null
+++ b/net/openpbx.org/files/patch-channels::chan_sip.c
@@ -0,0 +1,25 @@
+--- channels/chan_sip.c.orig Wed Apr 4 12:59:02 2007
++++ channels/chan_sip.c Wed Apr 4 13:08:42 2007
+@@ -3711,6 +3711,8 @@
+ opbx_mutex_unlock(&i->lock);
+ fmt = opbx_best_codec(tmp->nativeformats);
+
++ pbx_builtin_setvar_helper(tmp, "SIP_CODEC_USED", opbx_getformatname(fmt));
++
+ if (title)
+ snprintf(tmp->name, sizeof(tmp->name), "SIP/%s-%04x", title, thread_safe_opbx_random() & 0xffff);
+ else if (strchr(i->fromdomain, ':'))
+@@ -11450,6 +11452,13 @@
+ username = p->authname;
+ secret = p->peersecret;
+ md5secret = p->peermd5secret;
++ }
++ /* No authentication. Try to get auth info from channel vars */
++ if (opbx_strlen_zero(username))
++ {
++ username = pbx_builtin_getvar_helper(p->owner, "SIP_AUTH_NAME");
++ secret = pbx_builtin_getvar_helper(p->owner, "SIP_AUTH_SECRET");
++ md5secret = pbx_builtin_getvar_helper(p->owner, "SIP_AUTH_MD5SECRET");
+ }
+ if (opbx_strlen_zero(username)) /* We have no authentication */
+ return -1;
diff --git a/net/openpbx.org/files/patch-configs::Makefile.in b/net/openpbx.org/files/patch-configs::Makefile.in
new file mode 100644
index 000000000000..c408cf5969fb
--- /dev/null
+++ b/net/openpbx.org/files/patch-configs::Makefile.in
@@ -0,0 +1,10 @@
+--- configs/Makefile.in.orig Wed Apr 4 14:42:16 2007
++++ configs/Makefile.in Wed Apr 4 14:42:37 2007
+@@ -742,6 +742,7 @@
+ for samplefile in $(SAMPLES); \
+ do \
+ configfile=`basename $${samplefile} .sample`; \
++ $(INSTALL) -m 0640 $${samplefile} $(DESTDIR)${opbxconfdir}/$${samplefile}; \
+ if test ! -f $(DESTDIR)${opbxconfdir}/$${configfile}; \
+ then \
+ $(INSTALL) -m 0640 $${samplefile} $(DESTDIR)${opbxconfdir}/$${configfile}; \