According to http://wiki.freeswitch.org/wiki/Mod_xml_curl I'v tried to set up gateways dynamically, but I do net get it to work: I always get : "Invalid profile" My assumptions for a right xml answer back to FS are as follows, but I think at least one of it is false: 1. ) I start with <document type='freeswitch/xml'> <section name='configuration'> <configuration name='sofia.conf' description='RailsAdditionalConf'> 2.) I do not want to change settings, so I do NOT add a <settings> tag 3.) I want to enhance an existing profile, so I add a profile tag (<profile name='external'>) 4.) I assume that I can have an existing profile "external" in the xml conf files and can mix additional parts dynamically into the same profile 5.) Within the profile I want to add gateways, so I add a gateway tag (<gateways>) 6.) Then I add the gateways 7.) I add the closing tags Which one of the assumptions if wrong? The request I receive is as follows: {"key_name"=>"name", "action"=>"directory", "tag_name"=>"configuration", "key_value"=>"sofia.conf", "controller"=>"xml_curls", "hostname"=>"freeswitch", "section"=>"configuration"} I only answer once at startup with the follwing: <document type='freeswitch/xml'> <section name='configuration'> <configuration name='sofia.conf' description='RailsAdditionalConf'> <profile name='external'> <gateways> <gateway name="freeswitch2"> <param name="username" value="1007"/> <param name="realm" value="192.168.0.56:5061"/> <param name="password" value="xxxx"/> <param name="proxy" value="192.168.0.56"/> <param name="expire-seconds" value="30"/> <param name="register" value="true"/> <param name="register-transport" value="tls"/> <param name="retry-seconds" value="30"/> </gateway> </gateways> </profile> </configuration> </section> </document> Does anybody have a correct XML answer for a gateway and can post it? Best regards Peter
Peter P GMX wrote:
According to http://wiki.freeswitch.org/wiki/Mod_xml_curl I'v tried to set up gateways dynamically, but I do net get it to work: I always get : "Invalid profile"
My assumptions for a right xml answer back to FS are as follows, but I think at least one of it is false: 1. ) I start with <document type='freeswitch/xml'> <section name='configuration'> <configuration name='sofia.conf' description='RailsAdditionalConf'> 2.) I do not want to change settings, so I do NOT add a <settings> tag 3.) I want to enhance an existing profile, so I add a profile tag (<profile name='external'>) 4.) I assume that I can have an existing profile "external" in the xml conf files and can mix additional parts dynamically into the same profile 5.) Within the profile I want to add gateways, so I add a gateway tag (<gateways>) 6.) Then I add the gateways 7.) I add the closing tags
Which one of the assumptions if wrong?
I think #2 and #3 are wrong, if I understand what you're saying. Your response will override the static XML files, NOT add to them or "enhance" them
The request I receive is as follows: {"key_name"=>"name", "action"=>"directory", "tag_name"=>"configuration", "key_value"=>"sofia.conf", "controller"=>"xml_curls", "hostname"=>"freeswitch", "section"=>"configuration"}
I only answer once at startup with the follwing: <document type='freeswitch/xml'> <section name='configuration'> <configuration name='sofia.conf' description='RailsAdditionalConf'> <profile name='external'> <gateways> <gateway name="freeswitch2"> <param name="username" value="1007"/> <param name="realm" value="192.168.0.56:5061"/> <param name="password" value="xxxx"/> <param name="proxy" value="192.168.0.56"/> <param name="expire-seconds" value="30"/> <param name="register" value="true"/> <param name="register-transport" value="tls"/> <param name="retry-seconds" value="30"/> </gateway> </gateways> </profile> </configuration> </section> </document>
Does anybody have a correct XML answer for a gateway and can post it?
I wrote quite a bit of stuff that does most of the xml_curl files. sofia.conf was definitely on my list. you can find the stuff that I wrote in ${SVNROOT}/scripts/contrib/intralanman/PHP/fs_curl/ yes, it's in PHP, but it should give you enough of an idea of how to send your responses. -Ray
Best regards Peter
_______________________________________________ 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
Hello Raymond, I had a look at your code. You are submitting a complete profile for sofia.conf, right? Best regards Peter Raymond Chandler schrieb:
Peter P GMX wrote:
According to http://wiki.freeswitch.org/wiki/Mod_xml_curl I'v tried to set up gateways dynamically, but I do net get it to work: I always get : "Invalid profile"
My assumptions for a right xml answer back to FS are as follows, but I think at least one of it is false: 1. ) I start with <document type='freeswitch/xml'> <section name='configuration'> <configuration name='sofia.conf' description='RailsAdditionalConf'> 2.) I do not want to change settings, so I do NOT add a <settings> tag 3.) I want to enhance an existing profile, so I add a profile tag (<profile name='external'>) 4.) I assume that I can have an existing profile "external" in the xml conf files and can mix additional parts dynamically into the same profile 5.) Within the profile I want to add gateways, so I add a gateway tag (<gateways>) 6.) Then I add the gateways 7.) I add the closing tags
Which one of the assumptions if wrong?
I think #2 and #3 are wrong, if I understand what you're saying.
Your response will override the static XML files, NOT add to them or "enhance" them
The request I receive is as follows: {"key_name"=>"name", "action"=>"directory", "tag_name"=>"configuration", "key_value"=>"sofia.conf", "controller"=>"xml_curls", "hostname"=>"freeswitch", "section"=>"configuration"}
I only answer once at startup with the follwing: <document type='freeswitch/xml'> <section name='configuration'> <configuration name='sofia.conf' description='RailsAdditionalConf'> <profile name='external'> <gateways> <gateway name="freeswitch2"> <param name="username" value="1007"/> <param name="realm" value="192.168.0.56:5061"/> <param name="password" value="xxxx"/> <param name="proxy" value="192.168.0.56"/> <param name="expire-seconds" value="30"/> <param name="register" value="true"/> <param name="register-transport" value="tls"/> <param name="retry-seconds" value="30"/> </gateway> </gateways> </profile> </configuration> </section> </document>
Does anybody have a correct XML answer for a gateway and can post it?
I wrote quite a bit of stuff that does most of the xml_curl files. sofia.conf was definitely on my list. you can find the stuff that I wrote in ${SVNROOT}/scripts/contrib/intralanman/PHP/fs_curl/
yes, it's in PHP, but it should give you enough of an idea of how to send your responses.
-Ray
Best regards Peter
_______________________________________________ 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
Peter P GMX wrote:
Hello Raymond,
I had a look at your code. You are submitting a complete profile for sofia.conf, right?
correct. not only a profile, but the entire sofia.conf with all of its profiles and all of their gateways, settings, aliases, etc -Ray
Best regards Peter
Raymond Chandler schrieb:
Peter P GMX wrote:
According to http://wiki.freeswitch.org/wiki/Mod_xml_curl I'v tried to set up gateways dynamically, but I do net get it to work: I always get : "Invalid profile"
My assumptions for a right xml answer back to FS are as follows, but I think at least one of it is false: 1. ) I start with <document type='freeswitch/xml'> <section name='configuration'> <configuration name='sofia.conf' description='RailsAdditionalConf'> 2.) I do not want to change settings, so I do NOT add a <settings> tag 3.) I want to enhance an existing profile, so I add a profile tag (<profile name='external'>) 4.) I assume that I can have an existing profile "external" in the xml conf files and can mix additional parts dynamically into the same profile 5.) Within the profile I want to add gateways, so I add a gateway tag (<gateways>) 6.) Then I add the gateways 7.) I add the closing tags
Which one of the assumptions if wrong?
I think #2 and #3 are wrong, if I understand what you're saying.
Your response will override the static XML files, NOT add to them or "enhance" them
The request I receive is as follows: {"key_name"=>"name", "action"=>"directory", "tag_name"=>"configuration", "key_value"=>"sofia.conf", "controller"=>"xml_curls", "hostname"=>"freeswitch", "section"=>"configuration"}
I only answer once at startup with the follwing: <document type='freeswitch/xml'> <section name='configuration'> <configuration name='sofia.conf' description='RailsAdditionalConf'> <profile name='external'> <gateways> <gateway name="freeswitch2"> <param name="username" value="1007"/> <param name="realm" value="192.168.0.56:5061"/> <param name="password" value="xxxx"/> <param name="proxy" value="192.168.0.56"/> <param name="expire-seconds" value="30"/> <param name="register" value="true"/> <param name="register-transport" value="tls"/> <param name="retry-seconds" value="30"/> </gateway> </gateways> </profile> </configuration> </section> </document>
Does anybody have a correct XML answer for a gateway and can post it?
I wrote quite a bit of stuff that does most of the xml_curl files. sofia.conf was definitely on my list. you can find the stuff that I wrote in ${SVNROOT}/scripts/contrib/intralanman/PHP/fs_curl/
yes, it's in PHP, but it should give you enough of an idea of how to send your responses.
-Ray
Best regards Peter
_______________________________________________ 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
I now serve the whole sofia config from my Ruby on Rails app and the gateways now work dynamically from my database entries. Thanks to all who contributed. I updated the wiki with my experience on the issues I had on this topic. Freeswitch is so great! Best regards Peter Raymond Chandler schrieb:
Peter P GMX wrote:
According to http://wiki.freeswitch.org/wiki/Mod_xml_curl I'v tried to set up gateways dynamically, but I do net get it to work: I always get : "Invalid profile"
My assumptions for a right xml answer back to FS are as follows, but I think at least one of it is false: 1. ) I start with <document type='freeswitch/xml'> <section name='configuration'> <configuration name='sofia.conf' description='RailsAdditionalConf'> 2.) I do not want to change settings, so I do NOT add a <settings> tag 3.) I want to enhance an existing profile, so I add a profile tag (<profile name='external'>) 4.) I assume that I can have an existing profile "external" in the xml conf files and can mix additional parts dynamically into the same profile 5.) Within the profile I want to add gateways, so I add a gateway tag (<gateways>) 6.) Then I add the gateways 7.) I add the closing tags
Which one of the assumptions if wrong?
I think #2 and #3 are wrong, if I understand what you're saying.
Your response will override the static XML files, NOT add to them or "enhance" them
The request I receive is as follows: {"key_name"=>"name", "action"=>"directory", "tag_name"=>"configuration", "key_value"=>"sofia.conf", "controller"=>"xml_curls", "hostname"=>"freeswitch", "section"=>"configuration"}
I only answer once at startup with the follwing: <document type='freeswitch/xml'> <section name='configuration'> <configuration name='sofia.conf' description='RailsAdditionalConf'> <profile name='external'> <gateways> <gateway name="freeswitch2"> <param name="username" value="1007"/> <param name="realm" value="192.168.0.56:5061"/> <param name="password" value="xxxx"/> <param name="proxy" value="192.168.0.56"/> <param name="expire-seconds" value="30"/> <param name="register" value="true"/> <param name="register-transport" value="tls"/> <param name="retry-seconds" value="30"/> </gateway> </gateways> </profile> </configuration> </section> </document>
Does anybody have a correct XML answer for a gateway and can post it?
I wrote quite a bit of stuff that does most of the xml_curl files. sofia.conf was definitely on my list. you can find the stuff that I wrote in ${SVNROOT}/scripts/contrib/intralanman/PHP/fs_curl/
yes, it's in PHP, but it should give you enough of an idea of how to send your responses.
-Ray
Best regards Peter
_______________________________________________ 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
Hi, I am trying to have a webpage with a button, once clicked the dial function will happen, for this I hope we need to use mod_xml_curl. am i correct? I have gone thru the link for the configuration of mod_xml_curl http://wiki.freeswitch.org/wiki/Mod_xml_curl I want to use javascript or possibly PHP, I dont understand that where the settings like configuration, dialplan, directory and phrases has to be defined, is it in freeswitch.xml? But still ahead I have went thru with the link and configured xml_curl_conf.xml but I cant able to open the page thru webserver with http://<172.20.176.31>:8080 Is there any other configuration I need to update. On Sun, Sep 21, 2008 at 5:15 AM, Peter P GMX <Prometheus001@gmx.net> wrote:
I now serve the whole sofia config from my Ruby on Rails app and the gateways now work dynamically from my database entries.
Thanks to all who contributed. I updated the wiki with my experience on the issues I had on this topic.
Freeswitch is so great!
Best regards Peter
Raymond Chandler schrieb:
Peter P GMX wrote:
According to http://wiki.freeswitch.org/wiki/Mod_xml_curl I'v tried to set up gateways dynamically, but I do net get it to work: I always get : "Invalid profile"
My assumptions for a right xml answer back to FS are as follows, but I think at least one of it is false: 1. ) I start with <document type='freeswitch/xml'> <section name='configuration'> <configuration name='sofia.conf' description='RailsAdditionalConf'> 2.) I do not want to change settings, so I do NOT add a <settings> tag 3.) I want to enhance an existing profile, so I add a profile tag (<profile name='external'>) 4.) I assume that I can have an existing profile "external" in the xml conf files and can mix additional parts dynamically into the same profile 5.) Within the profile I want to add gateways, so I add a gateway tag (<gateways>) 6.) Then I add the gateways 7.) I add the closing tags
Which one of the assumptions if wrong?
I think #2 and #3 are wrong, if I understand what you're saying.
Your response will override the static XML files, NOT add to them or "enhance" them
The request I receive is as follows: {"key_name"=>"name", "action"=>"directory", "tag_name"=>"configuration", "key_value"=>"sofia.conf", "controller"=>"xml_curls", "hostname"=>"freeswitch", "section"=>"configuration"}
I only answer once at startup with the follwing: <document type='freeswitch/xml'> <section name='configuration'> <configuration name='sofia.conf' description='RailsAdditionalConf'> <profile name='external'> <gateways> <gateway name="freeswitch2"> <param name="username" value="1007"/> <param name="realm" value="192.168.0.56:5061"/> <param name="password" value="xxxx"/> <param name="proxy" value="192.168.0.56"/> <param name="expire-seconds" value="30"/> <param name="register" value="true"/> <param name="register-transport" value="tls"/> <param name="retry-seconds" value="30"/> </gateway> </gateways> </profile> </configuration> </section> </document>
Does anybody have a correct XML answer for a gateway and can post it?
I wrote quite a bit of stuff that does most of the xml_curl files. sofia.conf was definitely on my list. you can find the stuff that I wrote in ${SVNROOT}/scripts/contrib/intralanman/PHP/fs_curl/
yes, it's in PHP, but it should give you enough of an idea of how to send your responses.
-Ray
Best regards Peter
_______________________________________________ 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
-- Thank you with regards, Gopal,
Hi, After some modifications I am getting this log in the console, 2008-09-24 18:43:40 [ERR] mod_xml_curl.c:200 xml_url_fetch() Received HTTP error 0 trying to fetch http://localhost:8080 data: [hostname=dialer.optimus.co.in §ion=dialplan&tag_name=&key_name=&key_value=&Channel-State=CS_ROUTING&Channel-State-Number=2&Channel-Name=sofia/internal/1002%40172.20.176.31&Unique-ID=e5f89c87-4481-4d5e-aa63-3111aa357f56&Call-Direction=inbound&Answer-State=ringing&Channel-Read-Codec-Name=PCMU&Channel-Read-Codec-Rate=8000&Channel-Write-Codec-Name=PCMU&Channel-Write-Codec-Rate=8000&Caller-Username=1002&Caller-Dialplan=XML&Caller-Caller-ID-Name=FreeSwitch&Caller-Caller-ID-Number=1002&Caller-Network-Addr= 172.20.179.201 &Caller-Destination-Number=99894929942&Caller-Unique-ID=e5f89c87-4481-4d5e-aa63-3111aa357f56&Caller-Source=mod_sofia&Caller-Context=default&Caller-Channel-Name=sofia/internal/1002%40172.20.176.31&Caller-Profile-Index=1&Caller-Profile-Created-Time=1222262020162501&Caller-Channel-Created-Time=1222262020162501&Caller-Channel-Answered-Time=0&Caller-Channel-Progress-Time=0&Caller-Channel-Progress-Media-Time=0&Caller-Channel-Hangup-Time=0&Caller-Channel-Transfer-Time=0&Caller-Screen-Bit=true&Caller-Privacy-Hide-Name=false&Caller-Privacy-Hide-Number=false&variable_sip_received_ip= 172.20.179.201 &variable_sip_received_port=36046&variable_sip_authorized=true&variable_sip_mailbox=1002&variable_sip_auth_username=1002&variable_sip_auth_realm= 172.20.176.31 &variable_mailbox=1002&variable_user_name=1002&variable_domain_name= 172.20.176.31 &variable_record_stereo=true&variable_accountcode=1002&variable_user_context=default&variable_effective_caller_id_name=Extension%201002&variable_effective_caller_id_number=1002&variable_sip_from_user=1002&variable_sip_from_uri=1002%40172.20.176.31&variable_sip_from_host= 172.20.176.31 &variable_sip_from_user_stripped=1002&variable_sip_from_tag=787e3c65&variable_sofia_profile_name=internal&variable_sofia_profile_domain_name= 172.20.176.31 &variable_sip_req_user=99894929942&variable_sip_req_uri=99894929942%40172.20.176.31&variable_sip_req_host= 172.20.176.31 &variable_sip_to_user=99894929942&variable_sip_to_uri=99894929942%40172.20.176.31&variable_sip_to_host= 172.20.176.31 &variable_sip_contact_user=1002&variable_sip_contact_port=36046&variable_sip_contact_uri=1002%40172.20.179.201%3A36046&variable_sip_contact_host= 172.20.179.201 &variable_channel_name=sofia/internal/1002%40172.20.176.31&variable_sip_call_id=ad4a4b6d3211ab68MTNlOGRjN2Y0ZmYzY2I5MzJlMmE0YzMzODU1MzMyY2U.&variable_sip_user_agent=X-Lite%20release%201002tx%20stamp%2029712&variable_sip_via_host= 172.20.179.201 &variable_sip_via_port=36046&variable_sip_via_rport=36046&variable_max_forwards=70&variable_presence_id=1002%40172.20.176.31&variable_switch_r_sdp=v%3D0%0D%0Ao%3D-%200%202%20IN%20IP4%20172.20.179.201%0D%0As%3D%3CCounterPath%20eyeBeam%201.5%3E%0D%0Ac%3DIN%20IP4%20172.20.179.201%0D%0At%3D0%200%0D%0Am%3Daudio%2029188%20RTP/AVP%20107%20119%200%2098%208%203%20101%0D%0Aa%3Drtpmap%3A107%20BV32/16000%0D%0Aa%3Drtpmap%3A119%20BV32-FEC/16000%0D%0Aa%3Drtpmap%3A98%20iLBC/8000%0D%0Aa%3Drtpmap%3A101%20telephone-event/8000%0D%0Aa%3Dfmtp%3A101%200-15%0D%0Aa%3Dalt%3A1%201%20%3A%20mJ9lFB0%2B%20hEX2AklK%20172.20.179.201%2029188%0D%0Aa%3Dx-rtp-session-id%3ABE4FB81648CF4D27B19A9E3ACB1BF65D%0D%0A&variable_remote_media_ip= 172.20.179.201 &variable_remote_media_port=29188&variable_read_codec=PCMU&variable_read_rate=8000&variable_write_codec=PCMU&variable_write_rate=8000&variable_endpoint_disposition=RECEIVED] So here I the key value and the key name seems to be blank, so how to configure that, any suggestion would be helpful. Thanks On Wed, Sep 24, 2008 at 5:21 PM, Gopal krishnan <saigop@gmail.com> wrote:
Hi,
I am trying to have a webpage with a button, once clicked the dial function will happen, for this I hope we need to use mod_xml_curl. am i correct?
I have gone thru the link for the configuration of mod_xml_curl http://wiki.freeswitch.org/wiki/Mod_xml_curl
I want to use javascript or possibly PHP, I dont understand that where the settings like configuration, dialplan, directory and phrases has to be defined, is it in freeswitch.xml?
But still ahead I have went thru with the link and configured xml_curl_conf.xml but I cant able to open the page thru webserver with http://<172.20.176.31>:8080
Is there any other configuration I need to update.
On Sun, Sep 21, 2008 at 5:15 AM, Peter P GMX <Prometheus001@gmx.net>wrote:
I now serve the whole sofia config from my Ruby on Rails app and the gateways now work dynamically from my database entries.
Thanks to all who contributed. I updated the wiki with my experience on the issues I had on this topic.
Freeswitch is so great!
Best regards Peter
Raymond Chandler schrieb:
Peter P GMX wrote:
According to http://wiki.freeswitch.org/wiki/Mod_xml_curl I'v tried to set up gateways dynamically, but I do net get it to work: I always get : "Invalid profile"
My assumptions for a right xml answer back to FS are as follows, but I think at least one of it is false: 1. ) I start with <document type='freeswitch/xml'> <section name='configuration'> <configuration name='sofia.conf' description='RailsAdditionalConf'> 2.) I do not want to change settings, so I do NOT add a <settings> tag 3.) I want to enhance an existing profile, so I add a profile tag (<profile name='external'>) 4.) I assume that I can have an existing profile "external" in the xml conf files and can mix additional parts dynamically into the same profile 5.) Within the profile I want to add gateways, so I add a gateway tag (<gateways>) 6.) Then I add the gateways 7.) I add the closing tags
Which one of the assumptions if wrong?
I think #2 and #3 are wrong, if I understand what you're saying.
Your response will override the static XML files, NOT add to them or "enhance" them
The request I receive is as follows: {"key_name"=>"name", "action"=>"directory", "tag_name"=>"configuration", "key_value"=>"sofia.conf", "controller"=>"xml_curls", "hostname"=>"freeswitch", "section"=>"configuration"}
I only answer once at startup with the follwing: <document type='freeswitch/xml'> <section name='configuration'> <configuration name='sofia.conf' description='RailsAdditionalConf'> <profile name='external'> <gateways> <gateway name="freeswitch2"> <param name="username" value="1007"/> <param name="realm" value="192.168.0.56:5061"/> <param name="password" value="xxxx"/> <param name="proxy" value="192.168.0.56"/> <param name="expire-seconds" value="30"/> <param name="register" value="true"/> <param name="register-transport" value="tls"/> <param name="retry-seconds" value="30"/> </gateway> </gateways> </profile> </configuration> </section> </document>
Does anybody have a correct XML answer for a gateway and can post it?
I wrote quite a bit of stuff that does most of the xml_curl files. sofia.conf was definitely on my list. you can find the stuff that I wrote in ${SVNROOT}/scripts/contrib/intralanman/PHP/fs_curl/
yes, it's in PHP, but it should give you enough of an idea of how to send your responses.
-Ray
Best regards Peter
_______________________________________________ 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
-- Thank you with regards, Gopal,
-- Thank you with regards, Gopal,
Hello, care to paste a sample? i can't seem to find any... I'm trying to load only the <gateways>, i'm using it like this: <document type="freeswitch/xml"> <configuration name="sofia.conf" description="Gateways configuration"> <profile name="external"> <gateways> <gateway name="asterisk_1"> <param name="realm" value="1.2.3.4:5060"/> <param name="username" value="foo"/> <param name="password" value="1234"/> <param name="register" value="false"/> <param name="retry-seconds" value="30"/> </gateway> <gateway name="opensips_1"> <param name="realm" value="5.6.7.8:5060"/> <param name="username" value="foo"/> <param name="password" value="pass"/> <param name="register" value="false"/> <param name="retry-seconds" value="30"/> </gateway> </gateways> </profile> </configuration> </document> FS dumps the files correctly when i set debug on on xmo_curl... but it doesn't load the gateways... Thanks David On Sun, Sep 21, 2008 at 1:45 AM, Peter P GMX <Prometheus001@gmx.net> wrote:
I now serve the whole sofia config from my Ruby on Rails app and the gateways now work dynamically from my database entries.
Thanks to all who contributed. I updated the wiki with my experience on the issues I had on this topic.
Freeswitch is so great!
Best regards Peter
Raymond Chandler schrieb:
Peter P GMX wrote:
According to http://wiki.freeswitch.org/wiki/Mod_xml_curl I'v tried to set up gateways dynamically, but I do net get it to work: I always get : "Invalid profile"
My assumptions for a right xml answer back to FS are as follows, but I think at least one of it is false: 1. ) I start with <document type='freeswitch/xml'> <section name='configuration'> <configuration name='sofia.conf' description='RailsAdditionalConf'> 2.) I do not want to change settings, so I do NOT add a <settings> tag 3.) I want to enhance an existing profile, so I add a profile tag (<profile name='external'>) 4.) I assume that I can have an existing profile "external" in the xml conf files and can mix additional parts dynamically into the same profile 5.) Within the profile I want to add gateways, so I add a gateway tag (<gateways>) 6.) Then I add the gateways 7.) I add the closing tags
Which one of the assumptions if wrong?
I think #2 and #3 are wrong, if I understand what you're saying.
Your response will override the static XML files, NOT add to them or "enhance" them
The request I receive is as follows: {"key_name"=>"name", "action"=>"directory", "tag_name"=>"configuration", "key_value"=>"sofia.conf", "controller"=>"xml_curls", "hostname"=>"freeswitch", "section"=>"configuration"}
I only answer once at startup with the follwing: <document type='freeswitch/xml'> <section name='configuration'> <configuration name='sofia.conf' description='RailsAdditionalConf'> <profile name='external'> <gateways> <gateway name="freeswitch2"> <param name="username" value="1007"/> <param name="realm" value="192.168.0.56:5061"/> <param name="password" value="xxxx"/> <param name="proxy" value="192.168.0.56"/> <param name="expire-seconds" value="30"/> <param name="register" value="true"/> <param name="register-transport" value="tls"/> <param name="retry-seconds" value="30"/> </gateway> </gateways> </profile> </configuration> </section> </document>
Does anybody have a correct XML answer for a gateway and can post it?
I wrote quite a bit of stuff that does most of the xml_curl files. sofia.conf was definitely on my list. you can find the stuff that I wrote in ${SVNROOT}/scripts/contrib/intralanman/PHP/fs_curl/
yes, it's in PHP, but it should give you enough of an idea of how to send your responses.
-Ray
Best regards Peter
_______________________________________________ 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
I'm currently not aware of any magical xml fairy that can fill out the rest of the required config for you... so if you would see the default external profile and provide the proper settings for things like rtp-ip and sip-ip... ;) Cuz you're missing a lot of options here so I'm guessing that its not even starting the profile due to that. /b On Feb 21, 2011, at 8:56 AM, David Villasmil wrote:
<document type="freeswitch/xml"> <configuration name="sofia.conf" description="Gateways configuration">
<profile name="external">
<gateways>
<gateway name="asterisk_1"> <param name="realm" value="1.2.3.4:5060"/> <param name="username" value="foo"/> <param name="password" value="1234"/> <param name="register" value="false"/> <param name="retry-seconds" value="30"/> </gateway>
<gateway name="opensips_1"> <param name="realm" value="5.6.7.8:5060"/> <param name="username" value="foo"/> <param name="password" value="pass"/> <param name="register" value="false"/> <param name="retry-seconds" value="30"/> </gateway>
</gateways>
</profile>
</configuration> </document>
Hello Brian, It seems i didn't explain myself correctly, all sofia.xml is in xml files, except the <gateways> part. That's the only section i want loaded dynamically. os it is basically like this: FIles: sofia.conf.xml <configuration name="sofia.conf" description="sofia Endpoint"> <global_settings> <param name="log-level" value="0"/> <!-- <param name="auto-restart" value="false"/> --> <param name="debug-presence" value="0"/> </global_settings> <!-- The rabbit hole goes deep. This includes all the profiles in the sip_profiles directory that is up one level from this directory. --> <profiles> <X-PRE-PROCESS cmd="include" data="../sip_profiles/*.xml"/> </profiles> </configuration> -------------------------------------------------------------------------------- and the in sip_profiles i only have external.conf.xml: -------------------------------------------------------------------------------- <profile name="external"> <!-- http://wiki.freeswitch.org/wiki/Sofia_Configuration_Files --> <!-- This profile is only for outbound registrations to providers --> <aliases> <!-- <alias name="outbound"/> <alias name="nat"/> --> </aliases> <domains> <domain name="all" alias="false" parse="true"/> </domains> <settings> <param name="debug" value="0"/> <!-- If you want FreeSWITCH to shutdown if this profile fails to load, uncomment the next line. --> <!-- <param name="shutdown-on-fail" value="true"/> --> <param name="sip-trace" value="no"/> <param name="rfc2833-pt" value="101"/> <param name="sip-port" value="$${external_sip_port}"/> <!-- <param name="sip-port" value="5061"/> --> <param name="dialplan" value="XML"/> <param name="context" value="public"/> <param name="dtmf-duration" value="2000"/> <param name="inbound-codec-prefs" value="$${global_codec_prefs}"/> <param name="outbound-codec-prefs" value="$${outbound_codec_prefs}"/> <param name="hold-music" value="$${hold_music}"/> <param name="rtp-timer-name" value="soft"/> <!--<param name="enable-100rel" value="true"/>--> <!-- This could be set to "passive" --> <param name="local-network-acl" value="localnet.auto"/> <param name="manage-presence" value="false"/> <!-- used to share presence info across sofia profiles manage-presence needs to be set to passive on this profile if you want it to behave as if it were the internal profile for presence. --> <!-- Name of the db to use for this profile --> <!--<param name="dbname" value="share_presence"/>--> <!--<param name="presence-hosts" value="$${domain}"/>--> <!--<param name="force-register-domain" value="$${domain}"/>--> <!--all inbound reg will stored in the db using this domain --> <!--<param name="force-register-db-domain" value="$${domain}"/>--> <!-- ************************************************* --> <!--<param name="aggressive-nat-detection" value="true"/>--> <param name="inbound-codec-negotiation" value="generous"/> <param name="nonce-ttl" value="60"/> <param name="auth-calls" value="false"/> <!-- DO NOT USE HOSTNAMES, ONLY IP ADDRESSES IN THESE SETTINGS! --> <param name="rtp-ip" value="my_ip"/> <param name="sip-ip" value="my_ip"/> <param name="ext-rtp-ip" value="auto-nat"/> <param name="ext-sip-ip" value="auto-nat"/> <param name="rtp-timeout-sec" value="300"/> <param name="rtp-hold-timeout-sec" value="1800"/> <!--<param name="enable-3pcc" value="true"/>--> <!-- TLS: disabled by default, set to "true" to enable --> <param name="tls" value="$${external_ssl_enable}"/> <!-- additional bind parameters for TLS --> <param name="tls-bind-params" value="transport=tls"/> <!-- Port to listen on for TLS requests. (5081 will be used if unspecified) --> <param name="tls-sip-port" value="$${external_tls_port}"/> <!-- Location of the agent.pem and cafile.pem ssl certificates (needed for TLS server) --> <param name="tls-cert-dir" value="$${external_ssl_dir}"/> <!-- TLS version ("sslv23" (default), "tlsv1"). NOTE: Phones may not work with TLSv1 --> <param name="tls-version" value="$${sip_tls_version}"/> </settings> </profile> -------------------------------------------------------------------------------- And then the gateways.php should be loaded (if i'm correct) from the xml_curl. At lease i see the requests and responses from the curl-gateway. Thanks David On Mon, Feb 21, 2011 at 4:43 PM, Brian West <brian@freeswitch.org> wrote:
I'm currently not aware of any magical xml fairy that can fill out the rest of the required config for you... so if you would see the default external profile and provide the proper settings for things like rtp-ip and sip-ip... ;) Cuz you're missing a lot of options here so I'm guessing that its not even starting the profile due to that.
/b
On Feb 21, 2011, at 8:56 AM, David Villasmil wrote:
<document type="freeswitch/xml"> <configuration name="sofia.conf" description="Gateways configuration">
<profile name="external">
<gateways>
<gateway name="asterisk_1"> <param name="realm" value="1.2.3.4:5060"/> <param name="username" value="foo"/> <param name="password" value="1234"/> <param name="register" value="false"/> <param name="retry-seconds" value="30"/> </gateway>
<gateway name="opensips_1"> <param name="realm" value="5.6.7.8:5060"/> <param name="username" value="foo"/> <param name="password" value="pass"/> <param name="register" value="false"/> <param name="retry-seconds" value="30"/> </gateway>
</gateways>
</profile>
</configuration> </document>
_______________________________________________ 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
2011/2/21 David Villasmil <david.villasmil.work@gmail.com>
Hello Brian,
It seems i didn't explain myself correctly, all sofia.xml is in xml files, except the <gateways> part. That's the only section i want loaded dynamically.
I'm using xml curl too and AFAIK you cannot load some parts of sofia config from files and some other from xml curl request If using curl you should provide all sofia configuration through http response or (as fallback) entire configuration in static files. Massimiliano
Nobody has an idea anbout this? Peter P GMX schrieb:
According to http://wiki.freeswitch.org/wiki/Mod_xml_curl I'v tried to set up gateways dynamically, but I do net get it to work: I always get : "Invalid profile"
My assumptions for a right xml answer back to FS are as follows, but I think at least one of it is false: 1. ) I start with <document type='freeswitch/xml'> <section name='configuration'> <configuration name='sofia.conf' description='RailsAdditionalConf'> 2.) I do not want to change settings, so I do NOT add a <settings> tag 3.) I want to enhance an existing profile, so I add a profile tag (<profile name='external'>) 4.) I assume that I can have an existing profile "external" in the xml conf files and can mix additional parts dynamically into the same profile 5.) Within the profile I want to add gateways, so I add a gateway tag (<gateways>) 6.) Then I add the gateways 7.) I add the closing tags
Which one of the assumptions if wrong?
The request I receive is as follows: {"key_name"=>"name", "action"=>"directory", "tag_name"=>"configuration", "key_value"=>"sofia.conf", "controller"=>"xml_curls", "hostname"=>"freeswitch", "section"=>"configuration"}
I only answer once at startup with the follwing: <document type='freeswitch/xml'> <section name='configuration'> <configuration name='sofia.conf' description='RailsAdditionalConf'> <profile name='external'> <gateways> <gateway name="freeswitch2"> <param name="username" value="1007"/> <param name="realm" value="192.168.0.56:5061"/> <param name="password" value="xxxx"/> <param name="proxy" value="192.168.0.56"/> <param name="expire-seconds" value="30"/> <param name="register" value="true"/> <param name="register-transport" value="tls"/> <param name="retry-seconds" value="30"/> </gateway> </gateways> </profile> </configuration> </section> </document>
Does anybody have a correct XML answer for a gateway and can post it?
Best regards Peter
_______________________________________________ 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
participants (6)
-
Brian West
-
David Villasmil
-
Gopal krishnan
-
Massimiliano Ravelli
-
Peter P GMX
-
Raymond Chandler