[Solved] calling thru ISDN working partially

  • Dear Forum,
    The incoming calls are working fine thru the defined iSDN line
    Thru routing we set up that numbers starting with 098, 01, 514 and 051 go thru ISDN line
    If I dial some number which starts with 0 i.e. 098xxxx (our mobile net), 01xxxx (calling other city) then it works, but if I dial a local number e.x. 320200 then it breaks.
    However, from the ssh session I see that it dials 051320200 instead of 320200 which I enter as the number to call, and 051320200 is indeed an invalid number.
    It is the local number with the 0+local preselection which I had to set up in the Line Configuration -> Configuration tab, as it does not allow me to save the config without these values to be defined.


    If I force the line selection by dialing **9*514728, the it works again fine.


    So how to get rid of this 051? Here is the output of ssh for one of the failed call:


    -- Executing AGI("SIP/zsoltXllite-086f8020", "agi://localhost/initdial.agi") in new stack
    -- AGI Script Executing Application: (noop) Options: (---[info]---Call from : (name) Zsolt Magyar (num) 0 (intern) 202 )
    -- AGI Script Executing Application: (Set) Options: (LANGUAGE()=de)
    -- AGI Script Executing Application: (noop) Options: (---[Info]---Call outgoing for account 1003 to 320200 )
    -- AGI Script Executing Application: (ResetCDR) Options: ()
    -- AGI Script Executing Application: (Set) Options: (EXTEN=051320200)
    -- AGI Script Executing Application: (Set) Options: (CDR(userfield)=1079)
    -- AGI Script Executing Application: (Set) Options: (CALLERID(all)=anonymous <0>)
    -- AGI Script Executing Application: (setCallerPres) Options: (PROHIB)
    -- AGI Script Executing Application: (noop) Options: (---[info]---CallerID : 0 for call over line ISDN )
    -- AGI Script Executing Application: (ResetCDR) Options: ()
    -- AGI Script Executing Application: (Set) Options: (EXTEN=051320200)
    -- AGI Script Executing Application: (noop) Options: (---[info]---Trying to place an outgoing call on line: ISDN )
    -- AGI Script Executing Application: (ChanIsAvail) Options: (ZAP/G31)
    -- Hungup 'Zap/2-1'
    -- AGI Script Executing Application: (noop) Options: (---[info]--- AvailChan: Zap/2-1 )
    -- AGI Script Executing Application: (set) Options: (AVAILCHAN="")
    -- AGI Script Executing Application: (Set) Options: (CDR(accountcode)=1)
    -- AGI Script Executing Application: (Dial) Options: (Zap/2/051320200|120|wW)
    -- Requested transfer capability: 0x00 - SPEECH
    -- Called 2/051320200
    -- Zap/2-1 is proceeding passing it to SIP/zsoltXllite-086f8020
    -- Channel 0/2, span 1 got hangup request, cause 3
    -- Channel 0/2, span 1 received AOC-E charging 0 units
    -- Hungup 'Zap/2-1'
    == Everyone is busy/congested at this time (1:0/0/1)
    -- AGI Script Executing Application: (noop) Options: (---[info]---Dial returned status: CHANUNAVAIL )
    -- AGI Script agi://localhost/initdial.agi completed, returning 0
    -- Executing Hangup("SIP/zsoltXllite-086f8020", "") in new stack
    == Spawn extension (international, 320200, 2) exited non-zero on 'SIP/zsoltXllite-086f8020'

  • Hi,


    to get things clear :)


    Your areacode is ?
    Your countrycode is ?


    For example


    Our areacode is 0721
    Our countrycode is 0049
    One local number could be 12345


    which would result in following valid numbers


    004972112345


    OR


    072112345


    OR


    12345



    Similar to the celluar-network 12345 is not a valid number for voip-trunks. If a user dials a local number starface inserts the localareacode. New number would be 072112345.




    If i understand you correct:


    in your case 051 is not your localarea code ? What country are you from ? Maybe that would help clear some things.



    greeting


    jcohen

    Zitat

    Im Leben eines jeden Büromenschen gibt es drei einschneidende Ereignisse: Erstens einen Wechsel des Vorgesetzten, zweitens den Tod der Topfpflanze und drittens eine neue Telefonanlage.

  • We are from Croatia
    The country code is 00385, the areacode is 051, one local number could be 320200


    However, in Croatia if you dial from the fix network 0038551320200 it fails, as well as 051320200. Only 320200 is valid.
    If you dial from mobile network in croatia then both 0038551320200 and 051320200 are valid numbers, but not from fix.


    Hope this helps.
    Zsolt

  • hi,


    thanks for clearing some things ;) now i know what you need. But i'm not sure if i can really help, but lets try.


    - you could go to the advanced settings in the admin menu.
    - in the textfield with the name "macro-definition" enter something like.


    Code
    [specialservice]
    
    
    exten => _XXXXXX,1,Goto(international,**8*${EXTEN},1)


    this line has the following effect, if someone dials an number with six digits it automatically sets the **8* in front of the number. (which would work for you)


    what the _XXXXXX, stands for:


    "_" starts a kind of regular expression
    "X" would be a digit from 0-9
    "." would be at least one digit but as many as the user likes.
    [3-9] would be an number from 3 to 9.


    some examples:


    Code
    exten =>  _123XXX,1,.... numbers from 123000 to 123999
    exten =>  _[2-4]XX,1,.... numbers from 200 to 400
    exten =>  _X.,1,.... any Number with at least 2 digits



    so if your local numbers are from 5 to 6 digits long and the first digit is between 3 and 9, you would need something like the following:


    Code
    [specialservice]
    
    
    exten => _[3-9]XXXX,1,Goto(international,**8*${EXTEN},1)
    exten => _[3-9]XXXXX,1,Goto(international,**8*${EXTEN},1)


    greetings



    jochen

    Zitat

    Im Leben eines jeden Büromenschen gibt es drei einschneidende Ereignisse: Erstens einen Wechsel des Vorgesetzten, zweitens den Tod der Topfpflanze und drittens eine neue Telefonanlage.

  • Hi jochen, it does work, although I do not understand why is this hack necessary, I guess it is because in "normal" or better to say, other countries, dialing the city code as prefix to the phone number even when calling local, i.e from the same city, is OK.
    Thanks so far, we are getting closer and closer to the real implementation.
    Zsolt

  • Hi Jochen, now that we managed to make it work completely on our single number ISDN line I would like to move the box to our productive ISDN lines. Sadly it does not work there, so I again need help from you.
    Let me describe our setup the best I can:
    We have 3 NT boxes. 1 is a single number NT with number 320110. This is the one we testetd with so far, and this now works perfect.
    The other two ISDN lines are both entering into our Lucent switchbox and all I know is that we have external numbers 320200-320219. These are the numbers one can dial from outside and they will be forwarded by our switchbox to the appropriate internal number (which are in fact 200-219). What I just learned is that these are DID connections i.e. single device and not multidevice connections, so at least this seems to be sure.
    The Icon in the ISDN external -> line allocation is green so at least this seems to be OK


    But when I try to dial something which goes thru ISDN line it does not work. I get "service is not available" message, and the asterisk trace shows:
    == Everyone is busy/congested at this time (1:1/0/0)

    I tried to configure the ISDN Exernal -> number area as single number, entering 320200, this is how it works on 320110, but it does not work here.
    I also tried to configure it as Number block and then enter 320 for number and 200 to 219 for number area, or 3202 for number and 00 to 19 for number area, but nothing works.


    Also it is not visible that the starface is reacting on icoming calls, like it was visible on the other line when one would call 320110. It shows no activity whatsoever although I know that our lines are most of the time active (we are a helpdesk, after all)


    The messages which are coming up periodically and are probably connected to our line activityes are:
    Aug 21 11:08:08 WARNING[9739]: chan_zap.c:8800 zt_pri_error: 1 !! Got S-frame while link down
    Aug 21 11:08:28 WARNING[9739]: chan_zap.c:8800 zt_pri_error: 1 !! Got a UA, but i'm in state 0
    Aug 21 11:10:45 WARNING[9739]: chan_zap.c:8800 zt_pri_error: 1 !! Got I-frame while link state 0


    Where could we start from to troubleshoot this issue?
    Thanks a lot in advance and sorry for long post
    Zsolt

  • hi,



    could you try


    cat /proc/zaptel/*


    and show us the log ?


    what typ of connection did you use for your isdn cards ?


    Device Connection would be the single line with the one number.
    You should try Multi-device Connection for the "new" isdn lines.


    greetings


    jochen

    Zitat

    Im Leben eines jeden Büromenschen gibt es drei einschneidende Ereignisse: Erstens einen Wechsel des Vorgesetzten, zweitens den Tod der Topfpflanze und drittens eine neue Telefonanlage.

  • here is the log:
    Span 1: ZTHFC1 "HFC-S PCI A ISDN card 0 [TE] layer 1 DEACTIVATED (F4)" AMI/CCS


    1 ZTHFC1/0/1 Clear (In use)
    2 ZTHFC1/0/2 Clear (In use)
    3 ZTHFC1/0/3 HDLCFCS (In use)
    on the test ISDN line I used single device connection and single number as it indeed has only one number (320110), on the productive ISDN line I tried both, did not work, but as I said a guy who set up our tel switchbox claims that it is a DID type of connection.
    BTW I have only one ISDN card in the PC box and I plug it in obviously only into one of the two "multiplexed" ISDN NTs. If I try to plug it in into the second one then the line icon does not turn green but stays on yellow, so I decided not to test with that ISDN NT at all. The output I sent you is from when the ISDN card is plugged in into NT box with which the line icon turns green.
    Hope this helps
    Zsolt

  • Ok, we've solved the problem.


    Zsolt did mix up his NTs and so there were no incoming calls although there should be some incoming calls ;)


    Philipp

    Gruß / Regards
    Philipp

  • Hi Philipp and the forum,
    First of all, sorry for not keeping this topic clean, there are actually two setups and issues handled in the same thread. The first issue was fixed with the macro.


    The second issue was not fixed with "unmixing" the NTs, in fact the first problem was that on the same NT in case of point to point ISDN setup, it is no allowed (possible) that at the same time the Starface and the Hardware switchbox are connected. It seems that in most of the cases the HW switchbox will pick up incomming call and it never reaches the starface. So first we had to unplug the HW switchbox from NT in which the starface was plugged in. After that indeed we figured out that we are monitoring the wrong NT, so switching them finally resolved it all.
    Just my two cents.
    Zsolt

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!