How to use variables in console/event socket
Hello, I don't know how to use variables in console. I try to call local user with following commands. Command: originate sofia/internal/1001%${domain} 9999 I get: Cannot locate registered user 1001@%{domain} Command: originate sofia/internal/1001@${domain} 9999 I get: Cannot locate registered user 1001@@{domain} Command: originate sofia/internal/1001%\${domain} 9999 I get: Cannot locate registered user 1001@\%{domain} Substitution of $ sign is not understood for me. Is it possible to use variables in that channels? Variable is defined: freeswitch@vertux> global_getvar domain API CALL [global_getvar(domain)] output: 192.168.77.248 Szymon O.
Variables aren't expanded on the command line. You'll have to put exactly what you want in. /b On Apr 21, 2009, at 3:48 AM, Szymon Olko wrote:
Substitution of $ sign is not understood for me. Is it possible to use variables in that channels? Variable is defined:
freeswitch@vertux> global_getvar domain API CALL [global_getvar(domain)] output: 192.168.77.248
Brian West brian@freeswitch.org -- Meet us at ClueCon! http://www.cluecon.com
if you update to r13101 or better you can use the new expand function to do it expand originate sofia/internal/1001%${domain} 9999 On Tue, Apr 21, 2009 at 8:27 AM, Brian West <brian@freeswitch.org> wrote:
Variables aren't expanded on the command line. You'll have to put exactly what you want in. /b
On Apr 21, 2009, at 3:48 AM, Szymon Olko wrote:
Substitution of $ sign is not understood for me. Is it possible to use variables in that channels? Variable is defined:
freeswitch@vertux> global_getvar domain API CALL [global_getvar(domain)] output: 192.168.77.248
Brian West brian@freeswitch.org
-- Meet us at ClueCon! http://www.cluecon.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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
Or if you specifically want to avoid inputting the domain in an originate to an internal profile, you can bind a sip profile to a domain e.g., <profile name="internal" domain="$${domain}"> (in sip_profiles/internal.xml) then you can do: originate sofia/internal/1001 9999 Dan On Tue, Apr 21, 2009 at 10:59 AM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
if you update to r13101 or better you can use the new expand function to do it
expand originate sofia/internal/1001%${domain} 9999
On Tue, Apr 21, 2009 at 8:27 AM, Brian West <brian@freeswitch.org> wrote:
Variables aren't expanded on the command line. You'll have to put exactly what you want in. /b
On Apr 21, 2009, at 3:48 AM, Szymon Olko wrote:
Substitution of $ sign is not understood for me. Is it possible to use variables in that channels? Variable is defined:
freeswitch@vertux> global_getvar domain API CALL [global_getvar(domain)] output: 192.168.77.248
Brian West brian@freeswitch.org
-- Meet us at ClueCon! http://www.cluecon.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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
_______________________________________________ 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 (4)
-
Anthony Minessale
-
Brian West
-
Dan Le
-
Szymon Olko