Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] Hostname


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
freeswitch.noob at gma...
Guest





PostPosted: Fri Oct 23, 2009 2:47 pm    Post subject: [Freeswitch-users] Hostname Reply with quote

I have mod xml_curl installed and I am getting the following passed to my script.

[hostname] => myhost.local
[section] => dialplan


I also have multiple versions of FS running on the same box.  Is there a way to have each FS instance on my box have a unique hostname ?

Thanks in advance.
Back to top
kristian.kielhofner at...
Guest





PostPosted: Fri Oct 23, 2009 2:53 pm    Post subject: [Freeswitch-users] Hostname Reply with quote

Can't you use different contexts or something else to tell them apart?

On Fri, Oct 23, 2009 at 3:34 PM, freeswitch noob
<freeswitch.noob@gmail.com> wrote:
Quote:
I have mod xml_curl installed and I am getting the following passed to my
script.

[hostname] => myhost.local
[section] => dialplan


I also have multiple versions of FS running on the same box.  Is there a way
to have each FS instance on my box have a unique hostname ?

Thanks in advance.

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org





--
Kristian Kielhofner
http://www.astlinux.org
http://blog.krisk.org
http://www.star2star.com
http://www.submityoursip.com
http://www.voalte.com

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
chris at cloudtel.com
Guest





PostPosted: Fri Oct 23, 2009 3:08 pm    Post subject: [Freeswitch-users] Hostname Reply with quote

one real quick way would be put different GET var in each server's binding

On October 23, 2009 03:46:11 pm Kristian Kielhofner wrote:
Quote:
Can't you use different contexts or something else to tell them apart?

On Fri, Oct 23, 2009 at 3:34 PM, freeswitch noob

<freeswitch.noob@gmail.com> wrote:
Quote:
I have mod xml_curl installed and I am getting the following passed to my
script.

[hostname] => myhost.local
[section] => dialplan


I also have multiple versions of FS running on the same box.  Is there a
way to have each FS instance on my box have a unique hostname ?

Thanks in advance.

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
freeswitch.noob at gma...
Guest





PostPosted: Fri Oct 23, 2009 3:52 pm    Post subject: [Freeswitch-users] Hostname Reply with quote

Yeah, I was just trying to make it easier on myself.  I have scripts from a friend that parse xml_curl requests based on the hostname, I was hoping to not have to re-write them to read something else from the post that FS makes from xml_curl.  But from what it sounds like I will have to.


On Fri, Oct 23, 2009 at 2:58 PM, Chris Burns <chris@cloudtel.com (chris@cloudtel.com)> wrote:
Quote:
one real quick way would be put different GET var in each server's binding


On October 23, 2009 03:46:11 pm Kristian Kielhofner wrote:
Quote:
Can't you use different contexts or something else to tell them apart?

On Fri, Oct 23, 2009 at 3:34 PM, freeswitch noob

<freeswitch.noob@gmail.com (freeswitch.noob@gmail.com)> wrote:
Quote:
I have mod xml_curl installed and I am getting the following passed to my
script.

[hostname] => myhost.local
[section] => dialplan


I also have multiple versions of FS running on the same box.  Is there a
way to have each FS instance on my box have a unique hostname ?

Thanks in advance.

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


Back to top
freeswitch-users-list ...
Guest





PostPosted: Fri Oct 23, 2009 4:47 pm    Post subject: [Freeswitch-users] Hostname Reply with quote

Why not simply overwrite the value of the variable used throughout the script... -- xml_curl.conf -- ... <param name="gateway-url" value="freeswitch noob (freeswitch.noob@gmail.com) To: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org) Sent: Friday, October 23, 2009 4:42 PM Subject: Re: [Freeswitch-users] Hostname Yeah, I was just trying to make it easier on myself. I have scripts from a friend that parse xml_curl requests based on the hostname, I was hoping to not have to re-write them to read something else from the post that FS makes from xml_curl. But from what it sounds like I will have to. On Fri, Oct 23, 2009 at 2:58 PM, Chris Burns <chris@cloudtel.com (chris@cloudtel.com)> wrote: one real quick way would be put different GET var in each server's binding On October 23, 2009 03:46:11 pm Kristian Kielhofner wrote:> Can't you use different contexts or something else to tell them apart?>> On Fri, Oct 23, 2009 at 3:34 PM, freeswitch noob>> <freeswitch.noob@gmail.com (freeswitch.noob@gmail.com)> wrote:> > I have mod xml_curl installed and I am getting the following passed to my> > script.> >> > [hostname] => myhost.local> > [section] => dialplan> >> >> > I also have multiple versions of FS running on the same box. Is there a> > way to have each FS instance on my box have a unique hostname ?> >> > Thanks in advance.> >> > _______________________________________________> > FreeSWITCH-users mailing list> > FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)> > FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)http://lists.freeswitch.org/mailman/listinfo/freeswitch-usersUNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org _______________________________________________FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-usersUNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org
Back to top
freeswitch-users-list ...
Guest





