Hi Kevin,<br><br>In app_dial.c, yes I can easily access the "database_location" by invoking pbx_builtin_getvar_helper(chan, "database_location"), however I still run to another problem.<br><br>I notice that pbx_builtin_getvar_helper only works for the "calling" (source) party NOT for the "called" (destination).
<br><br>Say, I have this in sip.conf<br><br>[Xlite1]<br>...<br>setvar=database_location=/home/fadil/MySQL<br>...<br><br>[GrandStream]<br>...<br>setvar=database_location=/opt/some_database<br>...<br><br><br>If I call from Xlite1 to Grandstream (source = Xlite1 and destination=Grandstream), then we know in app_dial.c, the source channel is "in" and the destination channel is "c" in function "wait_for_answer".
<br><br>Then, pbx_builtin_getvar_helper(in, "database_location") returns "/home/fadil/MySQL" BUT pbx_builtin_getvar_helper(c, "database_location") returns (null).<br><br>Could you (or anyone reading this post) please tell me why this is happening and how to solve it..
<br><br>Thank You<br>Fadil<br><br><br><br><div><span class="gmail_quote">On 7/31/07, <b class="gmail_sendername">Fadil Sutomo</b> <<a href="mailto:fsutomo@gmail.com">fsutomo@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
AMAZING!!!!!!!!<br><br>Thank you so much...<div><span class="e" id="q_1141c91304895fea_1"><br><br><div><span class="gmail_quote">On 7/30/07, <b class="gmail_sendername">Kevin P. Fleming</b> <<a href="mailto:kpfleming@digium.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
kpfleming@digium.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Fadil Sutomo wrote:<br><br>> In order to use this field, then each client has to use this field
<br>> through sip.conf.<br>> For example:<br>> [Xlite]<br>> username=Fadil<br>> secret=fadil<br>> ..<br>> ..<br>> database_location=/home/fadil/MySQL<br>><br>> I modify chan_sip in order to do this.
<br>><br>> Now, what I want to do is to access this location "on-the-fly", that is<br>> accessing this field while the phone is answered. And I am doing this in<br>> app_dial.c.<br>><br>> Now my question: is there any way from app_dial.c to access the field
<br>> that I created in chan_sip.c (database_location) ?<br><br>It would do you good to read the sample config files and documentation;<br>this functionality is already available. Change that line to:<br><br>setvar=database_location=/home/fadil/MySQL
<br><br>and you will magically have a variable called 'DATABASE_LOCATION' in the<br>dialplan (and elsewhere) with that value in it.<br><br>--<br>Kevin P. Fleming<br>Director of Software Technologies<br>Digium, Inc. - "The Genuine Asterisk Experience" (TM)
<br><br>_______________________________________________<br>--Bandwidth and Colocation Provided by <a href="http://www.api-digital.com--" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.api-digital.com--
</a><br><br>asterisk-dev mailing list<br>To UNSUBSCRIBE or update options visit:
<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br></blockquote></div>
<br>
</span></div></blockquote></div><br>