mod_xml_radius - add new parameter to the handler
How can I add a new parameter to the accounting log in the xml_radius.conf file? I am trying to add the Freeswitch-Hangupcause to the accounting log but I am get rc_handler failure. dict attr 'Freeswitch-Hangupcause' value '13' type '1' [ERR] mod_xml_radius.c:393 mod_xml_radius: dict vend name 'Freeswitch' vendorpec '27880' [ERR] mod_xml_radius.c:555 mod_xml_radius: failed to add option with value '0' to handle [ERR] mod_xml_radius.c:1015 Failed to add params to rc_handle I have set up the parameter to hangupcause like this: <param vendor="Freeswitch" name="Freeswitch-Hangupcause" variable="var_hangup_cause" format="%s"/> What is the right way to set it? Am I doing something wrong? ps: I have add the freeswitch dictionary. Regards, Gustavo
Hi Густаво, Its probably failing in function rc_avpair_new in "libs/freeradius-client-x.x.x/lib/avpair.c" in function "rc_avpair_new". I wasnt digging deeper in the code, but try to remove the attrribtue vendor, and make sure you initialize "var_hangup_cause". <param name="Freeswitch-Hangupcause" variable="var_hangup_cause" format="%s"/> --- Tomáš Boros On 18.06.2015 08:25, Густаво Силва wrote:
How can I add a new parameter to the accounting log in the xml_radius.conf file?
I am trying to add the Freeswitch-Hangupcause to the accounting log but I am get rc_handler failure.
dict attr 'Freeswitch-Hangupcause' value '13' type '1' [ERR] mod_xml_radius.c:393 mod_xml_radius: dict vend name 'Freeswitch' vendorpec '27880' [ERR] mod_xml_radius.c:555 mod_xml_radius: failed to add option with value '0' to handle [ERR] mod_xml_radius.c:1015 Failed to add params to rc_handle
I have set up the parameter to hangupcause like this:
<param vendor="Freeswitch" name="Freeswitch-Hangupcause" variable="var_hangup_cause" format="%s"/>
What is the right way to set it?
Am I doing something wrong?
ps: I have add the freeswitch dictionary.
Regards, Gustavo
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org 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
--
hi Tomas! What do you mean "initialize" a variable? When I declare variable in xml_radius.conf, it already initializes it, doesnt it? By the way, after I have removed the vendor, now in the radius log it is showing this info: Framed-Compression = None In the xml debug, it is not showing anymore the error in the rc_handler. Is there something else that I could do to solve it? On 18.06.2015 11:10, Tomáš Boros wrote:
Hi Густаво,
Its probably failing in function rc_avpair_new in "libs/freeradius-client-x.x.x/lib/avpair.c" in function "rc_avpair_new". I wasnt digging deeper in the code, but try to remove the attrribtue vendor, and make sure you initialize "var_hangup_cause". <param name="Freeswitch-Hangupcause" variable="var_hangup_cause" format="%s"/>
--- Tomáš Boros
On 18.06.2015 08:25, Густаво Силва wrote:
How can I add a new parameter to the accounting log in the xml_radius.conf file?
I am trying to add the Freeswitch-Hangupcause to the accounting log but I am get rc_handler failure.
dict attr 'Freeswitch-Hangupcause' value '13' type '1' [ERR] mod_xml_radius.c:393 mod_xml_radius: dict vend name 'Freeswitch' vendorpec '27880' [ERR] mod_xml_radius.c:555 mod_xml_radius: failed to add option with value '0' to handle [ERR] mod_xml_radius.c:1015 Failed to add params to rc_handle
I have set up the parameter to hangupcause like this:
<param vendor="Freeswitch" name="Freeswitch-Hangupcause" variable="var_hangup_cause" format="%s"/>
What is the right way to set it?
Am I doing something wrong?
ps: I have add the freeswitch dictionary.
Regards, Gustavo
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org 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
--
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org 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
Hi "var_hangup_cause" is not a standard channel variable so it may be un-initialized. Make sure you have in your dialplan <action application="set" data="var_hangup_cause=[yourmessage]"/> Frame compression is just a compression of the radius messages. Defined in RFC 2865 - 5.13 Tomas On 18.06.2015 10:30, Густаво Силва wrote:
hi Tomas!
What do you mean "initialize" a variable? When I declare variable in xml_radius.conf, it already initializes it, doesnt it?
By the way, after I have removed the vendor, now in the radius log it is showing this info: Framed-Compression = None
In the xml debug, it is not showing anymore the error in the rc_handler.
Is there something else that I could do to solve it?
On 18.06.2015 11:10, Tomáš Boros wrote:
Hi Густаво,
Its probably failing in function rc_avpair_new in "libs/freeradius-client-x.x.x/lib/avpair.c" in function "rc_avpair_new". I wasnt digging deeper in the code, but try to remove the attrribtue vendor, and make sure you initialize "var_hangup_cause". <param name="Freeswitch-Hangupcause" variable="var_hangup_cause" format="%s"/>
--- Tomáš Boros
On 18.06.2015 08:25, Густаво Силва wrote:
How can I add a new parameter to the accounting log in the xml_radius.conf file?
I am trying to add the Freeswitch-Hangupcause to the accounting log but I am get rc_handler failure.
dict attr 'Freeswitch-Hangupcause' value '13' type '1' [ERR] mod_xml_radius.c:393 mod_xml_radius: dict vend name 'Freeswitch' vendorpec '27880' [ERR] mod_xml_radius.c:555 mod_xml_radius: failed to add option with value '0' to handle [ERR] mod_xml_radius.c:1015 Failed to add params to rc_handle
I have set up the parameter to hangupcause like this:
<param vendor="Freeswitch" name="Freeswitch-Hangupcause" variable="var_hangup_cause" format="%s"/>
What is the right way to set it?
Am I doing something wrong?
ps: I have add the freeswitch dictionary.
Regards, Gustavo
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org 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
--
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org 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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org 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
I have set my dialplan with the variable: <action application="set" data="var_hangup_cause=hello"/> <action application="log" data="var hangup '${var_hangup_cause}'"/> In the fs_cli I am seeing the variable: EXECUTE sofia/internal/1002@xxxxxxx log(var hangup 'hello') But in my radius log I didnt get it: Thu Jun 18 13:52:24 2015 h323-call-origin = "answer" Calling-Station-Id = "1008" Called-Station-Id = "1001" h323-setup-time = "2015-06-18T13:52:18.374949+0300" h323-disconnect-time = "2015-06-18T13:52:24.414957+0300" h323-disconnect-cause = "h323-disconnect-cause=1e7" Framed-Compression = None Acct-Status-Type = Stop NAS-Port = 0 Acct-Delay-Time = 0 NAS-IP-Address = 127.0.0.1 Acct-Unique-Session-Id = "ba1b9740b7d69c50" Timestamp = 1434624744 My account set up in the xml_radius file: <acct_end> <connection name="testing"> <param name="acctserver" value="127.0.0.1:1813:test"/> <param name="radius_timeout" value="10"/> <param name="radius_retries" value="0"/> <param name="radius_deadtime" value="0"/> <param name="dictionary" value="/opt/freeswitch/src/freeswitch/src/mod/xml_int/mod_xml_radius/dictionaries/dictionary"/> <param name="seqfile" value="/var/run/radius.seq"/> </connection> <fields> <param vendor="Cisco" name="h323-call-origin" variable="h323-call-origin" default="answer" format="%s"/> <param name="Calling-Station-Id" variable="sip_from_user" variable_secondary="ani" format="%s"/> <param name="Called-Station-Id" variable="destination_number" format="%s"/> <param vendor="Cisco" name="h323-setup-time"/> <param vendor="Cisco" name="h323-connect-time"/> <param vendor="Cisco" name="h323-disconnect-time"/> <param vendor="Cisco" name="h323-disconnect-cause"/> <param name="Freeswitch-Hangupcause" variable="var_hangup_cause" format="%s"/> </fields> </acct_end> On 18.06.2015 12:14, Tomáš Boros wrote:
Hi
"var_hangup_cause" is not a standard channel variable so it may be un-initialized. Make sure you have in your dialplan <action application="set" data="var_hangup_cause=[yourmessage]"/> Frame compression is just a compression of the radius messages. Defined in RFC 2865 - 5.13
Tomas
On 18.06.2015 10:30, Густаво Силва wrote:
hi Tomas!
What do you mean "initialize" a variable? When I declare variable in xml_radius.conf, it already initializes it, doesnt it?
By the way, after I have removed the vendor, now in the radius log it is showing this info: Framed-Compression = None
In the xml debug, it is not showing anymore the error in the rc_handler.
Is there something else that I could do to solve it?
On 18.06.2015 11:10, Tomáš Boros wrote:
Hi Густаво,
Its probably failing in function rc_avpair_new in "libs/freeradius-client-x.x.x/lib/avpair.c" in function "rc_avpair_new". I wasnt digging deeper in the code, but try to remove the attrribtue vendor, and make sure you initialize "var_hangup_cause". <param name="Freeswitch-Hangupcause" variable="var_hangup_cause" format="%s"/>
--- Tomáš Boros
On 18.06.2015 08:25, Густаво Силва wrote:
How can I add a new parameter to the accounting log in the xml_radius.conf file?
I am trying to add the Freeswitch-Hangupcause to the accounting log but I am get rc_handler failure.
dict attr 'Freeswitch-Hangupcause' value '13' type '1' [ERR] mod_xml_radius.c:393 mod_xml_radius: dict vend name 'Freeswitch' vendorpec '27880' [ERR] mod_xml_radius.c:555 mod_xml_radius: failed to add option with value '0' to handle [ERR] mod_xml_radius.c:1015 Failed to add params to rc_handle
I have set up the parameter to hangupcause like this:
<param vendor="Freeswitch" name="Freeswitch-Hangupcause" variable="var_hangup_cause" format="%s"/>
What is the right way to set it?
Am I doing something wrong?
ps: I have add the freeswitch dictionary.
Regards, Gustavo
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org 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
--
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org 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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org 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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org 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
Hi all, I have a pretty big problem, I fight over that last couple of weeks. I need to record video conversations that occur through frisweetch version 1.7 on Debian. I use for record mod_av. Here's a simple context <include> <extension name="from-centos"> <condition field="destination_number" expression="^(onops)$"> <action application="export" data="nolocal:absolute_codec_string=G726,PCMU,PCMA,VP8"/> <action application="set" data="hangup_after_bridge=true"/> <action application="set" data="record_concat_video=true"/> <action application="export" data="execute_on_answer=record_session $${base_dir}/recordings/${strftime(%Y%m%d_%H%M%S)}_${caller_id_number}_${destination_number}.mp4"/> <action application="answer"/> <action application="sleep" data="1000"/> <action application="bridge" data="user/1005@sip1.applicloud.com"/> </condition> </extension> </include> The problem follows. And I do not know how to solve it. If I use a global setting codecs which have opus writes only one side. If there is anything else, it writes both. But it is very strange. The sound is recorded a maximum of 19 seconds. The video itself begins somewhere in the middle. No matter how much the conversation lasted. In the console, no errors. And I do not understand how to overcome it. Any ideas? -- S pozdravem, Ing.Denis Jakovlev mob.tel. 775-415-382
Please file a JIRA with your test case, see conf/testing/dialplan/ and write up a test case, the test cases started at 6000 and skip ahead by 10 to leave space to add more per test scenario. Thanks, On Thu, Jun 18, 2015 at 7:00 AM, Denis Jakovlev <yadenis@seznam.cz> wrote:
Hi all,
I have a pretty big problem, I fight over that last couple of weeks. I need to record video conversations that occur through frisweetch version 1.7 on Debian. I use for record mod_av.
Here's a simple context
<include> <extension name="from-centos"> <condition field="destination_number" expression="^(onops)$"> <action application="export" data="nolocal:absolute_codec_string=G726,PCMU,PCMA,VP8"/> <action application="set" data="hangup_after_bridge=true"/> <action application="set" data="record_concat_video=true"/> <action application="export" data="execute_on_answer=record_session $${base_dir}/recordings/${strftime(%Y%m%d_%H%M%S)}_${caller_id_number}_${destination_number}.mp4"/> <action application="answer"/> <action application="sleep" data="1000"/> <action application="bridge" data="user/1005@sip1.applicloud.com"/> </condition> </extension> </include>
The problem follows. And I do not know how to solve it. If I use a global setting codecs which have opus writes only one side. If there is anything else, it writes both. But it is very strange. The sound is recorded a maximum of 19 seconds. The video itself begins somewhere in the middle. No matter how much the conversation lasted. In the console, no errors. And I do not understand how to overcome it.
Any ideas?
*-- S pozdravem, Ing.Denis Jakovlev mob.tel <http://mob.tel>. 775-415-382 * <http://www.freeswitch.org>
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org 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
-- *Brian West* brian@freeswitch.org *Twitter: @FreeSWITCH , @briankwest* http://www.freeswitchbook.com http://www.freeswitchcookbook.com ClueCon 2015 Call for Speakers <https://www.cluecon.com/call-for-speakers/> | Register <https://freeswitch.com/cart.php?gid=1> TODAY! | Reddit: /r/freeswitch <https://www.reddit.com/r/freeswitch> *T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378) *iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest
participants (4)
-
Brian West
-
Denis Jakovlev
-
Tomáš Boros
-
Густаво Силва