zoukankan      html  css  js  c++  java
  • FreeSWITCH Cookbook

    https://www.packtpub.com/product/freeswitch-cookbook/9781849515405

    https://subscription.packtpub.com/book/networking_and_servers/9781849515405/1/ch01lvl1sec08/internal-calls

    Internal calls

    Calling local extensions is very simple once you know what needs to happen. In this case, we will review how to add a new user and make his or her phone available to be called.

    Getting ready

    If you are using the default configuration, then users 1000 through 1019 are pre-configured, both in the directory and the dialplan. To create a user outside this range, it is generally easiest to just run the add_user script, found in the FreeSWITCH source directory under scripts/perl. For example, to add the user 1020, launch this script from the FreeSWITCH source directory, specifying the user ID on the command line:

     
    scripts/perl/add_user 1020
    

    You can also specify a range of users:

     
    scripts/perl/add_user –-users=1020-1029
    

    You will see a note about how many users were added. If you have the CPAN module Regexp::Assembly installed, then the script will also generate a 'sample regular expression pattern'. For our example, we will add a range of users 1020-1029.

    How to do it...

    Follow these steps:

    1. Open the file conf/dialplan/default.xml in a text editor. Locate the Local_Extension entry:

       
    1. <extension name="Local_Extension">
        <condition field="destination_number"expression="^(10[01][09])$">
        ...
    2. Edit the expression in the <condition> tag to account for our new users. The expression pattern ^(10[012][0-9])$ will do what we need (look closely to see the difference). The new line will be as follows:

       
    3. <condition field="destination_number" expression="^(10[012][09])$">
    4. Save the file and then execute reloadxml from the fs_cli.

  • 相关阅读:
    codechef FNCS
    bzoj2653 middle
    CF698F Coprime Permutation
    CF538H Summer Dichotomy
    CF930E Coins Exhibition
    CF468D Tree
    CF528E Triangles3000
    BZOJ 4066: 简单题
    BZOJ 4300: 绝世好题
    BZOJ 4520: [Cqoi2016]K远点对
  • 原文地址:https://www.cnblogs.com/dong1/p/14096922.html
Copyright © 2011-2022 走看看