Results 1 to 1 of 1

Thread: Trunking Issue?

  1. #1
    gbove Guest

    Default Trunking Issue?

    I'll describe my setup first.

    1 pika warp running the latest image of GUI 2.0.
    -extension range 3xxx
    -SIP trunk to asterisk

    1 asterisk box running 1.4 and freepbx 2.4
    -extension range 2xxx
    -SIP trunk to pika

    I'm trying to get both PBXs to place nice together as if they were one system.

    Everything was pretty straight forward, but I had a couple issues, and I had to hack something to make it work. I'm not sure if this is a short comming of Asterisk GUI 2.0 or Pika's port of it. I'm just throwing it out there to see if this is somthing fixable.

    1) caller-id coming from the asterisk to the pika

    In order to make this work, I had to use the file manager to change the context that all my calls from the asterisk landed in, from the default one to the class of service all my extensions were in.

    There should be an option in the Incoming Call Rules menu to route a call to a specific context.

    2) caller-id coming from the pika to the asterisk

    This one I haven't figured out yet. If I put anything into the From User field inside Trunks, thats what comes as the caller-id num with Asterisk as the name when I dial over that trunk. If I leave that field blank, the username/extension shows up as "Asterisk"<Asterisk>.

    I'd like the Name/Extension of that extension to show up, and no matter what I put for the settings in my extension, it never does.


    edit///

    Got #2 working. You have to edit the context macro-trunkdial-failover-0.3

    You will see the following
    Code:
    exten = s,1,Set(CALLERID(num)=${IF($[${LEN(${CID_${CALLERID(num)}})} > 6]?${CID_${CALLERID(num)}}:)})
    exten = s,n,GotoIf($[${LEN(${CALLERID(num)})} > 6]?1-dial,1)
    exten = s,n,Set(CALLERID(all)=${IF($[${LEN(${CID_${ARG3}})} > 6]?${CID_${ARG3}}:${GLOBAL_OUTBOUNDCID})})
    exten = s,n,Goto(1-dial,1)
    exten = 1-dial,1,Dial(${ARG1})
    exten = 1-dial,n,Gotoif(${LEN(${ARG2})} > 0 ?1-${DIALSTATUS},1:1-out,1)
    exten = 1-CHANUNAVAIL,1,Dial(${ARG2})
    exten = 1-CHANUNAVAIL,n,Hangup()
    exten = 1-CONGESTION,1,Dial(${ARG2})
    exten = 1-CONGESTION,n,Hangup()
    exten = 1-out,1,Hangup()
    You want to change the it to the follow

    Code:
    exten = s,1,Set(CALLERID(num)=${IF($[${LEN(${CID_${CALLERID(num)}})} > 2]?${CID_${CALLERID(num)}}:)})
    exten = s,n,GotoIf($[${LEN(${CALLERID(num)})} > 2]?1-dial,1)
    exten = s,n,Set(CALLERID(all)=${IF($[${LEN(${CID_${ARG3}})} > 2]?${CID_${ARG3}}:${GLOBAL_OUTBOUNDCID})})
    exten = s,n,Goto(1-dial,1)
    exten = 1-dial,1,Dial(${ARG1})
    exten = 1-dial,n,Gotoif(${LEN(${ARG2})} > 0 ?1-${DIALSTATUS},1:1-out,1)
    exten = 1-CHANUNAVAIL,1,Dial(${ARG2})
    exten = 1-CHANUNAVAIL,n,Hangup()
    exten = 1-CONGESTION,1,Dial(${ARG2})
    exten = 1-CONGESTION,n,Hangup()
    exten = 1-out,1,Hangup()
    On lines 1, 2, and 3 its checking to see if the caller id num is greater then 6, your changing it to check for less then 2 characters. Since most extensions will be greater then 2 digits, this should work for most. If you have less, then make that number smaller.
    Last edited by gbove; 02-09-09 at 03:40 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •