From 154731a777377c3daf5fa4ffed705c0f942d33de Mon Sep 17 00:00:00 2001
From: Michael S Collins <msc@freeswitch.org>
Date: Mon, 9 May 2011 09:41:50 -0700
Subject: [PATCH] Add jaybinks' tel: patch

---
 src/mod/endpoints/mod_sofia/sofia_glue.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/mod/endpoints/mod_sofia/sofia_glue.c b/src/mod/endpoints/mod_sofia/sofia_glue.c
index ab37ecd7f7..cc21bd0c04 100644
--- a/src/mod/endpoints/mod_sofia/sofia_glue.c
+++ b/src/mod/endpoints/mod_sofia/sofia_glue.c
@@ -2171,6 +2171,15 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
 			if (!strncasecmp(url_str, "sips:", 5)) {
 				s = url_str + 5;
 			}
+
+			/* tel: patch from jaybinks, added by MC
+               It compiles but I don't have a way to test it
+			*/
+			if (!strncasecmp(url_str, "tel:", 4)) {
+				switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session),
+								  SWITCH_LOG_ERROR, "URL Error! tel: uri's not supported at this time\n");
+				return SWITCH_STATUS_FALSE;
+			}
 			if (!s) {
 				s = url_str;
 			}