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="color:black;background-repeat:initial;background-color:initial;font-weight:normal;margin-top:0px;margin-right:0px;margin-bottom:0.6em;margin-left:0px;padding-top:0.5em;padding-bottom:0.17em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(170, 170, 170);font-size:19px">
<span>Alphanumeric to numeric user mapping</span></h2><p style="margin-top:0.4em;margin-right:0px;margin-bottom:0.5em;margin-left:0px;line-height:1.5em">Say you want a user's id to be alphanumeric (like an email username), such as <a 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-top:0.4em;margin-right:0px;margin-bottom:0.5em;margin-left:0px;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-top:0.4em;margin-right:0px;margin-bottom:0.5em;margin-left:0px;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-top:0.4em;margin-right:0px;margin-bottom:0.5em;margin-left:0px;line-height:1.5em">Here is an example from the user directory:</p><pre style="padding-top:1em;padding-right:1em;padding-bottom:1em;padding-left:1em;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:dashed;border-right-style:dashed;border-bottom-style:dashed;border-left-style:dashed;border-top-color:rgb(47, 111, 171);border-right-color:rgb(47, 111, 171);border-bottom-color:rgb(47, 111, 171);border-left-color:rgb(47, 111, 171);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-top:0.4em;margin-right:0px;margin-bottom:0.5em;margin-left:0px;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="padding-top:1em;padding-right:1em;padding-bottom:1em;padding-left:1em;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:dashed;border-right-style:dashed;border-bottom-style:dashed;border-left-style:dashed;border-top-color:rgb(47, 111, 171);border-right-color:rgb(47, 111, 171);border-bottom-color:rgb(47, 111, 171);border-left-color:rgb(47, 111, 171);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-top:0.4em;margin-right:0px;margin-bottom:0.5em;margin-left:0px;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 href="mailto:jbarou@sqli.com" target="_blank">jbarou@sqli.com</a><br>
<a href="mailto:lyon.crci@sqli.com" target="_blank">lyon.crci@sqli.com</a><br><br>
</div>