How to set a variable for a call going from gateway?
After I read a http://wiki.freeswitch.com/wiki/Sofia.conf.xml#Variables I configured FS [root@freeswitch1 external]# more /usr/local/freeswitch/conf/sip_profiles/external/SMG-1016M.xml </include> <gateway name="SMG-1016M"> <param name="realm" value="10.10.10.1"/> <param name="register" value="false"/> <param name="caller-id-in-from" value="true"/> <param name="ping" value="25"/> <variables> <variable name="SMG-1016M_inbound_var_name" data="this_is_inbound_call" direction="inbound"/> <variable name="SMG-1016M_outbound_var_name" data="this_is_outbound_call" direction="outbound"/> <variable name="SMG-1016M_both_var_name" data="this_on_any_direction_call"/> </variables> </gateway> </include> [root@freeswitch1 external]# I insert the info application into public context of dialplanbefore a transfer application? make call but don't see variables (SMG-1016M_inbound_var_name,SMG-1016M_outbound_var_name,SMG-1016M_both_var_name) in fs_cli. I want to see variable = <gateway name="SMG-1016M"> into dialplan for each gateway in (single) external sip profile. How it to make? Vladislav Grishin
I don't think this works, at least not for unregistered gateways. You will probably need to do it like this (replace the example IP with the remote IP of the gateway); <condition field="network_addr" expression="^192\.168\.1\.1$"/> .... </condition> ________________________________ Från: freeswitch-users-bounces@lists.freeswitch.org [freeswitch-users-bounces@lists.freeswitch.org] för "Гришин В.С." [Vladislav.Grishin@vts24.ru] Skickat: den 23 mars 2012 15:02 Cc: FreeSWITCH-users@lists.freeswitch.org Ämne: [Freeswitch-users] How to set a variable for a call going from gateway? After I read a http://wiki.freeswitch.com/wiki/Sofia.conf.xml#Variables I configured FS [root@freeswitch1 external]# more /usr/local/freeswitch/conf/sip_profiles/external/SMG-1016M.xml </include> <gateway name="SMG-1016M"> <param name="realm" value="10.10.10.1"/> <param name="register" value="false"/> <param name="caller-id-in-from" value="true"/> <param name="ping" value="25"/> <variables> <variable name="SMG-1016M_inbound_var_name" data="this_is_inbound_call" direction="inbound"/> <variable name="SMG-1016M_outbound_var_name" data="this_is_outbound_call" direction="outbound"/> <variable name="SMG-1016M_both_var_name" data="this_on_any_direction_call"/> </variables> </gateway> </include> [root@freeswitch1 external]# I insert the info application into public context of dialplan before a transfer application? make call but don't see variables (SMG-1016M_inbound_var_name,SMG-1016M_outbound_var_name,SMG-1016M_both_var_name) in fs_cli. I want to see variable = <gateway name="SMG-1016M"> into dialplan for each gateway in (single) external sip profile. How it to make? Vladislav Grishin !DSPAM:4f6c816232767275610573!
CentOS5.7 include python-2.4.3 by default I install python 2.6 from sources by default into /usr/local/bin/ and change a strings in /usr/src/freeswitch.git/libs/esl/python/Makefile # more /usr/src/freeswitch.git/libs/esl/python/Makefile LOCAL_CFLAGS=`/usr/local/bin/python ./python-config --includes` LOCAL_LDFLAGS=`/usr/local/bin/python ./python-config --ldflags` SITE_DIR=$(DESTDIR)/`/usr/local/bin/python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"` and #more /usr/src/freeswitch.git/libs/esl/python/python-config #!/usr/local/bin/python SWIG 2.0.8 is also installed into /usr/local/bin/ with configure options --with-python=/usr/local/bin/python --without-python3 --without-pcre run "make pymod" into /usr/src/freeswitch.git/libs/esl directory Output is make MYLIB="../libesl.a" SOLINK="-shared -Xlinker -x" CFLAGS="-I/usr/src/freeswitch.git/libs/esl/src/include -DHAVE_EDITLINE -g -ggdb -I../../libs/libedit/src/ -fPIC -O2" CXXFLAGS="-I/usr/src/freeswitch.git/libs/esl/src/include -DHAVE_EDITLINE -g -ggdb -I../../libs/libedit/src/ -fPIC" CXX_CFLAGS="" -C python make[1]: Entering directory `/usr/src/freeswitch.git/libs/esl/python' g++ -I/usr/src/freeswitch.git/libs/esl/src/include -DHAVE_EDITLINE -g -ggdb -I../../libs/libedit/src/ -fPIC `/usr/local/bin/python ./python-config --includes` -c esl_wrap.cpp -o esl_wrap.o g++ -shared -Xlinker -x esl_wrap.o ../libesl.a `/usr/local/bin/python ./python-config --ldflags` -o _ESL.so -L. /usr/bin/ld: /usr/local/lib/python2.6/config/libpython2.6.a(abstract.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/python2.6/config/libpython2.6.a: could not read symbols: Bad value collect2: ld returned 1 exit status make[1]: *** [_ESL.so] Error 1 make[1]: Leaving directory `/usr/src/freeswitch.git/libs/esl/python' make: *** [pymod] Error 2 # /usr/bin/ld /usr/local/lib/python2.6/config/libpython2.6.a /usr/bin/ld: warning: cannot find entry symbol _start; not setting start address # file /usr/local/lib/python2.6/config/libpython2.6.a /usr/local/lib/python2.6/config/libpython2.6.a: current ar archive in what there can be a problem? Vladislav Grishin
On 04-09-12 12:36, "Гришин В.С." wrote:
/usr/bin/ld: /usr/local/lib/python2.6/config/libpython2.6.a(abstract.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
Did you see this error? ^^^ It clearly states that something was compiled without -fPIC. Try adding it. Regards, Patrick
all ok, after I add "-fPIC" into /usr/src/Python-2.6.8/Makefile ... CFLAGS= $(BASECFLAGS) -g -O2 $(OPT) $(EXTRA_CFLAGS) -fPIC ... Thanks, Vladislav Grishin
/usr/bin/ld: /usr/local/lib/python2.6/config/libpython2.6.a(abstract.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/python2.6/config/libpython2.6.a: could not read symbols: Bad value
Are you sure you have python dev packages installed . I think this has to do missing symbols for python lib which swig might need. Thanks Amit -- A-M-I-T S|S
participants (4)
-
"Гришин В.С."
-
Amit Sethi
-
Patrick Lists
-
Peter Olsson