[Asterisk-code-review] pbx_dundi: Add PJSIP support. (asterisk[master])

N A asteriskteam at digium.com
Fri Dec 9 08:22:19 CST 2022


N A has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/19702 )


Change subject: pbx_dundi: Add PJSIP support.
......................................................................

pbx_dundi: Add PJSIP support.

Adds PJSIP as a supported technology to DUNDi.

ASTERISK-28109 #close

Change-Id: I2e28e5a5d007bd49e3df113ad567b011103899bf
---
A doc/CHANGES-staging/dundi.txt
M include/asterisk/dundi.h
M pbx/dundi-parser.c
M pbx/pbx_dundi.c
4 files changed, 24 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/02/19702/1

diff --git a/doc/CHANGES-staging/dundi.txt b/doc/CHANGES-staging/dundi.txt
new file mode 100644
index 0000000..a3cba47
--- /dev/null
+++ b/doc/CHANGES-staging/dundi.txt
@@ -0,0 +1,3 @@
+Subject: DUNDi
+
+DUNDi now supports chan_pjsip.
diff --git a/include/asterisk/dundi.h b/include/asterisk/dundi.h
index 3f73c19..ed12001 100644
--- a/include/asterisk/dundi.h
+++ b/include/asterisk/dundi.h
@@ -59,6 +59,8 @@
 	DUNDI_PROTO_SIP  = 2,
 	/*! ITU H.323 */
 	DUNDI_PROTO_H323 = 3,
+	/*! PJSIP */
+	DUNDI_PROTO_PJSIP = 4,
 };
 
 enum {
diff --git a/pbx/dundi-parser.c b/pbx/dundi-parser.c
index bbfc760..5be8f4c 100644
--- a/pbx/dundi-parser.c
+++ b/pbx/dundi-parser.c
@@ -236,6 +236,8 @@
 	case DUNDI_PROTO_H323:
 		strncpy(buf, "H.323", bufsiz - 1);
 		break;
+	case DUNDI_PROTO_PJSIP:
+		strncpy(buf, "PJSIP", bufsiz - 1);
 	default:
 		snprintf(buf, bufsiz, "Unknown Proto(%d)", proto);
 	}
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index 9c0f2fa..6cfb289 100644
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -388,6 +388,8 @@
 		return "SIP";
 	case DUNDI_PROTO_H323:
 		return "H323";
+	case DUNDI_PROTO_PJSIP:
+		return "PJSIP";
 	default:
 		return "Unknown";
 	}
@@ -401,6 +403,8 @@
 		return DUNDI_PROTO_SIP;
 	else if (!strcasecmp(str, "H323"))
 		return DUNDI_PROTO_H323;
+	else if (!strcasecmp(str, "PJSIP"))
+		return DUNDI_PROTO_PJSIP;
 	else
 		return -1;
 }

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/19702
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I2e28e5a5d007bd49e3df113ad567b011103899bf
Gerrit-Change-Number: 19702
Gerrit-PatchSet: 1
Gerrit-Owner: N A <asterisk at phreaknet.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20221209/b1909c6e/attachment.html>


More information about the asterisk-code-review mailing list