FS weekly 2010 11 24

From FreeSWITCH Wiki
Jump to: navigation, search

Contents

Calling Instructions

Wednesday November 24th at 1700 UTC (1200 CST / 1pm EST)
sip:888@conference.freeswitch.org or via the good old PSTN at +1-919-386-9900
gtalk:conf+888@conference.freeswitch.org Or click on this link
Or call Skype the skype user "skypiax5", you'll be automatically connected (max 20 concurrent users).
Codecs: PCMU/PCMA, G.722, CELT, Speex, Skype, among others
Press 0 to mute/unmute your self. Press * to deaf/undeaf.

  • What are the Beeps in the conference? One Beep - someone has joined, two beeps - someone has left.

Agenda

Please add agenda items as needed. If you have a question you'd like to ask then edit the Items Needing Discussion section below. Be sure to put your name/nick on your question.


News, Notes, & Miscellaneous Fun Stuff

  • Cookbook update
    • New utility script: add_user

Featured Presentation

  • Community hooha

Upcoming Presentations

  • All Open - Please let me (MSC) or NormT know if you have a topic or idea.

Questions For Developers

  • Add your questions here

Items Needing Discussion

  • Correction on using eval...
eval uuid:<uuid> ${channel-state}

Example:

eval uuid:e72aff5c-6838-49a8-98fb-84c90ad840d9 ${channel-state}
CS_EXECUTE


Question from Steve:

I am attempting to use the dialplan ring_ready and sleep applications as follows (from my public.xml file):

 <extension name="foo">
   <condition field="destination_number" expression="5551234567">
     <action application="ring_ready" />
     <action application="sleep" data="30000"/>
     <action application="hangup" data="NO_ANSWER"/>
   </condition>
  </extension>

My intent is to have the incoming call in the ring state for up to 30 seconds, during which time I would like to issue API commands from my custom application (which is using the event socket interface) to transfer the call to various places.

The issue that I'm having is that the sleep seems to be non-interruptible. If I try to issue a uuid_transfer command to transfer the sleeping channel somewhere, it seems the sleep timer has to expire before it will transfer. Similarly, if the caller disconnects, the channel stays around until the sleep timer expires, and then it is destroyed.

Is there some way to wake a sleeping channel out of sleep? I've looked for anything obvious and tried a number of things to no avail. Alternately, is there a better way to approach this?

 <extension name="foo">
   <condition field="destination_number" expression="5551234567">
     <action application="pre_answer" />
     <action application="fifo" data="myqueue in /tmp/exit-message.wav /tmp/music-on-hold.wav"/> 
     <action application="hangup" data="NO_ANSWER"/>
   </condition>
  </extension>

Janitorial Items

  • Add items here

Items Needing Documentation

  • Add items here

Stuff started but needs some community input

  • Add items here

Stuff yet to be documented

  • New sip profile param and chan var: manual-rtp-bugs and manual_rtp_bugs for our friends at Sonus (commit msg)

User Tips & Tricks

If you have something you'd like to share with the community then by all means add it here and we will give you a few minutes on the conference call to discuss it!

Who's in your wallet?

With the growing number of SIP attacks on the rise, a lot of people are worried about their exposure to toll fraud. A simple way of protecting
your wallet would be to limit the number of outbound calls your system can place using the dial plan. If one your extension get compromised
your attacker can only do so much damage per day.

  <extension name="domestic.VoiceNetwork.ca">
    <condition field="${toll_allow}" expression="domestic"/>
    <condition field="destination_number" expression="^(\d{11})$">
      <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/>
      <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/>

    <!-- Only allow 4 simultaneous call -->
      <action application="limit" data="hash fraud_protection calls_max 4 !NORMAL_TEMPORARY_FAILURE"/>

    <!-- Only allow 250 calls per day -->
      <action application="limit" data="hash fraud_protection call_per_day 250/86400 !NORMAL_TEMPORARY_FAILURE"/>

      <action application="bridge" data="sofia/gateway/VoiceNetwork/$1"/>
    </condition>
  </extension>

