<div dir="ltr"><div>As I can see (in sofia_glue.c)  invite_contact is set from channel variable sip_contact_user if empty. I export channel variable sip_contact_user in dial plan, but on b-leg steal see <span style="font-size:13px;color:rgb(80,0,80);font-family:arial,sans-serif">Contact: &lt;<a href="http://sip:auto_to_user@1.2.3.4:5060">sip:auto_to_user@1.2.3.4:5060</a></span><span style="font-size:13px;color:rgb(80,0,80);font-family:arial,sans-serif">;transport=udp;gw=mygw&gt;.</span></div>
<div><font color="#500050" face="arial, sans-serif">Seams that</font> sip_contact_user is used for a-leg only.</div><div><br></div><div>Gateway has set param</div><div><br></div><div>&lt;param name=&quot;extension&quot; value=&quot;auto_to_user&quot;/&gt;<br>
</div><div><br></div><div>In sofia.c &#39;auto_to_user&#39; or &#39;auto&#39; value in extension affects only destination_number. <br></div><div><br></div><div>So, I can&#39;t see any way to set contact header user name for outbound calls for gateway.</div>
<div><br></div><div>Seudin</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Sep 17, 2013 at 11:42 PM, Brian West <span dir="ltr">&lt;<a href="mailto:brian@freeswitch.org" target="_blank">brian@freeswitch.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Look in sofia_glue.c in do_invite at all the variables you can set...<br>
--<br>
Brian West<br>
<a href="mailto:brian@freeswitch.org">brian@freeswitch.org</a><br>
FreeSWITCH Solutions, LLC<br>
PO BOX PO BOX 2531<br>
Brookfield, WI 53008-2531<br>
Twitter: @FreeSWITCH_Wire , @briankwest<br>
<a href="http://www.freeswitchbook.com" target="_blank">http://www.freeswitchbook.com</a><br>
<a href="http://www.freeswitchcookbook.com" target="_blank">http://www.freeswitchcookbook.com</a><br>
<br>
T: <a href="tel:%2B1.918.420.9001" value="+19184209001">+1.918.420.9001</a>  |  F: <a href="tel:%2B1.918.420.9002" value="+19184209002">+1.918.420.9002</a>  |  M: +1.918.424.WEST<br>
iNUM: <a href="tel:%2B883%205100%201420%209001" value="+883510014209001">+883 5100 1420 9001</a><br>
ISN: 410*543<br>
Skype:briankwest<br>
PGP Key: <a href="http://www.bkw.org/key.txt" target="_blank">http://www.bkw.org/key.txt</a> (AB93356707C76CED)<br>
<div><div class="h5"><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
On Sep 17, 2013, at 8:32 AM, Seudin Kasumovic &lt;<a href="mailto:seudin.kasumovic@gmail.com">seudin.kasumovic@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Hi,<br>
&gt;<br>
&gt; Call comes over external gateway and pass to another external gateway via outbound proxy (no authentication nor registration), but on b-leg contact header is not as expected username from tag &#39;From:&#39; of a-leg.<br>

&gt;<br>
&gt; a-leg works correct for inbound calls via external gateway:<br>
&gt;<br>
&gt;   Contact: &lt;sip:1001@1.2.3.4:5060;transport=udp&gt;<br>
&gt;<br>
&gt; but b-leg (outbound calls) has header set to:<br>
&gt;<br>
&gt;  Contact: &lt;sip:auto_to_user@1.2.3.4:5060;transport=udp;gw=mygw&gt;<br>
&gt;<br>
&gt; I tried to set empty value or comment this line of external gateway:<br>
&gt;<br>
&gt; &lt;param name=&quot;extension&quot; value=&quot;auto_to_user&quot;/&gt;<br>
&gt;<br>
&gt; but then call failed.<br>
&gt;<br>
&gt; How to set user in contact header on b-leg or/and what to export from dial plan to populate user in contact header on external gateway?<br>
&gt;<br>
&gt; Regards,<br>
&gt; Seudin<br>
</div></div>&gt; _________________________________________________________________________<br>
&gt; Professional FreeSWITCH Consulting Services:<br>
&gt; <a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
&gt; <a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
&gt;<br>
&gt; FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
&gt; <a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
&gt;<br>
&gt; Official FreeSWITCH Sites<br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt; <a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
&gt; <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
&gt;<br>
&gt; FreeSWITCH-users mailing list<br>
&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>MSC Seudin Kasumovic<br>Tuzla, Bosnia
</div>