[Freeswitch-users] Continue dialplan execution on 503,	NOT on early media.
    peely 
    freeswitch at peely.com
       
    Thu Nov  8 19:49:35 MSK 2012
    
    
  
So after widening my forum searching, and suspecting I might need to script
something I copied a similar issue with USER_BUSY responses.
I've created a lua script which hangs up if the content disposition is
early_media:
endpoint_disposition = session:getVariable("endpoint_disposition");
if (endpoint_disposition == "EARLY MEDIA") then
    session:hangup();
end
Then, added it to my dial plan:
    <extension name="to carrier">
        <condition field="${sip_to_params}" expression="tgrp=carrier"/>
        <condition field="destination_number" expression="^(.+)">
            <action application="set" data="bypass_media=true"/>
            <action application="set"
data="continue_on_fail=NORMAL_TEMPORARY_FAILURE"/>
            <action application="set"
data="fail_on_single_reject=!NORMAL_TEMPORARY_FAILURE"/>
            <action application="set" data="hangup_after_bridge=true"/>
            <action application="bridge"
data="sofia/gateway/carrier1/+$1|sofia/gateway/carrier2/+$1|sofia/gateway/carrier3/+$1"/>
            *<action application="lua" data="killearlymedia.lua"/>*
            <action application="sleep" data="2000"/>
            <action application="bridge"
data="sofia/gateway/carrier1/+$1|sofia/gateway/carrier2/+$1|sofia/gateway/carrier3/+$1"/>
        </condition>
    </extension>
This seems to do what I need.
Neil.
--
View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Continue-dialplan-execution-on-503-NOT-on-early-media-tp7584423p7584433.html
Sent from the freeswitch-users mailing list archive at Nabble.com.
    
    
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list