PostPosted: Fri Oct 23, 2009 4:56 pm    Post subject: [Freeswitch-users] Hostname Reply with quote

Please note that this would essentially be taking Chris' suggestion a little further but the effort involved would be minimal. ----- Original Message ----- From: Metik (freeswitch-users-list@metik.com) To: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org) Sent: Friday, October 23, 2009 5:37 PM Subject: Re: [Freeswitch-users] Hostname Why not simply overwrite the value of the variable used throughout the script... -- xml_curl.conf -- ... <param name="gateway-url" value="freeswitch noob (freeswitch.noob@gmail.com) To: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org) Sent: Friday, October 23, 2009 4:42 PM Subject: Re: [Freeswitch-users] Hostname Yeah, I was just trying to make it easier on myself. I have scripts from a friend that parse xml_curl requests based on the hostname, I was hoping to not have to re-write them to read something else from the post that FS makes from xml_curl. But from what it sounds like I will have to. On Fri, Oct 23, 2009 at 2:58 PM, Chris Burns <chris@cloudtel.com (chris@cloudtel.com)> wrote: one real quick way would be put different GET var in each server's binding On October 23, 2009 03:46:11 pm Kristian Kielhofner wrote:> Can't you use different contexts or something else to tell them apart?>> On Fri, Oct 23, 2009 at 3:34 PM, freeswitch noob>> <freeswitch.noob@gmail.com (freeswitch.noob@gmail.com)> wrote:> > I have mod xml_curl installed and I am getting the following passed to my> > script.> >> > [hostname] => myhost.local> > [section] => dialplan> >> >> > I also have multiple versions of FS running on the same box. Is there a> > way to have each FS instance on my box have a unique hostname ?> >> > Thanks in advance.> >> > _______________________________________________> > FreeSWITCH-users mailing list> > FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)> > FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)http://lists.freeswitch.org/mailman/listinfo/freeswitch-usersUNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org _______________________________________________FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-usersUNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org
Back to top
freeswitch-users-list ...
Guest





PostPosted: Fri Oct 23, 2009 5:27 pm    Post subject: [Freeswitch-users] Hostname Reply with quote

Forget it--this will not work because FS uses a POST (vs GET). Most likely it would attempt to actually POST to a file named "index.php?xhostname=myhost". However, if there was some way to add an arbitrary POST variable to the HTTP transaction, it would work. I am sure the FS developers have already thought of this and its a case of RTFM. -metik ----- Original Message ----- From: Metik (freeswitch-users-list@metik.com) To: Metik (freeswitch-users-list@metik.com) ; freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org) Sent: Friday, October 23, 2009 5:48 PM Subject: Re: [Freeswitch-users] Hostname Please note that this would essentially be taking Chris' suggestion a little further but the effort involved would be minimal. ----- Original Message ----- From: Metik (freeswitch-users-list@metik.com) To: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org) Sent: Friday, October 23, 2009 5:37 PM Subject: Re: [Freeswitch-users] Hostname Why not simply overwrite the value of the variable used throughout the script... -- xml_curl.conf -- ... <param name="gateway-url" value="freeswitch noob (freeswitch.noob@gmail.com) To: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org) Sent: Friday, October 23, 2009 4:42 PM Subject: Re: [Freeswitch-users] Hostname Yeah, I was just trying to make it easier on myself. I have scripts from a friend that parse xml_curl requests based on the hostname, I was hoping to not have to re-write them to read something else from the post that FS makes from xml_curl. But from what it sounds like I will have to. On Fri, Oct 23, 2009 at 2:58 PM, Chris Burns <chris@cloudtel.com (chris@cloudtel.com)> wrote: one real quick way would be put different GET var in each server's binding On October 23, 2009 03:46:11 pm Kristian Kielhofner wrote:> Can't you use different contexts or something else to tell them apart?>> On Fri, Oct 23, 2009 at 3:34 PM, freeswitch noob>> <freeswitch.noob@gmail.com (freeswitch.noob@gmail.com)> wrote:> > I have mod xml_curl installed and I am getting the following passed to my> > script.> >> > [hostname] => myhost.local> > [section] => dialplan> >> >> > I also have multiple versions of FS running on the same box. Is there a> > way to have each FS instance on my box have a unique hostname ?> >> > Thanks in advance.> >> > _______________________________________________> > FreeSWITCH-users mailing list> > FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)> > FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)http://lists.freeswitch.org/mailman/listinfo/freeswitch-usersUNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org _______________________________________________FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-usersUNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org
Back to top
chris at cloudtel.com
Guest





