failure_causes and DC code...
Looks like failure_causes do something wrong... dialplan: <context name="default"> <extension name="default"> <condition field="destination_number" expression="^\+?(.*)$"> <action application="set" data="failure_causes=17"/> <action application="bridge" data="error/normal_circuit_congestion"/> <action application="hangup" data="${last_bridge_hangup_cause}"/> </condition> </extension> </context> At sip: SIP/2.0 480 Temporarily Unavailable. Reason: Q.850;cause=16;text="NORMAL_CLEARING". Content-Length: 0. with commented <!-- <action application="set" data="failure_causes=17"/> --> at sip 503 with 34 as expected... -- Yours sincerely, Vladimir Getmanshchuk
Here is some data that may help you understand the cause code mappings in SIP: map QSIG cause codes to SIP from RFC4497 section 8.4.1 see mod_sofia.c: hangup_cause_to_sip map sip responses to QSIG cause codes ala RFC4497 section 8.4.4 see sofia_glue.c: sofia_glue_sip_cause_to_freeswitch You would also need to look at the logs, you've provided no context. On Thu, Nov 13, 2014 at 4:42 AM, Vladimir Getmanshchuk <vladget@gmail.com> wrote:
Looks like failure_causes do something wrong...
dialplan:
<context name="default">
<extension name="default">
<condition field="destination_number" expression="^\+?(.*)$">
<action application="set" data="failure_causes=17"/>
<action application="bridge" data="error/normal_circuit_congestion"/>
<action application="hangup" data="${last_bridge_hangup_cause}"/>
</condition>
</extension>
</context>
At sip:
SIP/2.0 480 Temporarily Unavailable.
Reason: Q.850;cause=16;text="NORMAL_CLEARING".
Content-Length: 0. with commented <!-- <action application="set" data="failure_causes=17"/> -->
at sip 503 with 34 as expected...
-- Yours sincerely, Vladimir Getmanshchuk
_________________________________________________________________________ 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 *T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378) *iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest
Brian, I'm really appreciated for your suggestions, but I familiar with sip cause mapping and this implementation in FS. So issue was in hangup... (or on error channels, depends on point of view) After I set failure_cause to any value (except one which includes 34) it resets default pattern of failure causes (btw. where is it in the FS code?) which include 34. So failure_cause not contain 34 and pass dialplan executing after bridge to "error/normal_circuit_congestion". After bridge executed, value of $last_bridge_hangup_cause is empty (btw. Why? I guess it should be NORMAL_CIRCUIT_CONGESTION) After was turn application called hangup which was executed with empty argument value ($last_bridge_hangup_cause is empty).. So hangup returned 480 SIP with 16 Q850 (because it is default in case in case of cause is empty) So I've resolved issue with additional condition of $last_bridge_hangup_cause variable. I guess FS should set variable last_bridge_hangup_cause and other hangup cause variables after execution of bridge to error channels like "error/normal_circuit_congestion"... On Thu, Nov 13, 2014 at 3:50 PM, Brian West <brian@freeswitch.org> wrote:
Here is some data that may help you understand the cause code mappings in SIP:
map QSIG cause codes to SIP from RFC4497 section 8.4.1
see mod_sofia.c: hangup_cause_to_sip
map sip responses to QSIG cause codes ala RFC4497 section 8.4.4
see sofia_glue.c: sofia_glue_sip_cause_to_freeswitch
You would also need to look at the logs, you've provided no context.
On Thu, Nov 13, 2014 at 4:42 AM, Vladimir Getmanshchuk <vladget@gmail.com> wrote:
Looks like failure_causes do something wrong...
dialplan:
<context name="default">
<extension name="default">
<condition field="destination_number" expression="^\+?(.*)$">
<action application="set" data="failure_causes=17"/>
<action application="bridge" data="error/normal_circuit_congestion"/>
<action application="hangup" data="${last_bridge_hangup_cause}"/>
</condition>
</extension>
</context>
At sip:
SIP/2.0 480 Temporarily Unavailable.
Reason: Q.850;cause=16;text="NORMAL_CLEARING".
Content-Length: 0. with commented <!-- <action application="set" data="failure_causes=17"/> -->
at sip 503 with 34 as expected...
-- Yours sincerely, Vladimir Getmanshchuk
_________________________________________________________________________ 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
*T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378) *iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest
_________________________________________________________________________ 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
-- Yours sincerely, Vladimir Getmanshchuk
participants (2)
-
Brian West
-
Vladimir Getmanshchuk