<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I've noticed that when using an alphanumeric ID, case sensitivity
causes issues. It doesn't seem to matter what case the userID is in
the XML directory. What does seem to matter is how the user registered
their phone. If the user registered in all upper case (JOHN_SMITH),
then dialing John_Smith will not work. <br>
<br>
My work around for this is to tell all users to register their phones
in lower case, and then my dial plan uses LUA to force all dialed
extensions to lowercase.<br>
<br>
Peter<br>
<br>
<br>
Jonathan Barou wrote:
<blockquote
cite="mid:8048ff7f0909290633t24f15224v40fcfe5aa0c8fdf0@mail.gmail.com"
type="cite">Hi everybody,
<div><br>
</div>
<div>I have a problem with "Alphanumeric to numeric user mapping"</div>
<div><br>
</div>
<div>I have done like it's written here :</div>
<div><br>
</div>
<div><br>
</div>
<div><span
style="font-family: sans-serif; font-size: 13px; line-height: 19px;">
<h2
style="border-bottom: 1px solid rgb(170, 170, 170); margin: 0px 0px 0.6em; color: black; font-weight: normal; padding-top: 0.5em; padding-bottom: 0.17em; font-size: 19px;"><span>Alphanumeric
to numeric user mapping</span></h2>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">Say you want
a user's id to be alphanumeric (like an email username), such as <a
moz-do-not-send="true" href="mailto:johnsmith@pbx.example.com"
target="_blank">johnsmith@pbx.example.com</a>. These users have
alphanumeric usernames in their sip phone config, but you want to map
them from their sip username to a numeric extension, and vice versa.</p>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">As of version
1.0.4, Freeswitch makes this trivial to accomplish. A user's ID can be
any alphanumeric string, and this can be simply tied to an extension
number using the 'number-alias' property. This property creates an
aliased directory entry that points to the alphanumeric user entry.</p>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;"><i>NOTE: When
using this attribute, you must be careful not to create a directory
collision by having another user whose ID is the same as another user's
alias</i></p>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">Here is an
example from the user directory:</p>
<pre
style="border: 1px dashed rgb(47, 111, 171); padding: 1em; color: black; background-color: rgb(249, 249, 249); line-height: 1.1em;"> <user id="johnsmith" number-alias="1001">
<!-- Insert the usual user configuration variables and params here,
including user password, voicemail password, caller ID info, etc -->
</user>
</pre>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">So when a
user dials extension number 1001, your dialplan can use the 'user_data'
function to look up the ID attribute associated with that number alias.
In the default dialplan, the 'Local Extension' section can be made to
work with a small change to the 'bridge' line:</p>
<pre
style="border: 1px dashed rgb(47, 111, 171); padding: 1em; color: black; background-color: rgb(249, 249, 249); line-height: 1.1em;"> <action application="bridge" data="user/${user_data(${dialed_extension}@${domain_name} attr id)}@${domain_name}"/>
</pre>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;"><i>NOTE:
Using this user_data function in combination with mod_xml_curl will
generate an additional request each time the user_data function is
called. Note that it is already called once in the Local Extension
section to determine the callgroup. <b>Beware of performance
implications of this with high-volume systems.</b></i></p>
</span></div>
<div><br>
</div>
<div><br>
</div>
<div>But when I want to call my alias-number, FS says "No Route,
Abording"</div>
<div><br>
</div>
<div>My version of FreeSWITCH is the 1.0.4pre9.</div>
<div><br>
</div>
<div>Do you have any ideas ? Did I forget something to do?</div>
<div><br>
</div>
<div>Thanks </div>
<div><br>
</div>
<div><br clear="all">
<br>
-- <br>
Jonathan BAROU<br>
SQLI LYON - CRCI <br>
<a moz-do-not-send="true" href="mailto:jbarou@sqli.com"
target="_blank">jbarou@sqli.com</a><br>
<a moz-do-not-send="true" href="mailto:lyon.crci@sqli.com"
target="_blank">lyon.crci@sqli.com</a><br>
<br>
</div>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
</pre>
</blockquote>
</body>
</html>