IAX2 TRUNK TO PSTN GATEWAY

Discussion in 'General' started by billis33, May 6, 2009.

  1. billis33

    Joined:
    May 6, 2009
    Messages:
    26
    Likes Received:
    0
    Hello
    I have 2 boxes A=OFFICE B=HOME
    Box B has a PSTN gateway with 2 FXO. At this box i dial 9 (number) and i use the 1st FXO and 8 (number) and i use the 2nd FXO

    I have managed to connect these 2 boxes with an IAX2 TRUNK and i can call the extensions to each other. What i would like to do is to able to use the PSTN Gateway which is in Box B (Home) through this IAX2 TRUNK from Box A (Office). I have searched but could not find anything that is why i am writing here. Any help would be great. Thank you

    Here is my configuration.

    Box A (Office)
    Trunk Name: HomeGw

    Dial Rules: NXX.

    PEER DETAILS

    disallow=all
    allow=ulaw&g726
    host=Box B Ip
    qualify=yes
    secret=xx
    type=peer
    username=xx

    INCOMING SETTINGS

    USER CONTEXT xx
    INCOMING SETTINGS

    disallow=all
    allow=ulaw&g726
    context=from-internal
    qualify=yes
    host=Box B Ip
    secret=xx
    type=user

    Register String

    xx:xx@Box B IP /xx

    Outbound route for this is
    Dial Pattern 2XX ( In Box B (home) i use 200 series extensions) and trunk sequence IAX2/HomeGw


    Box B (Home)
    Trunk Name: OfficeGw

    Dial Rules: NXX.

    PEER DETAILS

    disallow=all
    allow=ulaw&g726
    host=Box A Ip
    qualify=yes
    secret=xx
    type=peer
    username=xx

    INCOMING SETTINGS

    USER CONTEXT xx
    INCOMING SETTINGS

    disallow=all
    allow=ulaw&g726
    context=from-internal
    qualify=yes
    host=Box A Ip
    secret=xx
    type=user

    Register String

    xx:xx@Box A IP /xx

    Outbound route for this is
    Dial Pattern 1|1XX ( In Box A (office) i use 100 series extensions) and trunk sequence IAX2/OfficeGw
     
  2. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    Try

    type=friend

    at both ends of the trunk and set an outbound route on box A that sends the calls to the outside world through that trunk and any necessary dial-rules on BOX B to rewrite these dialing patterns out through the external trunk
     
  3. billis33

    Joined:
    May 6, 2009
    Messages:
    26
    Likes Received:
    0
    I am sorry, i do not understand what to do...
     
  4. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    That's ok,

    On BOX A for example an extension dials 7<and some more digits>, then build an outbound route to send that call through the Inter Office trunk (with a dial rule = "7." ) when that call arrives at BOX B the context is from-internal so asterisk considers the call just like it came from a local extension. Add an outbound route with a dial rule 7|. (which strips the original 7 from the string) and send it to your outbound IAX2 PSTN trunk. The type=friend is ok here as the trunk is in effect internal to your system so no security is needed. so dialing 712125551212 from an extension on BOX A will send a call to 12125551212 on the IAX2 trunk on BOX B. You can subtract leading digits from dialled strings in the outbound route or the trunk dial rules, you can add leading digits in the trunk itself, so play with the numbering plan to suit your needs.

    I choose here to strip the 7 at the point of egress (BOX B ) as you are using extensions that start with 1 and I am used to North American Dialing, but that's another story :)
     
  5. billis33

    Joined:
    May 6, 2009
    Messages:
    26
    Likes Received:
    0
    This is what i get from the home box

    The 2111206640 is the number which i am calling. and 8 is the prefix i am having for the 2nd line...


    -- Accepting AUTHENTICATED call from Ip Address:
    > requested format = ulaw,
    > requested prefs = (ulaw|g726),
    > actual format = ulaw,
    > host prefs = (ulaw|g726),
    > priority = mine
    -- Executing [82111206640@from-trunk:1] Set("IAX2/xxxis-10855", "__FROM_DID=82111206640") in new stack
    -- Executing [2111206640@from-trunk:2] NoOp("IAX2/xx-10855", "Received an unknown call with DID set to 82111206640") in new stack
    -- Executing [2111206640@from-trunk:3] Goto("IAX2/xx-10855", "s|a2") in new stack
    -- Goto (from-trunk,s,2)
    -- Executing [s@from-trunk:2] Answer("IAX2/xx-10855", "") in new stack
    -- Executing [s@from-trunk:3] Wait("IAX2/xx-10855", "2") in new stack
    -- Executing [s@from-trunk:4] Playback("IAX2/xx-10855", "ss-noservice") in new stack
    -- <IAX2/xx-10855> Playing 'ss-noservice' (language 'en')
    -- Executing [s@from-trunk:5] SayAlpha("IAX2/xx-10855", "2111206640") in new stack
    -- <IAX2/xx-10855> Playing 'digits/2' (language 'en')
    -- <IAX2/xx-10855> Playing 'digits/1' (language 'en')
    -- <IAX2/xx-10855> Playing 'digits/1' (language 'en')
    -- <IAX2/xx-10855> Playing 'digits/1' (language 'en')
    -- <IAX2/xx-10855> Playing 'digits/2' (language 'en')
    -- <IAX2/xx-10855> Playing 'digits/0' (language 'en')
    -- <IAX2/xx-10855> Playing 'digits/6' (language 'en')
    -- <IAX2/xx-10855> Playing 'digits/6' (language 'en')
    -- <IAX2/xx-10855> Playing 'digits/4' (language 'en')
    -- <IAX2/xx-10855> Playing 'digits/0' (language 'en')
    -- Executing [s@from-trunk:6] Hangup("IAX2/xx-10855", "") in new stack
    == Spawn extension (from-trunk, s, 6) exited non-zero on 'IAX2/xx-10855'
    -- Executing [h@from-trunk:1] Hangup("IAX2/xx-10855", "") in new stack
    == Spawn extension (from-trunk, h, 1) exited non-zero on 'IAX2/xx-10855'
    -- Hungup 'IAX2/xx-10855'
     
  6. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    To clarify

    What do you dial to get an external line on an extension on the Home Box, and how are your current PSTN outbound trunk(s) defined?
    Please explain exactly what you want to dial what you on the Office Box hoping to route it to the Home Gateway.
     
  7. billis33

    Joined:
    May 6, 2009
    Messages:
    26
    Likes Received:
    0
    a) On Home Box i have 2 lines. i have an open vox card with 2 FXO (these are connected to FRITZ BOX) and 2 FXS and there are connected 2 analog phones. Also i have 2 SIP Phones connected and some other IAX extensions for remote connection.

    I have gone to Zap Channel DID and there i have added my numbers
    Also i have added a second zap trunk (g1)

    then i have edited the

    chan_dahdi.conf and i have put context=from-zaptel

    dahdi.conf.replaced_for_elastix and i have put context=from-pstn

    dahdi-channels.conf and i have put

    Line 1 1st FXO
    group=0
    context=from-zaptel
    channel => 1.

    Line 2 2nd FXO
    group=1
    context=from-zaptel
    channel => 2.

    At outbound routes i have put for the 1st line dial patterns 9|. and trunk sequence ZAP/g0
    and for the 2nd line dial patterns 8|. and trunk sequence ZAP/g1


    For the inbound routes i have added the DID Number of every line and i have forwarded them to the the SIP Phones.

    b) I want from the Office Box to make outbound calls through the Home Box and especially through ZAP/g1. I want to dial a prefix on Office Box like lets say 8|. and then through this IAX trunk and through ZAP/g1 from Home Box to make this call. What i want is to dial from Office Box 82111206640 and this to be "translated" on Home Box as 82111206640 which means that this number will be called from ZAP/g1 as the prefix for the 2nd line is 8.

    I hope you understood what i want to do :)
     
  8. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    Then just route 8XXXXXXX. calls from the office to the the Home box through the Inter-Office that's all. similaryly for 9XXXXXX. the Home Box will take care of the routing as if the call was local
    (under this scenario no digit modification is needed)
     
  9. billis33

    Joined:
    May 6, 2009
    Messages:
    26
    Likes Received:
    0
    This is what i get after adding 8XXXXXX.

    -- Accepting AUTHENTICATED call from XX:
    > requested format = ulaw,
    > requested prefs = (ulaw|g726),
    > actual format = ulaw,
    > host prefs = (ulaw|g726),
    > priority = mine
    -- Executing [82111206640@from-trunk:1] Set("IAX2/XX-7348", "__FROM_DID=82111206640") in new stack
    -- Executing [82111206640@from-trunk:2] NoOp("IAX2/XX-7348", "Received an unknown call with DID set to 82111206640") in new stack
    -- Executing [82111206640@from-trunk:3] Goto("IAX2/XX-7348", "s|a2") in new stack
    -- Goto (from-trunk,s,2)
    -- Executing [s@from-trunk:2] Answer("IAX2/XX-7348", "") in new stack
    -- Executing [s@from-trunk:3] Wait("IAX2/XX-7348", "2") in new stack
    -- Executing [s@from-trunk:4] Playback("IAX2/XX-7348", "ss-noservice") in new stack
    -- <IAX2/XX-7348> Playing 'ss-noservice' (language 'en')
    -- Executing [s@from-trunk:5] SayAlpha("IAX2/XX-7348", "82111206640") in new stack
    -- <IAX2/XX-7348> Playing 'digits/8' (language 'en')
    -- <IAX2/XX-7348> Playing 'digits/2' (language 'en')
    -- <IAX2/XX-7348> Playing 'digits/1' (language 'en')
    -- <IAX2/XX-7348> Playing 'digits/1' (language 'en')
    -- <IAX2/XX-7348> Playing 'digits/1' (language 'en')
    -- <IAX2/XX-7348> Playing 'digits/2' (language 'en')
    -- <IAX2/XX-7348> Playing 'digits/0' (language 'en')
    -- <IAX2/XX-7348> Playing 'digits/6' (language 'en')
    -- <IAX2/XX-7348> Playing 'digits/6' (language 'en')
    -- <IAX2/XX-7348> Playing 'digits/4' (language 'en')
    -- <IAX2/XX-7348> Playing 'digits/0' (language 'en')
    -- Executing [s@from-trunk:6] Hangup("IAX2/XX-7348", "") in new stack
    == Spawn extension (from-trunk, s, 6) exited non-zero on 'IAX2/XX-7348'
    -- Executing [h@from-trunk:1] Hangup("IAX2/XX-7348", "") in new stack
    == Spawn extension (from-trunk, h, 1) exited non-zero on 'IAX2/XX-7348'
    -- Hungup 'IAX2/XX-7348'


    It does not go to zap/g1
     
  10. billis33

    Joined:
    May 6, 2009
    Messages:
    26
    Likes Received:
    0
    I fixed it. I put after 8 ten X since the number consists of 10 digits and its working now, i tested it also with 9 and its also working. Thanks a lot for you help :)
     
  11. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    Good,

    If you noticed there was a period"." at the end of my dialstring that is a "wildcard" and means "any number of digits to follow" but if your dialplan is "closed" i.e. all numbers are the same length then it is better to be specific as you have been.
     
  12. billis33

    Joined:
    May 6, 2009
    Messages:
    26
    Likes Received:
    0
    I have tested this configuration at home with 2 boxes at the same LAN and everything was working. But when i tried to test this from Office through Internet it is not working. What am i doing wrong??
     
  13. billis33

    Joined:
    May 6, 2009
    Messages:
    26
    Likes Received:
    0
    I get again the same error and it gets the number i wish to call as a DID number ,not using the caller id of the office extension and not go to ZAP/g1

    -- Accepting AUTHENTICATED call from xxx:
    > requested format = ulaw,
    > requested prefs = (ulaw|g726),
    > actual format = ulaw,
    > host prefs = (ulaw|g726),
    > priority = mine
    -- Executing [82111206640@from-trunk:1] Set("IAX2/xx-1307", "__FROM_DID=82111206640") in new stack
    -- Executing [82111206640@from-trunk:2] NoOp("IAX2/xx-1307", "Received an unknown call with DID set to 82111206640") in new stack
    -- Executing [82111206640@from-trunk:3] Goto("IAX2/xx-1307", "s|a2") in new stack
    -- Goto (from-trunk,s,2)
    -- Executing [s@from-trunk:2] Answer("IAX2/xx-1307", "") in new stack
    -- Executing [s@from-trunk:3] Wait("IAX2/xx-1307", "2") in new stack
    -- Remote UNIX connection disconnected
    -- Executing [s@from-trunk:4] Playback("IAX2/xx-1307", "ss-noservice") in new stack
    -- <IAX2/xx-1307> Playing 'ss-noservice' (language 'en')
    -- Executing [s@from-trunk:5] SayAlpha("IAX2/xx-1307", "82111206640") in new stack
    -- <IAX2/xx-1307> Playing 'digits/8' (language 'en')
    -- <IAX2/xx-1307> Playing 'digits/2' (language 'en')
    -- <IAX2/xx-1307> Playing 'digits/1' (language 'en')
    -- <IAX2/xx-1307> Playing 'digits/1' (language 'en')
    -- <IAX2/xx-1307> Playing 'digits/1' (language 'en')
    -- <IAX2/xx-1307> Playing 'digits/2' (language 'en')
    -- <IAX2/xx-1307> Playing 'digits/0' (language 'en')
    == Spawn extension (from-trunk, s, 5) exited non-zero on 'IAX2/xx-1307'
    -- Executing [h@from-trunk:1] Hangup("IAX2/xx-1307", "") in new stack
    == Spawn extension (from-trunk, h, 1) exited non-zero on 'IAX2/xx-1307'
    -- Hungup 'IAX2/xx-1307'
     
  14. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    82111206640 is the DID number to expect, but it's context is in from-trunk, this needs to be changed to from-internal in the inbound trunk settings (your original posting I seem to remember was like that, maybe not, it should be in the inbound section (user-context = from-internal) as the normal outbound routes aren't available to the from-trunk context. Then you need to make sure that there is an outbound route for that dial pattern that uses the ZAP trunks as a higher priority than the IAX trunk.



    the:-
    -- Executing [s@from-trunk:4] Playback("IAX2/xx-1307", "ss-noservice" in new stack
    -- <IAX2/xx-1307> Playing 'ss-noservice' (language 'en'
    would indivcate that there is no such route available.
     
  15. billis33

    Joined:
    May 6, 2009
    Messages:
    26
    Likes Received:
    0
    I changed the context but again it is not working and again i get the same results in asterisk cli...
     
  16. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    It still says:-

    -- Executing [82111206640@from-trunk:1] Set("IAX2/xx-1307", "__FROM_DID=82111206640" in new stack
    -- Executing [82111206640@from-trunk:2] NoOp("IAX2/xx-1307",

    after you set the context of the trunk the call comes in on to from-internal ?
    is this from the home box or the office box?

    lets try a screen shot of two of the relevant trunks.

    and athew output of

    cat /etc/asterisk/zapata.conf
    or
    /etc/asterisk/dahdi-channels.conf
    if you are using 1.5
     
  17. billis33

    Joined:
    May 6, 2009
    Messages:
    26
    Likes Received:
    0
    I changed at home box the prefix for the second line from 8 to 5


    Office Box

    -- Executing [52111206640@from-internal:1] Set("SIP/150-08b5d1f0", "INTRACOMPANYROUTE=YES") in new stack
    -- Executing [52111206640@from-internal:2] Macro("SIP/150-08b5d1f0", "user-callerid|SKIPTTL|") in new stack
    -- Executing [s@macro-user-callerid:1] Set("SIP/150-08b5d1f0", "AMPUSER=150") in new stack
    -- Executing [s@macro-user-callerid:2] GotoIf("SIP/150-08b5d1f0", "0?report") in new stack
    -- Executing [s@macro-user-callerid:3] ExecIf("SIP/150-08b5d1f0", "1|Set|REALCALLERIDNUM=150") in new stack
    -- Executing [s@macro-user-callerid:4] Set("SIP/150-08b5d1f0", "AMPUSER=150") in new stack
    -- Executing [s@macro-user-callerid:5] Set("SIP/150-08b5d1f0", "AMPUSERCIDNAME=zeuspbx") in new stack
    -- Executing [s@macro-user-callerid:6] GotoIf("SIP/150-08b5d1f0", "0?report") in new stack
    -- Executing [s@macro-user-callerid:7] Set("SIP/150-08b5d1f0", "AMPUSERCID=150") in new stack
    -- Executing [s@macro-user-callerid:8] Set("SIP/150-08b5d1f0", "CALLERID(all)="zeuspbx" <150>") in new stack
    -- Executing [s@macro-user-callerid:9] Set("SIP/150-08b5d1f0", "REALCALLERIDNUM=150") in new stack
    -- Executing [s@macro-user-callerid:10] ExecIf("SIP/150-08b5d1f0", "0|Set|CHANNEL(language)=") in new stack
    -- Executing [s@macro-user-callerid:11] GotoIf("SIP/150-08b5d1f0", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,20)
    -- Executing [s@macro-user-callerid:20] NoOp("SIP/150-08b5d1f0", "Using CallerID "zeuspbx" <150>") in new stack
    -- Executing [52111206640@from-internal:3] Set("SIP/150-08b5d1f0", "_NODEST=") in new stack
    -- Executing [52111206640@from-internal:4] Macro("SIP/150-08b5d1f0", "record-enable|150|OUT|") in new stack
    -- Executing [s@macro-record-enable:1] GotoIf("SIP/150-08b5d1f0", "1?check") in new stack
    -- Goto (macro-record-enable,s,4)
    -- Executing [s@macro-record-enable:4] AGI("SIP/150-08b5d1f0", "recordingcheck|20090508-175528|1241794528.130") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
    recordingcheck|20090508-175528|1241794528.130: Outbound recording not enabled
    -- AGI Script recordingcheck completed, returning 0
    -- Executing [s@macro-record-enable:5] MacroExit("SIP/150-08b5d1f0", "") in new stack
    -- Executing [52111206640@from-internal:5] Macro("SIP/150-08b5d1f0", "dialout-trunk|3|52111206640||") in new stack
    -- Executing [s@macro-dialout-trunk:1] Set("SIP/150-08b5d1f0", "DIAL_TRUNK=3") in new stack
    -- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/150-08b5d1f0", "0?sub-pincheck|s|1") in new stack
    -- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/150-08b5d1f0", "0?disabletrunk|1") in new stack
    -- Executing [s@macro-dialout-trunk:4] Set("SIP/150-08b5d1f0", "DIAL_NUMBER=52111206640") in new stack
    -- Executing [s@macro-dialout-trunk:5] Set("SIP/150-08b5d1f0", "DIAL_TRUNK_OPTIONS=tr") in new stack
    -- Executing [s@macro-dialout-trunk:6] Set("SIP/150-08b5d1f0", "OUTBOUND_GROUP=OUT_3") in new stack
    -- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/150-08b5d1f0", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,9)
    -- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/150-08b5d1f0", "1?skipoutcid") in new stack
    -- Goto (macro-dialout-trunk,s,12)
    -- Executing [s@macro-dialout-trunk:12] ExecIf("SIP/150-08b5d1f0", "1|AGI|fixlocalprefix") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
    -- AGI Script fixlocalprefix completed, returning 0
    -- Executing [s@macro-dialout-trunk:13] Set("SIP/150-08b5d1f0", "OUTNUM=52111206640") in new stack
    -- Executing [s@macro-dialout-trunk:14] Set("SIP/150-08b5d1f0", "custom=IAX2/spitigw") in new stack
    -- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/150-08b5d1f0", "0|Set|DIAL_TRUNK_OPTIONS=M(setmusic^)tr") in new stack
    -- Executing [s@macro-dialout-trunk:16] Macro("SIP/150-08b5d1f0", "dialout-trunk-predial-hook|") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/150-08b5d1f0", "") in new stack
    -- Executing [s@macro-dialout-trunk:17] GotoIf("SIP/150-08b5d1f0", "0?bypass|1") in new stack
    -- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/150-08b5d1f0", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:19] Dial("SIP/150-08b5d1f0", "IAX2/spitigw/52111206640|300|tr") in new stack
    -- Called HomeGw/52111206640
    -- Call accepted by xx (format ulaw)
    -- Format for call is ulaw
    -- IAX2/HomeGw-14506 answered SIP/150-08b5d1f0
    -- Executing [h@macro-dialout-trunk:1] Macro("SIP/150-08b5d1f0", "hangupcall|") in new stack
    -- Executing [s@macro-hangupcall:1] ResetCDR("SIP/150-08b5d1f0", "vw") in new stack
    -- Executing [s@macro-hangupcall:2] NoCDR("SIP/150-08b5d1f0", "") in new stack
    -- Executing [s@macro-hangupcall:3] GotoIf("SIP/150-08b5d1f0", "1?skiprg") in new stack
    -- Goto (macro-hangupcall,s,6)
    -- Executing [s@macro-hangupcall:6] GotoIf("SIP/150-08b5d1f0", "1?skipblkvm") in new stack
    -- Goto (macro-hangupcall,s,9)
    -- Executing [s@macro-hangupcall:9] GotoIf("SIP/150-08b5d1f0", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,11)
    -- Executing [s@macro-hangupcall:11] Hangup("SIP/150-08b5d1f0", "") in new stack
    == Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/150-08b5d1f0' in macro 'hangupcall'
    == Spawn h extension (macro-dialout-trunk, h, 1) exited non-zero on 'SIP/150-08b5d1f0'
    -- Hungup 'IAX2/HomeGw-14506'
    == Spawn extension (macro-dialout-trunk, s, 19) exited non-zero on 'SIP/150-08b5d1f0' in macro 'dialout-trunk'
    == Spawn extension (from-internal, 52111206640, 5) exited non-zero on 'SIP/150-08b5d1f0'


    Home Box

    -- Accepting AUTHENTICATED call from xx:
    > requested format = ulaw,
    > requested prefs = (ulaw|g726),
    > actual format = ulaw,
    > host prefs = (ulaw|g726),
    > priority = mine
    -- Executing [52111206640@from-trunk:1] Set("IAX2/xxxxx-5086", "__FROM_DID=52111206640") in new stack
    -- Executing [52111206640@from-trunk:2] NoOp("IAX2/xxxxx-5086", "Received an unknown call with DID set to 52111206640") in new stack
    -- Executing [52111206640@from-trunk:3] Goto("IAX2/xxxxx-5086", "s|a2") in new stack
    -- Goto (from-trunk,s,2)
    -- Executing [s@from-trunk:2] Answer("IAX2/xxxxx-5086", "") in new stack
    -- Executing [s@from-trunk:3] Wait("IAX2/xxxxx-5086", "2") in new stack
    -- Executing [s@from-trunk:4] Playback("IAX2/xxxxx-5086", "ss-noservice") in new stack
    -- <IAX2/xxxxx-5086> Playing 'ss-noservice' (language 'en')
    == Spawn extension (from-trunk, s, 4) exited non-zero on 'IAX2/xxxxx-5086'
    -- Executing [h@from-trunk:1] Hangup("IAX2/xxxxx-5086", "") in new stack
    == Spawn extension (from-trunk, h, 1) exited non-zero on 'IAX2/xxxxx-5086'
    -- Hungup 'IAX2/xxxxx-5086'



    cat /etc/asterisk/dahdi-channels.conf

    ; Autogenerated by /usr/sbin/dahdi_genconf on Thu Mar 26 20:37:29 2009 -- do not hand edit
    ; Dahdi Channels Configurations (chan_dahdi.conf)
    ;
    ; This is not intended to be a complete chan_dahdi.conf. Rather, it is intended
    ; to be #include-d by /etc/chan_dahdi.conf that will include the global settings
    ;

    ; Span 1: WCTDM/4 "Wildcard TDM400P REV E/F Board 5" (MASTER)
    ;;; line="1 WCTDM/4/0 FXSKS (EC: OSLEC)"
    signalling=fxs_ks
    callerid=asreceived
    group=0
    context=from-zaptel
    channel => 1
    callerid=
    group=
    context=default

    ;;; line="2 WCTDM/4/1 FXSKS (EC: OSLEC)"
    signalling=fxs_ks
    callerid=asreceived
    group=1
    context=from-zaptel
    channel => 2
    callerid=
    group=
    context=default

    ;;; line="3 WCTDM/4/2 FXOKS (EC: OSLEC)"
    signalling=fxo_ks
    callerid="Channel 3" <4003>
    mailbox=4003
    group=5
    context=from-internal
    channel => 3
    callerid=
    mailbox=
    group=
    context=default

    ;;; line="4 WCTDM/4/3 FXOKS (EC: OSLEC)"
    signalling=fxo_ks
    callerid="Channel 4" <4004>
    mailbox=4004
    group=5
    context=from-internal
    channel => 4
    callerid=
    mailbox=
    group=
    context=default
     
  18. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    On the Home machine, again please post the trunk parameters for

    IAX2/xxxxx

    (as in -- Executing [52111206640@from-trunk:1] Set("IAX2/xxxxx-5086", "__FROM_DID=52111206640" in new stack)
     
  19. jaschenck

    Joined:
    Apr 19, 2009
    Messages:
    50
    Likes Received:
    0
    this is what I have going and it works I am providing a screen from this side. The person in the other office is in the field at the moment so I can't get a screen from that box

    this box registers with that one since that side has a static IP

    Later today I will provide more details [​IMG]
     
  20. billis33

    Joined:
    May 6, 2009
    Messages:
    26
    Likes Received:
    0
    Box B (Home)
    Trunk Name: OfficeGw

    Dial Rules: NXX.

    PEER DETAILS

    disallow=all
    allow=ulaw&g726
    host=Box A Ip
    qualify=yes
    secret=xx
    type=peer
    username=xx

    INCOMING SETTINGS

    USER CONTEXT xx
    INCOMING SETTINGS

    disallow=all
    allow=ulaw&g726
    context=from-trunk
    qualify=yes
    host=Box A Ip
    secret=xx
    type=user

    Register String

    xxx@Box A IP /xx
     

Share This Page