aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2007-04-04 23:45:54 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2007-04-04 23:45:54 +0000
commit212d9d6b48d7e5a54b424b20e17fc9166e8e2687 (patch)
tree00768e5c0bf84bc2a99fec23162e49828df7462e /net
parent28572027202cfc9c7da61a115b55ba5a07b3e61d (diff)
Notes
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}; \