Making calls go to a correct FXS port [SOLVED!]

Discussion in 'General' started by Cidwel, May 22, 2009.

  1. Cidwel

    Joined:
    May 21, 2009
    Messages:
    31
    Likes Received:
    0
    Hi all!

    I'm a newbie at the community and specifically with the Elastix Project. I only just fought with Elastix about 3 weeks. First I want to thank to all the community and specially to o those who created the Elastix project and the Asterisk project if they are reading us here :p, cause I cannot still believe that all of us can enjoy the power of a really eficient and free VoiP destinated server.

    I tried to avoid to ask to the forum because my question is too much certainly to get RTFM answers (and i admit that). I have a server that works like a charm to use it for outgoing and incoming calls. I have a server with a FXS card with 4 ports (WCTDM/4 "Wildcard TDM400P REV I) that have been detected perfectly.

    I like to remember in advance that I have the last stable version of Elastix completly updated (yum update)

    The only thing I need to do is to config 4 trunks (one for each FXS port) that are as follows:
    - Line 1
    - Line 2 (a jumping alias for Line 1)
    - Fax
    - Cell phone Line (I want to make all the cell calls go and come in this trunk/port)

    I mean, I want to config all the landline calls to go and come from Line 1, Line 2 and fax ports and the cell ones only into the 4th port (the Cell one)

    The server works well with all the ports, i mean, the first try I did was trying to make all the cell calls and landline calls go to the same port. And I can send and receive calls with a cell phone and with a Landline phone, and only creating one trunk. I want to remember that in spain (yes, my living country) the dial rules are the following:
    - Landline: 0|9.
    - Cellphone: 0|3.

    Okay so my trouble is trying to make the cell calls go to the 4th fxs port and the landlines go to the ports 1, 2 and 3.

    I have documented but I think I didn't read enought. I think the FXS ports are configured in two ways:
    - A Control pannel in the unembedded version of FreePBX Panel
    - Zapata.conf file

    The problem is that zapata.conf files is now deprecated or something cause I think that the new config is in the dahdi-channels.conf file.

    Trying to search in the forum and in some documentation from freepbx.org I think that i've discovered that in some files I need to change the context to from-zaptel. But I don't know the files that I need to change that context (only found in dahdi-channels.conf)

    To give more info i'll show the answer from the dahdi show channels command:


    Chan Extension Context Language MOH Interpret
    pseudo default default
    1 from-zaptel default
    2 from-zaptel default
    3 from-zaptel default
    4 from-zaptel default

    Too long / Didn't read

    My trouble is that I cannot discriminate the calls in order to make the ones with the 0|9. prefix mask to go to ports 1,2 and 3 and make the ones with the 0|6. prefix mask to go to the 4th port.

    I don't know if i cannot find my answer cause the project evolves too much fast and the info is for old Elastix versions but I cannot find good info from the zapata.conf change and for the other ones that changed in Elastix 1.5

    I have another version of this post in the Spanish section that is found here:
    http://www.elastix.org/index.php?option ... 4515#24515

    Sorry if trying to doublepost in the two languages could be a nuisance and i want in advance to apologize for that.
     
  2. telecomtechnician

    Joined:
    Jan 8, 2008
    Messages:
    422
    Likes Received:
    0
    Re:Making calls go to a correct FXS port

    Hi there

    If I understand, you two things:
    1) You want an specific incoming call go directly to an specific FXS Port
    2) You want an specific outbound call go through an specific trunk

    If the above is correct, that means that you have to work with inbound and outbound routes. And you have to give a DHADHI channel DID to each trunk. You have to create a four DHADHI trunks, and each one has to be identified as a trunk group.

    Please verify that the FXS extensions work good (call from one to the other and verify that they ring).

    Waiting for your comments

    David Medina
     
  3. Cidwel

    Joined:
    May 21, 2009
    Messages:
    31
    Likes Received:
    0
    Re:Making calls go to a correct FXS port

    Yep, the four channels work well, I mean, I can change the ports to another FXS port and all works well but the four FXS ports are using the trunk g0, and I want to separate dial patterns in the four FXS ports. Something like the following routes
    - Line 1 with 0|96.
    - Line 2 with 0|93.
    - Fax .... whatever, Later I need to config that :p
    - Mobile phone with 0|6.

    All the trunks are separated as well as the outbound routes, but, the problem is that... whenever I put in the config and try to change the line to another FXS port, the only trunk that is working is the g0 one. I mean, It's like the ports are configured in this way:
    - FXS1 - g0 trunk
    - FXS2 - g0 trunk
    - FXS3 - g0 trunk
    - FXS4 - g0 trunk

    Thanks for your patience with me :p
    And... sorry for my english.
     
  4. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    Re:Making calls go to a correct FXS port

    If you need more than one group (and you do), then you must define them.

    http://www.voip-info.org/wiki/view/chan_dahdi.conf

    documents exactly how to build groups g1 and g2 (in your case) with group=1 etc in the appropriate point of the file that will give you control of your outbound use.
     
  5. Cidwel

    Joined:
    May 21, 2009
    Messages:
    31
    Likes Received:
    0
    Re:Making calls go to a correct FXS port

    Solved!

    The issue was that all the FXS ports was tryin to go to the g0 group, so I changed the configuration in

    channels-dahdi.conf (/etc/asterisk/)

    and change every FXS port in that way

    Port 1 - group 1
    Port 2 - group 2
    Port 3 - group 3
    Port 4 - group 4

    That did the trick, only created 4 trunks, every trunk configured in that way:

    Trunk 1 - group 1
    Trunk 2 - group 2
    Trunk 3 - group 3
    Trunk 4 - group 4

    and two outbound tracks:

    Out1
    0|9. (landlines in Spain) Assigned to Trunk 1

    Out2
    0|6. (mobile phones in Spain) Assigned to Trunk 2 - Trunk 3 - Trunk 4

    Many thanks to the help! It was I supose a simple base problem. Right now I have everything configured, and the IVR works too much well. Hope that solution will help to others that like me, had a simple basic problem but have all the rest working well.
     

Share This Page