PostPosted: Fri Oct 23, 2009 6:34 pm    Post subject: [Freeswitch-users] Hostname Reply with quote

Fake the hostname in the query string:
http://test/dir.php?hostname=mmmpotatoes

Add this to the top of your buddy's script (if its even PHP):
$hostname = $_POST['hostname'] = $_REQUEST['hostname'] = $_GET['hostname'];


On October 23, 2009 06:18:41 pm Metik wrote:
Quote:
Forget it--this will not work because FS uses a POST (vs GET). Most likely
it would attempt to actually POST to a file named
"index.php?xhostname=myhost".

However, if there was some way to add an arbitrary POST variable to the
HTTP transaction, it would work. I am sure the FS developers have already
thought of this and its a case of RTFM.

-metik
----- Original Message -----
From: Metik
To: Metik ; freeswitch-users@lists.freeswitch.org
Sent: Friday, October 23, 2009 5:48 PM
Subject: Re: [Freeswitch-users] Hostname


Please note that this would essentially be taking Chris' suggestion a
little further but the effort involved would be minimal. ----- Original
Message -----
From: Metik
To: freeswitch-users@lists.freeswitch.org
Sent: Friday, October 23, 2009 5:37 PM
Subject: Re: [Freeswitch-users] Hostname


Why not simply overwrite the value of the variable used throughout the
script...

-- xml_curl.conf --
...
<param name="gateway-url"
value="http://localhost/index.php?xhostname=myhost" bindings="dialplan"/>
...

-- index.php --

<?

$_REQUEST['hostname'] = "$xhostname";

...
----- Original Message -----
From: freeswitch noob
To: freeswitch-users@lists.freeswitch.org
Sent: Friday, October 23, 2009 4:42 PM
Subject: Re: [Freeswitch-users] Hostname


Yeah, I was just trying to make it easier on myself. I have scripts
from a friend that parse xml_curl requests based on the hostname, I was
hoping to not have to re-write them to read something else from the post
that FS makes from xml_curl. But from what it sounds like I will have to.



On Fri, Oct 23, 2009 at 2:58 PM, Chris Burns <chris@cloudtel.com>
wrote:

one real quick way would be put different GET var in each server's
binding

On October 23, 2009 03:46:11 pm Kristian Kielhofner wrote:
Quote:
Can't you use different contexts or something else to tell them
apart?

On Fri, Oct 23, 2009 at 3:34 PM, freeswitch noob

<freeswitch.noob@gmail.com> wrote:
Quote:
I have mod xml_curl installed and I am getting the following
passed to my script.

[hostname] => myhost.local
[section] => dialplan


I also have multiple versions of FS running on the same box.
Is there a way to have each FS instance on my box have a unique
hostname ?

Thanks in advance.

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswi
tch-users http://www.freeswitch.org

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users

UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org





--------------------------------------------------------------------------


_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users

UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
freeswitch.noob at gma...
Guest





PostPosted: Mon Oct 26, 2009 8:28 am    Post subject: [Freeswitch-users] Hostname Reply with quote

Thank you for the get idea,  It works perfectly.


On Fri, Oct 23, 2009 at 4:37 PM, Metik <freeswitch-users-list@metik.com (freeswitch-users-list@metik.com)> wrote:
Quote:
Why not simply overwrite the value of the variable used throughout the script...
 
-- xml_curl.conf --
...
      <param name="gateway-url" value="http://localhost/index.php?xhostname=myhost" bindings="dialplan"/>
...
 
-- index.php --
 
<?
 
$_REQUEST['hostname'] = "$xhostname";
 
...
Quote:

----- Original Message -----
From: freeswitch noob (freeswitch.noob@gmail.com)
To: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)
Sent: Friday, October 23, 2009 4:42 PM
Subject: Re: [Freeswitch-users] Hostname


Yeah, I was just trying to make it easier on myself.  I have scripts from a friend that parse xml_curl requests based on the hostname, I was hoping to not have to re-write them to read something else from the post that FS makes from xml_curl.  But from what it sounds like I will have to.


On Fri, Oct 23, 2009 at 2:58 PM, Chris Burns <chris@cloudtel.com (chris@cloudtel.com)> wrote:
Quote:
one real quick way would be put different GET var in each server's binding


On October 23, 2009 03:46:11 pm Kristian Kielhofner wrote:
Quote:
Can't you use different contexts or something else to tell them apart?

On Fri, Oct 23, 2009 at 3:34 PM, freeswitch noob

<freeswitch.noob@gmail.com (freeswitch.noob@gmail.com)> wrote:
Quote:
I have mod xml_curl installed and I am getting the following passed to my
script.

[hostname] => myhost.local
[section] => dialplan


I also have multiple versions of FS running on the same box.  Is there a
way to have each FS instance on my box have a unique hostname ?

Thanks in advance.

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org








_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services