If you're not doing a lot of international calls why not limit the number of calls per day, the maximum duration of any call, and
the number of simultaneous calls.

  <extension name="international.VoiceNetwork.ca">
    <condition field="${toll_allow}" expression="international"/>
    <condition field="destination_number" expression="^(011\d+)$">
      <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/>
      <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/>

      <!-- Limit the Call duration to 30 minutes per call, set lower if you need to -->
      <action application="sched_hangup" data="+1800 alloted_timeout"/>

      <!-- Only allow 1 simultaneous call -->
      <action application="limit" data="hash fraud_protection calls_max_intl 1 !NORMAL_TEMPORARY_FAILURE"/>

      <!-- Only allow 10 calls per day -->
      <action application="limit" data="hash fraud_protection call_per_day_intl 10/86400 !NORMAL_TEMPORARY_FAILURE"/>
      <action application="bridge" data="sofia/gateway/VoiceNetwork/$1"/>
    </condition>
  </extension>

If you wanted to expand on this you could add variables to your user registrations this would allow you to set limits
for each registered user. Here is an example for user 1001.xml

  <user id="1001">
    <params>
      <param name="password" value="$${default_password}"/>
      <param name="vm-password" value="1001"/>
    </params>
    <variables>
      <variable name="toll_allow" value="domestic,international,local"/>

      <!-- Set your Limits outbound call limits here for International calls -->
      <variable name="calls_max_intl" value="1"/>
      <variable name="call_per_day_intl" value="3"/>

      <variable name="accountcode" value="1001"/>
      <variable name="user_context" value="default"/>
      <variable name="effective_caller_id_name" value="Extension 1001"/>
      <variable name="effective_caller_id_number" value="1001"/>
      <variable name="outbound_caller_id_name" value="$${outbound_caller_name}"/>
      <variable name="outbound_caller_id_number" value="$${outbound_caller_id}"/>
      <variable name="callgroup" value="techsupport"/>
    </variables>
  </user>

And your new international dialplan would have variables instead of hard coded values, and
you could change the limits on a per user bases.

  <extension name="international.VoiceNetwork.ca">
    <condition field="${toll_allow}" expression="international"/>
    <condition field="destination_number" expression="^(011\d+)$">
      <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/>
      <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/>

      <!-- Limit the Call duration to 30 minutes per call, set lower if you need to -->
      <action application="sched_hangup" data="+1800 alloted_timeout"/>

      <!-- Only allow 1 simultaneous call -->
      <action application="limit" data="hash fraud_protection calls_max_intl ${calls_max_intl} !NORMAL_TEMPORARY_FAILURE"/>

      <!-- Only allow 10 calls per day -->
      <action application="limit" data="hash fraud_protection call_per_day_intl ${call_per_day_intl}/86400 !NORMAL_TEMPORARY_FAILURE"/>
      <action application="bridge" data="sofia/gateway/VoiceNetwork/$1"/>
    </condition>
  </extension>
  • I haven't tried these dial plans, if you find an error please correct it.

- NormT - www.VoiceNetwork.ca

Suggestions For Future Meetings & Future To Dos

  • Math: Sofia internals

Presenters Needed For These Topics

  • SIP 101 (beginning SIP, how does it work, how to look at different SIP packets)
  • mod_shout/shoutcast, esp with one-way conferences for scalability
  • Codec negotiation - early vs. late, why you need it, how to do it
  • T.38 - what it is, how to use it, etc.
  • Multi-tenancy (bounties welcome)

FreeSWITCH High Availability Testing

Weekly FreeSWITCH High Availability testing during the conference call. At the end of the weekly conference call the lead developer of FreeSWITCH (anthm) will intentionally crash and restart the conference server. This tests the high Availability that is built into FreeSWITCH. Your call should continue once the server is restarted.

Depending on what type of NAT device will determine if your call is "Re-Invited" back to the conference.

Need SIP Trunking or DIDs?

If you are looking for SIP Trunking, Origination or Termination please visit www.VoiceNetwork.ca

  • Unlimited Incoming DIDs from $3.95
  • Per Minute DIDs from $0.99 @ 0.01 per minute
  • Outbound Canadian Termination from $0.005 and USA from $ 0.0125

See Also

Return to main meeting page