Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Asterisk with a GSM Gateway.

Options
  • 24-03-2006 3:16pm
    #1
    Registered Users Posts: 2,393 ✭✭✭


    Clever me. I have a Wildcard TDM400P (4xFXo ports) in my Asterisk server, and I thought I'd hook up a GSM gateway (Telecom GSMRoute+, dual SIM) to 2 of the ports, and make cheap landline to mobile calls, by diverting all mobile calls out through these 2 SIMs.

    All installed and setup, and I make a call. Asterisk server hands the call off to the GSM gateway, and it connects me.

    Disco! Now instead of 15c per minute from landline, I'm paying 8c per minute (my O2-O2 rate).

    The problem is that if I hang up the first call. The GSM gateway doesn't detect this, and keeps ringing. Only resetting the device allows another call to be made. If I plug a standard phone into the port of the GSM gateway, I can dial, hang up, dial and so forth without issue. It seems to be able to spot a phone going on hook, and knows to terminate the call. Plugged into any FXO port, it doesn't.

    Another oddity is that when I plug both lines into FXO ports, FXO port 1 is detected as "off-hook" by the GSM gateway. If this port is in use, then FXO port 2 uses the second SIM, no problem. Again, once this call is finished, the GSM gateway doesn't detect the FXO port as having hung up.

    I've tried all kinds of things in ZAPATA.CONF and ZAPTEL.CONF, to no avail.

    Anyone got any ideas?


Comments

  • Registered Users Posts: 1,193 ✭✭✭liamo


    Just a thought ...

    Is the GSM Gateway <--> TDM400P an FXO <--> FXO arrangement?

    Is that even allowed? Should it not be FXS <--> FXO ?

    Like I said , just a thought. (I'm an Asterisk hobbyist not a Telecomms engineer so don't slate me if I'm wrong ;))

    Regards,

    Liam


  • Registered Users Posts: 2,393 ✭✭✭Jaden


    TDM400P has FXO ports using FXS signaling. I think this is correct, but I have a mental block about FXO/FXS.


  • Registered Users Posts: 651 ✭✭✭sirlinux


    does your gsm gateway do polarity reversal? thats the easiest way, otherwise try configuring progress detection for busy tones. Havent tried one of these yet but they look good.

    http://www.junghanns.net/en/GSM-PCI_produkt.html

    Also there are some nice gsm -> sip gateways that do the business, digital -> analog -> digital can be messy.


  • Closed Accounts Posts: 2,630 ✭✭✭Blaster99


    The GSM gateway has FXS ports or it wouldn't work with a phone. An FXO port emulates on/off hook and expects a dial-tone. FXS provides dialtone and waits for off-hook type of thing. So in principle it should work. I have never done it so you might need to cross some cables or something.

    I've incidently thought of looking into a GSM gateway for Asterisk or whatever. I would perhaps have expected something along the lines of that German stuff you linked to, which does it all in one go. It seems very difficult to get prices for this stuff. How much does this kind of kit cost?


  • Registered Users Posts: 14,331 ✭✭✭✭jimmycrackcorm


    This is interesting - I have a load of GSM modems - can I connect them to asterisk to perform mobile out calls?


  • Advertisement
  • Registered Users Posts: 1,340 ✭✭✭bhickey


    This is interesting - I have a load of GSM modems - can I connect them to asterisk to perform mobile out calls?

    If you can plug an analogue handset into them and dial out then you should also be able to attach them to an FXO port in an Asterisk server and do the same thing.


  • Registered Users Posts: 651 ✭✭✭sirlinux


    This is interesting - I have a load of GSM modems - can I connect them to asterisk to perform mobile out calls?

    if they have sound on them yes... but it's not that straight forward.


  • Registered Users Posts: 2,393 ✭✭✭Jaden


    The device does polarity reversal (and it's on, with a 200ms pulse), but the GSM gateway doesn't seem to "hang up" when a call finishes. It's only when you either power cycle it, or plug in a phone and hook/unhook it that it sets itself to take calls again on the port. It seems to me that the Asterisk server isn't telling the GSM gateway that the call is finished.

    The GSM gateway I'm using is dual SIM, and only costs a couple of hundred quid. Some solutions I've seen are more like two grand, so I'm gonna plug away at this thing for a while yet.

    Someone must have seen an issue like this before.

    My Zapata.conf:
    signalling=fxs_ks
    rxwink=100
    callprogress=yes
    busydetect=yes
    hanguponpolarityswitch

    My Zaptel.conf:
    # Span 1: WCTDM/0 "Wildcard TDM400P REV E/F Board 1"
    fxsks=1
    fxsks=2
    fxsks=3
    fxsks=4

    I'll post a progress report if I get anywhere. At the cost of one of these GSM gateways, I pays for itself in a couple of weeks.....


  • Closed Accounts Posts: 2,630 ✭✭✭Blaster99


    Yes, do let us know. I'm interested in setting up something similar.


  • Registered Users Posts: 651 ✭✭✭sirlinux


    change as follows and give it a try

    hanguponpolarityswitch=yes
    busycount=4 (or try 2 if your a bit mad)
    progzone=uk (dont think this actually work with anything but us tones....)

    is the card seeing the polarity reversal? sounds maybe like an impedance setting problem, whats your gsm gateway set for? and your tdm card?


  • Advertisement
  • Registered Users Posts: 651 ✭✭✭sirlinux


    woops, hit submnit a bit early
    you need to mess with the opermode= parameter when you modprobe wctdm
    modprobe wctdm opermode=
    see wctdm.c for the list of countries
    also make sure etc/zaptel.conf is setup properly


  • Registered Users Posts: 2,393 ✭✭✭Jaden


    After several hours of mucking about, I found out that my GSM Gateway uses Loopstart to detect clear down. So I've dumped Kewlstart for Loopstart.

    Still no joy. Keep plugging away.....

    I'll trying some of the suggestions posted by Stephen.

    Here are my configs thus far:


    Zapata.conf

    echocancel=yes
    echocancelwhenbridged=yes
    echotraining=400
    callerid=asreceived

    signalling=fxs_ls
    group=0
    context=from-pstn
    answeronpolarityswitch=yes
    hanguponpolarityswitch=yes
    callprogress=yes
    busydetect=yes
    busycount=4
    channel => 1-4

    Zapata-auto.conf

    ; Span 1: WCTDM/0 "Wildcard TDM400P REV E/F Board 1"
    signalling=fxs_ls
    ; Note: this is a trunk. Create a ZAP trunk in AMP for Channel 1
    context=from-pstn
    group=0
    channel => 1

    signalling=fxs_ls
    ; Note: this is a trunk. Create a ZAP trunk in AMP for Channel 2
    context=from-pstn
    group=0
    channel => 2

    signalling=fxs_ls
    ; Note: this is a trunk. Create a ZAP trunk in AMP for Channel 3
    context=from-pstn
    group=0
    channel => 3

    signalling=fxs_ls
    ; Note: this is a trunk. Create a ZAP trunk in AMP for Channel 4
    context=from-pstn
    group=0
    channel => 4


    ; Span 2: ZTDUMMY/1 "ZTDUMMY/1 1"



    Zaptel.conf:

    # Span 1: WCTDM/0 "Wildcard TDM400P REV E/F Board 1"
    fxsls=1
    fxsls=2
    fxsls=3
    fxsls=4

    # Span 2: ZTDUMMY/1 "ZTDUMMY/1 1"

    # Global data

    loadzone = uk
    defaultzone = uk


Advertisement