Hi Lorenzo,<br><br>Thank You for your help. Can you please tell me a little bit about pbx_builtin_getvar_helper.. where it is located, what''s the return value, etc.<br><br>Anyway, I am sorry, but maybe I have to explain what I am doing.
<br><br>Basically, I create an extra field for each asterisk client (SIP client).<br>Say, "database location". <br><br>In order to use this field, then each client has to use this field 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 accessing this field while the phone is answered. And I am doing this in app_dial.c.
<br><br>Now my question: is there any way from app_dial.c to access the field that I created in chan_sip.c (database_location) ?<br><br>Thank You<br>Fadil<br><br><br><div><span class="gmail_quote">On 7/29/07, <b class="gmail_sendername">
Lorenzo Miniero</b> <<a href="mailto:lorenzo.miniero@unina.it">lorenzo.miniero@unina.it</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;">
On Sunday 29 July 2007 06:53:48 Fadil Sutomo wrote:<br>> Hi all,<br>><br>> I am a new member in this list.<br>><br>> I have a newbie question.<br>> Is there anyway that I can get the source and destination in chan_sip.c ?
<br>><br>> For example, if I am calling from GrandStream GXP 2000 to Xlite, then how<br>> can I get:<br>> "source:grandstream and destination:Xlite"<br>><br>> Or alternatively, since I know that I can do this in app_dial.c, is there
<br>> anyway that I can access sip_pvt member? note that struct sip_pvt is<br>> defined in chan_sip.c ?<br>><br>> Thank You<br><br><br>Hi Fadil,<br><br>theres no way to directly access sip_pvt. But you can get the information you
<br>need through the pbx_builtin_getvar_helper method, accessing the abstract<br>channel instead, e.g. pbx_builtin_getvar_helper(chan, "SIPUSERAGENT").<br><br>Regards,<br>Lorenzo<br><br>--<br>Lorenzo Miniero, Junior Researcher
<br>Dipartimento di Informatica e Sistemistica<br>Università degli Studi di Napoli "Federico II"<br>Via Claudio 21 -- 80125 Napoli (Italy)<br>Phone: +390817683821 - Fax: +390817683816<br>Email: <a href="mailto:lorenzo.miniero@unina.it">
lorenzo.miniero@unina.it</a><br></blockquote></div><br>