Dial out delay problem

Discussion in 'General' started by stringray, Nov 25, 2009.

  1. stringray

    Joined:
    Nov 24, 2009
    Messages:
    2
    Likes Received:
    0
    Hi,

    I have build a ip-pbx by Elastix V1.6 and TDM410P with 4x FXO.

    When I try to dial out to PSTN line, I got a 3 seconds delay after dial, please see below log:

    Code:
        -- Executing [#12345678@from-internal:1] Set("SIP/100-0996d1a0", "MOHCLASS=none") in new stack
        -- Executing [#12345678@from-internal:2] Macro("SIP/100-0996d1a0", "user-callerid|SKIPTTL|") in new stack
        -- Executing [s@macro-user-callerid:1] Set("SIP/100-0996d1a0", "AMPUSER=100") in new stack
        -- Executing [s@macro-user-callerid:2] GotoIf("SIP/100-0996d1a0", "0?report") in new stack
        -- Executing [s@macro-user-callerid:3] ExecIf("SIP/100-0996d1a0", "1|Set|REALCALLERIDNUM=100") in new stack
        -- Executing [s@macro-user-callerid:4] Set("SIP/100-0996d1a0", "AMPUSER=100") in new stack
        -- Executing [s@macro-user-callerid:5] Set("SIP/100-0996d1a0", "AMPUSERCIDNAME=Test1") in new stack
        -- Executing [s@macro-user-callerid:6] GotoIf("SIP/100-0996d1a0", "0?report") in new stack
        -- Executing [s@macro-user-callerid:7] Set("SIP/100-0996d1a0", "AMPUSERCID=100") in new stack
        -- Executing [s@macro-user-callerid:8] Set("SIP/100-0996d1a0", "CALLERID(all)="Test1" <100>") in new stack
        -- Executing [s@macro-user-callerid:9] ExecIf("SIP/100-0996d1a0", "0|Set|CHANNEL(language)=") in new stack
        -- Executing [s@macro-user-callerid:10] GotoIf("SIP/100-0996d1a0", "1?continue") in new stack
        -- Goto (macro-user-callerid,s,19)
        -- Executing [s@macro-user-callerid:19] NoOp("SIP/100-0996d1a0", "Using CallerID "Test1" <100>") in new stack
        -- Executing [#12345678@from-internal:3] Set("SIP/100-0996d1a0", "_NODEST=") in new stack
        -- Executing [#12345678@from-internal:4] Macro("SIP/100-0996d1a0", "record-enable|100|OUT|") in new stack
        -- Executing [s@macro-record-enable:1] GotoIf("SIP/100-0996d1a0", "1?check") in new stack
        -- Goto (macro-record-enable,s,4)
        -- Executing [s@macro-record-enable:4] AGI("SIP/100-0996d1a0", "recordingcheck|20091123-224606|1258987566.55") in new stack
        -- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
      recordingcheck|20091123-224606|1258987566.55: Outbound recording not enabled
        -- AGI Script recordingcheck completed, returning 0
        -- Executing [s@macro-record-enable:5] MacroExit("SIP/100-0996d1a0", "") in new stack
        -- Executing [#12345678@from-internal:5] Macro("SIP/100-0996d1a0", "dialout-trunk|1|12345678||") in new stack
        -- Executing [s@macro-dialout-trunk:1] Set("SIP/100-0996d1a0", "DIAL_TRUNK=1") in new stack
        -- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/100-0996d1a0", "0?sub-pincheck|s|1") in new stack
        -- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/100-0996d1a0", "0?disabletrunk|1") in new stack
        -- Executing [s@macro-dialout-trunk:4] Set("SIP/100-0996d1a0", "DIAL_NUMBER=12345678") in new stack
        -- Executing [s@macro-dialout-trunk:5] Set("SIP/100-0996d1a0", "DIAL_TRUNK_OPTIONS=tr") in new stack
        -- Executing [s@macro-dialout-trunk:6] Set("SIP/100-0996d1a0", "OUTBOUND_GROUP=OUT_1") in new stack
        -- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/100-0996d1a0", "1?nomax") in new stack
        -- Goto (macro-dialout-trunk,s,9)
        -- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/100-0996d1a0", "0?skipoutcid") in new stack
        -- Executing [s@macro-dialout-trunk:10] Set("SIP/100-0996d1a0", "DIAL_TRUNK_OPTIONS=") in new stack
        -- Executing [s@macro-dialout-trunk:11] Macro("SIP/100-0996d1a0", "outbound-callerid|1") in new stack
        -- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/100-0996d1a0", "0|SetCallerPres|") in new stack
        -- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/100-0996d1a0", "0|Set|REALCALLERIDNUM=100") in new stack
        -- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/100-0996d1a0", "1?normcid") in new stack
        -- Goto (macro-outbound-callerid,s,6)
        -- Executing [s@macro-outbound-callerid:6] Set("SIP/100-0996d1a0", "USEROUTCID=") in new stack
        -- Executing [s@macro-outbound-callerid:7] Set("SIP/100-0996d1a0", "EMERGENCYCID=") in new stack
        -- Executing [s@macro-outbound-callerid:8] Set("SIP/100-0996d1a0", "TRUNKOUTCID=") in new stack
        -- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/100-0996d1a0", "1?trunkcid") in new stack
        -- Goto (macro-outbound-callerid,s,12)
        -- Executing [s@macro-outbound-callerid:12] ExecIf("SIP/100-0996d1a0", "0|Set|CALLERID(all)=") in new stack
        -- Executing [s@macro-outbound-callerid:13] ExecIf("SIP/100-0996d1a0", "0|Set|CALLERID(all)=") in new stack
        -- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/100-0996d1a0", "0|SetCallerPres|prohib_passed_screen") in new stack
        -- Executing [s@macro-dialout-trunk:12] ExecIf("SIP/100-0996d1a0", "0|AGI|fixlocalprefix") in new stack
        -- Executing [s@macro-dialout-trunk:13] Set("SIP/100-0996d1a0", "OUTNUM=12345678") in new stack
        -- Executing [s@macro-dialout-trunk:14] Set("SIP/100-0996d1a0", "custom=DAHDI/1") in new stack
        -- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/100-0996d1a0", "1|Set|DIAL_TRUNK_OPTIONS=M(setmusic^none)") in new stack
        -- Executing [s@macro-dialout-trunk:16] Macro("SIP/100-0996d1a0", "dialout-trunk-predial-hook|") in new stack
        -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/100-0996d1a0", "") in new stack
        -- Executing [s@macro-dialout-trunk:17] GotoIf("SIP/100-0996d1a0", "0?bypass|1") in new stack
        -- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/100-0996d1a0", "0?customtrunk") in new stack
        -- Executing [s@macro-dialout-trunk:19] Dial("SIP/100-0996d1a0", "DAHDI/1/12345678|300|M(setmusic^none)") in new stack
    
    <<<<< hold on about 3 seconds then continue run >>>>>
    Code:
        -- Called 1/12345678
        -- DAHDI/1-1 answered SIP/100-0996d1a0
        -- Executing [s@macro-setmusic:1] NoOp("DAHDI/1-1", "Setting Outbound Route MoH To: none") in new stack
        -- Executing [s@macro-setmusic:2] SetMusicOnHold("DAHDI/1-1", "none") in new stack
        -- Executing [h@macro-dialout-trunk:1] Macro("SIP/100-0996d1a0", "hangupcall|") in new stack
        -- Executing [s@macro-hangupcall:1] GotoIf("SIP/100-0996d1a0", "1?skiprg") in new stack
        -- Goto (macro-hangupcall,s,4)
        -- Executing [s@macro-hangupcall:4] GotoIf("SIP/100-0996d1a0", "1?skipblkvm") in new stack
        -- Goto (macro-hangupcall,s,7)
        -- Executing [s@macro-hangupcall:7] GotoIf("SIP/100-0996d1a0", "1?theend") in new stack
        -- Goto (macro-hangupcall,s,9)
        -- Executing [s@macro-hangupcall:9] Hangup("SIP/100-0996d1a0", "") in new stack
      == Spawn extension (macro-hangupcall, s, 9) exited non-zero on 'SIP/100-0996d1a0' in macro 'hangupcall'
      == Spawn h extension (macro-dialout-trunk, h, 1) exited non-zero on 'SIP/100-0996d1a0'
        -- Hungup 'DAHDI/1-1'
      == Spawn extension (macro-dialout-trunk, s, 19) exited non-zero on 'SIP/100-0996d1a0' in macro 'dialout-trunk'
      == Spawn extension (from-internal, #12345678, 5) exited non-zero on 'SIP/100-0996d1a0'
    
    Does this delay time is normal?

    Thanks.
     
  2. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    Yes, if you don't have an exact match for

    12345678
    (ZNXXXXXX); (see below for an explanation)

    in your outbound route dial-plan,
    each country has it's own dialplan, some more byzantine than others, it is up to you to limit all possible outbound called numbers to an explicit match to save the "digit timeout" (3? seconds, I thought it was 5 but it's a long time since I learned the inconvenience of badly designed dial-plans, so I never have to count them). To aid you there are some "tokens" that represent "regular expressions" thus:
    X=0-9 ; matches all digits between 0 and 9
    Z=1-0 ; and so on. . .
    N=2-9
    Many phones have their own version of dialplan (or dial string or any number of other aliases), that will have to be concordant with your countries dial-plan also, and only you can so adjust to suit :) :)

    p.s.

    for example the NANP (North American Numbering Plan) has

    NXXNXXXXXX for all calls with often a permissive or required "country code" (1 for NANP) prepended, this breaks down to a three digit "Area Code" (no area codes start with 0 or 1), a three digit "Office code", no office code starts with 0 or 1, and a four digit "station code". some analog carriers accept NXXXXXX but often permissively accept NXXNXXXXXX (where the first NXX is the area code and for 10 or 11 digit dialing, your own area code), most all VOIP providers require 10 or eleven digit dialing but if it's 10 it wont start with 1 if it's 11 it will, so here its easy, try that concept in Austria though :)
     
  3. stringray

    Joined:
    Nov 24, 2009
    Messages:
    2
    Likes Received:
    0
    HI,

    I have modified dial plan in my outside route & trunk, but this problem still happens.

    So I monitor asterisk running log many time to check this issue.

    I find the real delay is cause by
     
  4. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    The location of your
    <<<<< Hold on about 3 seconds >>>>>

    in your dialplan has changed between your posts, according to your first post the delay would suggest a "dial-plan stall" and hence my response, you moved it in the later post so while you make your mind up, I'm off to bed. :)
     

Share This Page