Dialing delay

Hello,

I have a problem with my Asterisk -> it has a delay when dialing (about 3-5 seconds, which is quite annoying).

Can it be a memory problem, or something else?

CLI:
– Executing [144@ales:1] Set(“SIP/107-08e8a4d8”, “CALLERID(all)=testTeling <12345678945631>”) in new stack
– Executing [144@ales:2] Dial(“SIP/107-08e8a4d8”, “SIP/144@172.18.160.224”) in new stack
– Called 144@172.18.160.224

I did a trace on Asterisk with Wireshark, and saw, that Asterisk sends the invite very late - 3-5 second delay.

Extensions.conf

[quote][ales]
;include => rec
;include => tts
include => vmail
exten => _0.,1,Dial(SIP/${EXTEN}@172.18.160.224)
;exten => _1.,1,Dial(SIP/${EXTEN}@172.18.160.224)
exten => _1.,1,Set(CALLERID(all)=testTeling <12345678945631>)
exten => _1.,2,Dial(SIP/${EXTEN}@172.18.160.224)
exten => _2.,1,Dial(SIP/${EXTEN}@172.18.160.224)
exten => _3.,1,Dial(SIP/${EXTEN}@172.18.160.224)
exten => _4.,1,Dial(SIP/${EXTEN}@172.18.160.224)
exten => _5.,1,Dial(SIP/${EXTEN}@172.18.160.224)
exten => _6.,1,Dial(SIP/${EXTEN}@172.18.160.224)
exten => _7.,1,Dial(SIP/${EXTEN}@172.18.160.224)
exten => _8.,1,Dial(SIP/${EXTEN}@172.18.160.224)
exten => _9.,1,Dial(SIP/${EXTEN}@172.18.160.224)[/quote]

SIP.conf:

[quote][107]
username=107
type=peer
canreinvite=no
secret=107
disallow=all
allow=alaw
port=5060
nat=never
host=dynamic
dtmfmode=auto
call-limit=2
context=ales
callerid=<107> 107
mailbox=107@tehnika[/quote]

What could be causing the delay, from when I dial, to when Asterisk sends INVITE msg???

well from what I can see,
you are tell asterisk to dial any number starting with 1-9 out, so asterisk probably has to wait till a timeout to dial out, if you had one that matched 11 digits then asterisk would know when you dialed 11 digits to send it out whatever channel you chose.

Thank you for the answer riddlebox. BTW, where can I disable the timeout?

I tried to put the exact number:

exten => 0051648416,1,Dial(SIP/${EXTEN}@172.18.160.224)

Still the delay.

The funny thing is, when I call internaly, the delay is gone:

exten => _0.,1,Dial(SIP/${EXTEN})

I traced it again, and saw, that Asterisk when calling internaly sends invite immediatly, but when I call outside, the delay is here - in consequence, the INVITE is send with the delay (it allmoast looks like Asterisk is searching for something).
As far as I see, there are no differences between the internal in outside dialplan, except @172.18.160.224 offcourse.

Is it possible, that Asterisk is searching on which eth interface the call will be made (I have three eth interfaces - two localy, and one for outside network).

Is there any way I can debug Asterisk to see what is causing the delay? I tried the SIP debug, but I didn’t see anything wrong with the messages.

Strange problem.

What kind of phones are you using? On my Grandstream GXP 2000 phones there is a send button which will send the call immediatly like a cell phone, same on my Snom 300.

Dial delays are almost always associated with the phone itself.

Each phone needs to have a dial plan created to tell it when you’ve dialed the last digit needed to place a call. If you have no dial plan in the phone, or an incorrectly created dial plan in the phone, it will generally wait for a timeout period before dialing the call. Many (if not all) SIP phones come with dial plans that are correct for North America. You may have to customize your dial plan to work in your region.

As riddlebox stated, many phones come with “dial” or “send” buttons to tell the phone that you’ve dialed your last digit, and to send the invite message to Asterisk now. Some phones substitute the # key for a “dial” or “send” key.

Check your phone’s documentation for instructions for creating a proper dial plan in the phone.

The phones are not the problem. I tried with Aastra 5xi series, Polycom soundpoint and softphones (xlite, sjphone).

There must be some deal with the network, and multiple eth interfaces on my Linux machine where is Asterisk.

How does Asterisk handle multiple eth interfaces - how does he know where to send the SIP/H323/IAX, on which eth??

Edit: Just got it to work withouth delay. I made a route on Linux, for my 172.x.x.x network. If anybody has similar problems with multiple interfaces and call delay, he must just make sure that routing is exact!

ales187,

polycom phones and aastra phones has local dial plan rules. x-lite does send the call until you click ‘connect’.

You need to configure the local dial plan on the aastra phone. Basically the phone doesn’t know when you are done dialing the telephone number or extension into the phone and it waits until a timeout is reached and then sends the call over to asterisk to dial the number and connect the call. For instance the local dial plan on the aastra phone looks like this. More on the dialplan syntax is available in the aastra administrators guide which is available on aastra’s website.

local dial plan: X+#|XX+*|[1-9]11|2[8-9][0-9]|343|1[2-9]XX[2-9]XXXXXX|[2-9]XX[2-9]XXXXXX

Best Regards,

Adam Simpson
Easy Office Phone
easyofficephone.com