[Freeswitch-users] Freeswitch dialplan help
David Ponzone
david.ponzone at ipeva.fr
Wed Jun 8 10:04:41 MSD 2011
Personally, I used to do it this way:
<extension name="from_gw_to_internal">
<condition field="destination_number" expression="^(.*)$">
<action application="set" data="hangup_after_bridge=true"/>
<action application="set" data="continue_on_fail=19"/>
<action application="bridge" data="{sip_cid_type=none}sofia/gateway/gw/$1"/>
<action application="transfer" data="480to503"/>
</condition>
</extension>
<extension name="480to503">
<condition field="${proto_specific_hangup_cause}" expression="sip:480">
<action application="set" data="sip_ignore_remote_cause=true"/>
<action application="respond" data="503"/>
<action application="hangup" data="NORMAL_CIRCUIT_CONGESTION"/>
</condition>
</extension>
Of course, you would have to change continue_on_fail=19 to whatever you want, as there are several possibilities for 480.
David Ponzone Direction Technique
email: david.ponzone at ipeva.fr
tel: 01 74 03 18 97
gsm: 06 66 98 76 34
Service Client IPeva
tel: 0811 46 26 26
www.ipeva.fr - www.ipeva-studio.com
Ce message et toutes les pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisée est interdite. Tout message électronique est susceptible d'altération. IPeva décline toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié. Si vous n'êtes pas destinataire de ce message, merci de le détruire immédiatement et d'avertir l'expéditeur.
Le 08/06/2011 à 01:46, Michael Collins a écrit :
> Thanks for the tip Steve!
> -MC
>
> On Tue, Jun 7, 2011 at 4:03 PM, Steven Ayre <steveayre at gmail.com> wrote:
> Try also setting this before the bridge:
> <action application="set" data="sip_ignore_remote_cause=true"/>
>
> Without that you'll get a 34 reason but 480 sip code, with it you'll get a 34+503.
>
> -Steve
>
>
>
>
> On 7 June 2011 21:51, Eric Beard <eric at loopfx.com> wrote:
> I tried this and it does not modify the SIP response code. It seems to only affect this response header:
>
>
> Reason: Q.850;cause=34;text="NORMAL_CIRCUIT_CONGESTION"
>
>
> -----------------------
>
> Eric Z. Beard, CTO
>
> Loop LLC
>
> w (877) 850-2010 x9249
>
> m (727) 776-2768
>
> eric at loopfx.com
>
>
> From: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Stephen Wilde
> Sent: Tuesday, June 07, 2011 12:53 PM
> To: FreeSWITCH Users Help
> Subject: Re: [Freeswitch-users] Freeswitch dialplan help
>
>
> I think that something like this can work (not tested by me):
>
>
> <context name="default">
>
> <extension name="myextension">
>
> <condition>
>
> <action application="bridge" data="sofia/${Dialstring}"/>
>
> <action application="transfer" data="dohangup XML dohangup"/>
>
> </condition>
>
> </extension>
>
> </context>
>
>
> <context name="dohangup">
>
> <extension name="dohangup">
>
> <condition field="${bridge_hangup_cause}" expression="^(NO_ANSWER)$" break="on-true">
>
> <action application="hangup" data="NORMAL_CIRCUIT_CONGESTION"/>
>
> </condition>
>
> <condition>
>
> <action application="hangup" data="${bridge_hangup_cause}"/>
>
> </condition>
>
> </extension>
>
> </context>
>
>
>
> Stephen
>
>
> On Tue, Jun 7, 2011 at 6:05 PM, awais nazir <awais-nazeer at hotmail.com> wrote:
>
> Hi
>
> I want to achieve a simple scenario , after attempting a bridge in my dialplan if I get cause code 480, it should be converted to 503 to originator.
>
> <action application="bridge" data="sofia/${Dialstring}"/>
> <!--If
>
> ${hangup_cause} == "480" then ${hangup_cause}
> =503
> >
>
> Can somebody help here.
>
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110608/55e3b715/attachment.html
More information about the FreeSWITCH-users
mailing list