[Freeswitch-users] How to reject a call and not log it in CDRs that contains unsupported ANCII characters?
Lyubo Popov
koki.roul at gmail.com
Fri Dec 15 21:11:52 UTC 2017
Hello all,
Maybe someone can help me with this problem and will be greatly
appreciated. We are getting calls with CallerID like this one ‘hi'or‘x’='x'.
Later when our billing start parsing the CDRs it will complain because of
the first character "`". My question I suppose is, how to prevent such
calls to get added to the CDRs? We want to reject the call that has non
numeric CallerID and not get it added in the CDRs. This is what we have in
the dialplan.
<extension name="Routing">
<condition field="${radius_auth_result}" expression="0"/>
<!--
<condition field="${h323-redirect-number}" expression="^(.+)$"
break="never">
<action application="set" data="destination_number=$1" />
</condition>
-->
<condition field="caller_id_number" expression="^([0-9]+)$">
<anti-action application="hangup"/>
</condition>
<condition field="destination_number" expression="^(.+)$">
<!--<action application="info"/>-->
<action application="export"
data="nolocal:h323-call-origin=originate"/>
<action application="set"
data="sip_h_X-accountcode=${accountcode}" />
<action application="set" data="call_direction=outbound" />
<action application="set" data="hangup_after_bridge=true"/>
<action application="set" data="continue_on_fail=true"/>
<action application="set" data="inherit_codec=true" />
<action application="set" data="call_timeout=20"/>
<action application="set"
data="fail_on_single_reject=USER_BUSY" />
<action application="set"
data="origination_caller_id_name=${sip_req_user}"/>
<action application="set"
data="origination_caller_id_number=${sip_from_user}"/>
<action application="set" data="execute_on_answer=sched_hangup
+${h323-credit-time} alloted_timeout" />
<action application="bridge"
data="{sip_invite_from_uri=sip:${sip_from_user}@
${sip_network_ip}}sofia/internal/${destination_number}@x.x.x.x:5060" />
<action application="hangup" data="${bridge_hangup_cause}"/>
</condition>
</extension>
Thank you all!
L.Popov
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20171215/73fbecf4/attachment-0001.html>
More information about the FreeSWITCH-users
mailing list