I can't make outgoing external calls

Discussion in 'General' started by alfgarcas, Nov 6, 2010.

  1. alfgarcas

    Joined:
    Nov 6, 2010
    Messages:
    12
    Likes Received:
    0
    Hi,

    I have just registered my SIP trunk.
    If I type "sip show registry" or "sip show peers", it's all well registered.
    I can receive external calls, and can make and receive internal calls.
    I followed the manual that was given by my provider, but I don't understand why can not make external outgoing calls.

    That's the log:

    == Using SIP RTP TOS bits 184
    == Using SIP RTP CoS mark 5
    -- Executing [617848484@from-internal:1] Macro("SIP/100-0000000a", "user-callerid,SKIPTTL,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("SIP/100-0000000a", "AMPUSER=100") in new stack
    -- Executing [s@macro-user-callerid:2] GotoIf("SIP/100-0000000a", "0?report") in new stack
    -- Executing [s@macro-user-callerid:3] ExecIf("SIP/100-0000000a", "1?Set(REALCALLERIDNUM=100)") in new stack
    -- Executing [s@macro-user-callerid:4] Set("SIP/100-0000000a", "AMPUSER=100") in new stack
    -- Executing [s@macro-user-callerid:5] Set("SIP/100-0000000a", "AMPUSERCIDNAME=100") in new stack
    -- Executing [s@macro-user-callerid:6] GotoIf("SIP/100-0000000a", "0?report") in new stack
    -- Executing [s@macro-user-callerid:7] Set("SIP/100-0000000a", "AMPUSERCID=100") in new stack
    -- Executing [s@macro-user-callerid:8] Set("SIP/100-0000000a", "CALLERID(all)="100" <100>") in new stack
    -- Executing [s@macro-user-callerid:9] ExecIf("SIP/100-0000000a", "1?Set(CHANNEL(language)=es)") in new stack
    -- Executing [s@macro-user-callerid:10] GotoIf("SIP/100-0000000a", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,19)
    -- Executing [s@macro-user-callerid:19] NoOp("SIP/100-0000000a", "Using CallerID "100" <100>") in new stack
    -- Executing [617848484@from-internal:2] Set("SIP/100-0000000a", "_NODEST=") in new stack
    -- Executing [617848484@from-internal:3] Macro("SIP/100-0000000a", "record-enable,100,OUT,") in new stack
    -- Executing [s@macro-record-enable:1] GotoIf("SIP/100-0000000a", "1?check") in new stack
    -- Goto (macro-record-enable,s,4)
    -- Executing [s@macro-record-enable:4] ExecIf("SIP/100-0000000a", "0?MacroExit()") in new stack
    -- Executing [s@macro-record-enable:5] GotoIf("SIP/100-0000000a", "0?Group:OUT") in new stack
    -- Goto (macro-record-enable,s,15)
    -- Executing [s@macro-record-enable:15] GotoIf("SIP/100-0000000a", "0?IN") in new stack
    -- Executing [s@macro-record-enable:16] ExecIf("SIP/100-0000000a", "1?MacroExit()") in new stack
    -- Executing [617848484@from-internal:4] Macro("SIP/100-0000000a", "dialout-trunk,2,617848484,,") in new stack
    -- Executing [s@macro-dialout-trunk:1] Set("SIP/100-0000000a", "DIAL_TRUNK=2") in new stack
    -- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/100-0000000a", "0?sub-pincheck,s,1") in new stack
    -- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/100-0000000a", "0?disabletrunk,1") in new stack
    -- Executing [s@macro-dialout-trunk:4] Set("SIP/100-0000000a", "DIAL_NUMBER=617848484") in new stack
    -- Executing [s@macro-dialout-trunk:5] Set("SIP/100-0000000a", "DIAL_TRUNK_OPTIONS=tr") in new stack
    -- Executing [s@macro-dialout-trunk:6] Set("SIP/100-0000000a", "OUTBOUND_GROUP=OUT_2") in new stack
    -- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/100-0000000a", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,9)
    -- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/100-0000000a", "0?skipoutcid") in new stack
    -- Executing [s@macro-dialout-trunk:10] Set("SIP/100-0000000a", "DIAL_TRUNK_OPTIONS=") in new stack
    -- Executing [s@macro-dialout-trunk:11] Macro("SIP/100-0000000a", "outbound-callerid,2") in new stack
    -- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/100-0000000a", "0?Set(CALLERPRES()=)") in new stack
    -- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/100-0000000a", "0?Set(REALCALLERIDNUM=100)") in new stack
    -- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/100-0000000a", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,6)
    -- Executing [s@macro-outbound-callerid:6] Set("SIP/100-0000000a", "USEROUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:7] Set("SIP/100-0000000a", "EMERGENCYCID=") in new stack
    -- Executing [s@macro-outbound-callerid:8] Set("SIP/100-0000000a", "TRUNKOUTCID=515647533") in new stack
    -- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/100-0000000a", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,12)
    -- Executing [s@macro-outbound-callerid:12] ExecIf("SIP/100-0000000a", "1?Set(CALLERID(all)=515XXXXXX)") in new stack
    -- Executing [s@macro-outbound-callerid:13] ExecIf("SIP/100-0000000a", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/100-0000000a", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:15] ExecIf("SIP/100-0000000a", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
    -- Executing [s@macro-dialout-trunk:12] ExecIf("SIP/100-0000000a", "1?AGI(fixlocalprefix)") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
    > fixlocalprefix: Using pattern 9XXXXXXXX
    > fixlocalprefix: Using pattern 6XXXXXXXX
    == fixlocalprefix: Dialpattern 6XXXXXXXX matched. 617848484 -> 617848484
    -- <SIP/100-0000000a>AGI Script fixlocalprefix completed, returning 0
    -- Executing [s@macro-dialout-trunk:13] Set("SIP/100-0000000a", "OUTNUM=617848484") in new stack
    -- Executing [s@macro-dialout-trunk:14] Set("SIP/100-0000000a", "custom=SIP/voztele") in new stack
    -- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/100-0000000a", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^))") in new stack
    -- Executing [s@macro-dialout-trunk:16] Macro("SIP/100-0000000a", "dialout-trunk-predial-hook,") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/100-0000000a", "") in new stack
    -- Executing [s@macro-dialout-trunk:17] GotoIf("SIP/100-0000000a", "0?bypass,1") in new stack
    -- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/100-0000000a", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:19] Dial("SIP/100-0000000a", "SIP/voztele/617848484,300,") in new stack
    == Using SIP RTP TOS bits 184
    == Using SIP RTP CoS mark 5
    == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing [s@macro-dialout-trunk:20] NoOp("SIP/100-0000000a", "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 20") in new stack
    -- Executing [s@macro-dialout-trunk:21] Goto("SIP/100-0000000a", "s-CHANUNAVAIL,1") in new stack
    -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
    -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] Set("SIP/100-0000000a", "RC=20") in new stack
    -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:2] Goto("SIP/100-0000000a", "20,1") in new stack
    -- Goto (macro-dialout-trunk,20,1)
    -- Executing [20@macro-dialout-trunk:1] Goto("SIP/100-0000000a", "continue,1") in new stack
    -- Goto (macro-dialout-trunk,continue,1)
    -- Executing [continue@macro-dialout-trunk:1] GotoIf("SIP/100-0000000a", "1?noreport") in new stack
    -- Goto (macro-dialout-trunk,continue,3)
    -- Executing [continue@macro-dialout-trunk:3] NoOp("SIP/100-0000000a", "TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 20 - failing through to other trunks") in new stack
    -- Executing [continue@macro-dialout-trunk:4] Set("SIP/100-0000000a", "CALLERID(number)=100") in new stack
    -- Executing [617848484@from-internal:5] Macro("SIP/100-0000000a", "outisbusy,") in new stack
    -- Executing [s@macro-outisbusy:1] Progress("SIP/100-0000000a", "") in new stack
    -- Executing [s@macro-outisbusy:2] GotoIf("SIP/100-0000000a", "0?emergency,1") in new stack
    -- Executing [s@macro-outisbusy:3] GotoIf("SIP/100-0000000a", "0?intracompany,1") in new stack
    -- Executing [s@macro-outisbusy:4] Playback("SIP/100-0000000a", "all-circuits-busy-now&pls-try-call-later, noanswer") in new stack
    -- <SIP/100-0000000a> Playing 'all-circuits-busy-now.gsm' (language 'es')
    == Spawn extension (macro-outisbusy, s, 4) exited non-zero on 'SIP/100-0000000a' in macro 'outisbusy'
    == Spawn extension (from-internal, 617848484, 5) exited non-zero on 'SIP/100-0000000a'
    -- Executing [h@from-internal:1] Macro("SIP/100-0000000a", "hangupcall") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("SIP/100-0000000a", "1?noautomon") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [s@macro-hangupcall:3] NoOp("SIP/100-0000000a", "TOUCH_MONITOR_OUTPUT=") in new stack
    -- Executing [s@macro-hangupcall:4] GotoIf("SIP/100-0000000a", "1?skiprg") in new stack
    -- Goto (macro-hangupcall,s,7)
    -- Executing [s@macro-hangupcall:7] GotoIf("SIP/100-0000000a", "1?skipblkvm") in new stack
    -- Goto (macro-hangupcall,s,10)
    -- Executing [s@macro-hangupcall:10] GotoIf("SIP/100-0000000a", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,12)
    -- Executing [s@macro-hangupcall:12] Hangup("SIP/100-0000000a", "") in new stack
    == Spawn extension (macro-hangupcall, s, 12) exited non-zero on 'SIP/100-0000000a' in macro 'hangupcall'
    == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/100-0000000a'


    Any ideas??

    Thanks.
     
  2. jgutierrez

    Joined:
    Feb 28, 2008
    Messages:
    5,737
    Likes Received:
    0
    Yes, I might think, that you are not placing correctly the outbound callerID, or that your provider is expecting another format for outbound calls (for example a prefix).
    By the, way is the trunk already registered?

    What does your provider tells you about congestion message? What do they see on their end? What recommendations have they told you?
     
  3. alfgarcas

    Joined:
    Nov 6, 2010
    Messages:
    12
    Likes Received:
    0
    Hi,

    The trunk is registered, as I can receive external calls.
    If I type "sip show registry" or "sip show peers", it's all well registered.

    The outbound callerID it must be OK if I follow the provider manual.
    I tried to change it, and added the international Spain code "34", but it didn´t work.

    I will contact the provider to know what they see on their end.
     
  4. alfgarcas

    Joined:
    Nov 6, 2010
    Messages:
    12
    Likes Received:
    0
    Ok,

    My provider says that the calls don't get out of my LAN.
    The don't see any outgoing calls.
     
  5. Bob

    Bob

    Joined:
    Nov 4, 2007
    Messages:
    2,400
    Likes Received:
    1
    Alfgarcas,

    These are the two important lines in the log

    Dial("SIP/100-0000000a", "SIP/voztele/617848484,300,")

    "SIP/100-0000000a", "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 20") in new stack

    The first shows that it is dialing your VSP with the number 617848484. Can you confirm that this is a number that you would normally dial on a standard telephone and get through???

    The next line that is important as tell us nothing except it failed.

    At this point, we need to look at the SIP messages and responses....it will also give us an idea whether you are reaching their Network (by checking for SIP responses from their system)....and/or why your outbound call is being rejected.

    You need to go into the CLI and issue the
    sip set debug ip {VSP SERVER IP}
    This will allow you to see just the traffic going to the ISP and back....Don't panic if it runs too fast, it is captured in the standard Asterisk logs....

    this is your best bet...

    Regards

    Bob
     
  6. alfgarcas

    Joined:
    Nov 6, 2010
    Messages:
    12
    Likes Received:
    0
    Ok, I've got it!

    The problem was at the PEER DETAILS, at the configuration of the trunk.
    I had a manual that seems wasn't working with Elastix 2.0

    I found another post. That's the link:

    http://www.elastix.org/en/component/kun ... html#63773

    And that is the configuration needed to work properly:

    PEER Details:

    host=voztele.com
    port=5060
    username=3400XXXXXX
    fromuser=3400XXXXXX
    fromusername=3400XXXXXX
    fromdomain=voztele.com
    secret=
    canreinvite=no
    dtmfmode=rfc2833
    type=peer
    defaultexpirey=300
    insecure=very
    qualify=yes


    USERS Details:

    type=friend
    host=193.22.119.20
    username=3400XXXXXX
    fromdomain=voztele.com
    fromusername=3400XXXXXX


    Thanks very much for your help and patient.
     
  7. Bob

    Bob

    Joined:
    Nov 4, 2007
    Messages:
    2,400
    Likes Received:
    1
    Looks like you found exactly what you needed.

    And thanks for closing the thread letting others know your solution :cheer:

    Regards

    Bob
     
  8. Egor

    Joined:
    Nov 27, 2012
    Messages:
    2
    Likes Received:
    0
    Hello all,
    I have the same situation with an error: "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 20"
    But it appears on trunks between two elastix servers (2.3.0 & 2.2.0) of our company.

    I have tried to fix it with instruction bellow but it didn't helps.
    Here is an output of of command sip set debug ip {VSP SERVER IP}

    Retransmitting #4 (no NAT) to x.x.x.x:5060:
    OPTIONS sip:name_of_server SIP/2.0
    Via: SIP/2.0/UDP y.y.y.y:5060;branch=z9hG4bK0ce47873
    Max-Forwards: 70
    From: "Unknown" <sip:Unknown@y.y.y.y>;tag=as3a783c30
    To: <sip:name_of_server>
    Contact: <sip:Unknown@y.y.y.y:5060>
    Call-ID: 1c5141e1779a09ca1e1e0bb73ac41b27@y.y.y.y:5060
    CSeq: 102 OPTIONS
    User-Agent: pbx-city
    Date: Mon, 21 Jan 2013 11:45:54 GMT
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
    Supported: replaces, timer
    Content-Length: 0

    Thanks in advise
     
  9. jordan.turner1974

    Joined:
    Nov 8, 2011
    Messages:
    177
    Likes Received:
    0
    Did you verify with ITSP the details of their settings matches yours? This is the #1 cause of these issues.

    Once you verify it, delete it, and recreate it if you have to - to ensure you are indeed using correct spacings, etc - little details will throw it off.
     

Share This Page