<div dir="ltr">Pari,<br>&nbsp; I changed the pbx.js file as you recommended.&nbsp; This does not revert back to the &quot;version 1&quot; GUI behavior as I had hoped, rather it behaves as documented in the bug you cited.... &quot;trunk_1&quot; etc.&nbsp; This breaks service providers that requre asterisk to match the incoming call with the context name.&nbsp; In the case of the first bug report that needed to be the username. In the case of my service provider, it needs to be the trunkname (&quot;vitel-inbound&quot; for <a href="http://vitelity.net">vitelity.net</a>).<br>
<br>Bottom line, you need to revert to GUI version 1 behavior (using the trunkname) or add a new field for the user to enter a context name.&nbsp; Generating one automatically isn&#39;t going to work with some service providers.<br>
<br>David<br><br><div class="gmail_quote">On Tue, Sep 16, 2008 at 5:01 PM, David Kerr <span dir="ltr">&lt;<a href="mailto:David@kerr.net">David@kerr.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div dir="ltr">I have opened bug 0013497 at the Digium bug tracker web site to track this problem.<br><br>Thank you.<div><div></div><div class="Wj3C7c"><br><br><div class="gmail_quote">On Tue, Sep 16, 2008 at 9:09 AM, David Kerr <span dir="ltr">&lt;<a href="mailto:David@kerr.net" target="_blank">David@kerr.net</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div dir="ltr">For some reason I &quot;replied&quot; only to Pari and not the list. Ooops.<div>

<div></div><div><br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">David Kerr</b> <span dir="ltr">&lt;<a href="mailto:David@kerr.net" target="_blank">David@kerr.net</a>&gt;</span><br>


Date: Tue, Sep 16, 2008 at 9:08 AM<br>Subject: Re: [asterisk-gui] Context names in the new GUI<br>To: Pari Nannapaneni &lt;<a href="mailto:pari@digium.com" target="_blank">pari@digium.com</a>&gt;<br><br><br><div dir="ltr">

Pari,<br>&nbsp; Thanks for the quick reply... A classic case of fixing one bug creating another!<br>
<br>In my opinion the original bug report isn&#39;t even a bug, it is the way that Asterisk is supposed to work. If you need the username as the context name for incoming calls, then set the trunkname in the GUI to be the same as the username.&nbsp; I don&#39;t believe that the trunkname was used for anything other than the context naming anyway (in the extensions.conf file the &quot;trunkname&quot; was set to &quot;Custom - whatever-the-user-entered&quot; anyway so not exactly as entered, the only place it appears as entered is for Contexts. So the right way to address the problem in AA50-2113 is to tell the user to enter exactly the same thing (their username) into both the trunkname and username fields in the GUI.<br>



<br>As implemented today, it is broken.... multiple trunks from different service providers using the same username cannot be configured.&nbsp; If we must be able to use username as context names, then it should be an option, not hardcoded. But why make it an option? why not just add a field in the GUI for &quot;Context name&quot;.... humm, but then again, how would that be any different from &quot;Trunk name&quot; ?<br>



<br>I can edit the source as you suggest, which will get me going again, but I recommend you consider how to implement a permanent fix.<br><br>Thanks again for the super fast reply.<br><font color="#888888">David.</font><div>


<div></div><div><br><br><br><div class="gmail_quote">
On Mon, Sep 15, 2008 at 11:39 PM, Pari Nannapaneni <span dir="ltr">&lt;<a href="mailto:pari@digium.com" target="_blank">pari@digium.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



<div><br>
&gt; Can you explain why this change was made?<br>
<br>
</div>Hi David,<br>
<br>
The change in behavior was because of an issue on our internal bug tracker.<br>
<br>
 &nbsp; &nbsp;AA50-2113 - Creation of Trunks uses name that won&#39;t match on inbound calls<br>
<br>
 &nbsp; &nbsp;Description : The convention used to create a new trunk entry in users.conf, i.e. trunk_1, trunk_2, trunk_3, etc.,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;works okay for outbound calls placed via that trunk. However, inbound calls fail. When a call is received,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Asterisk tries to match the inbound user as &quot;trunk_1&quot; instead of the real username, i.e. bobjones.<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Please modify the creation of new trunks and the expression of those trunks in users.conf and extensions.conf<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;so that they are what the user inputs into the &quot;username&quot; field when adding or editing a voip trunk.<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;So, if I input mdavenport_soft as my username, then the entry in users.conf would be [mdavenport_soft] instead of trunk_1,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;and everything in the dialplan that would have said trunk_1 should say &quot;mdavenport_soft&quot; instead.<br>
<br>
You can &nbsp;easily switch to the old style by uncommenting a couple of lines in pbx.js,<br>
look for functions &nbsp;addIAXTrunk() and addSIPTrunk() and change<br>
<br>
--<br>
 &nbsp;//var trunk = astgui_managetrunks.misc.nextAvailableTrunk_x();<br>
 &nbsp; var trunk = tr.username ;<br>
<br>
-- TO --<br>
<br>
 &nbsp; var trunk = astgui_managetrunks.misc.nextAvailableTrunk_x();<br>
 &nbsp; // var trunk = tr.username ;<br>
--<br>
<br>
May be one day we migh have an option in the gui to switch between these modes.<br>
<br>
thanks<br>
-Pari<br>
<div><div></div><div><br>
<br>
<br>
----- Original Message -----<br>
From: &quot;David Kerr&quot; &lt;David@Kerr.net&gt;<br>
To: <a href="mailto:asterisk-gui@lists.digium.com" target="_blank">asterisk-gui@lists.digium.com</a><br>
Sent: Monday, September 15, 2008 9:29:39 PM GMT -06:00 US/Canada Central<br>
Subject: [asterisk-gui] Context names in the new GUI<br>
<br>
<br>
<br>
I just started using the new version of the GUI and am trying to migrate settings from a box that had the old GUI. I have found that the new GUI uses the username of a VOIP trunk as the basis for the context names in users.conf and extensions.conf (any maybe elsewhere too?). The old GUI used the name of the service provider as the basis (or whatever you entered as the name).<br>




<br>
This breaks me... I have multiple VOIP service providers with the same username, which obvously won&#39;t work. In one case ( <a href="http://vitelity.net" target="_blank">vitelity.net</a> ) they require two contexts be setup in asterisk with specific naming, one for vitel-inbound, one for vitel-outbound... both with the same username, but with different host addresses. In the new GUI I cannot set this up. If I manually change the context names by editing users.conf and extensions.conf, then I can no longer edit the trunk in the GUI.<br>




<br>
Can you explain why this change was made?<br>
<br>
Is there anyway I can change it back to using the trunk name as the basis for Context naming?<br>
<br>
Thanks<br>
David<br>
<br>
</div></div>_______________________________________________<br>
--Bandwidth and Colocation Provided by <a href="http://www.api-digital.com--" target="_blank">http://www.api-digital.com--</a><br>
<br>
asterisk-gui mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
 &nbsp; <a href="http://lists.digium.com/mailman/listinfo/asterisk-gui" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-gui</a><br>
<br>
</blockquote></div><br></div></div></div>
</div><br></div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>