Announcement key 1 only after 5 seconds

Hello,
I have created a simple IVR. It works very well except for one error.
When you press 1 in the menu, it takes about 5 seconds until the announcement test3 starts.
With the keys 2 and 3 the announcement starts immediately.
What could be the problem here?

exten => 624,1,NoOp(You are in IVR now)
 same => n,Answer
 same => n,Playback(test1)
 same => n,Background(test2)
 same => n,Goto(default,624,1)

exten => 1,1,NoOp(Pressed 1)
 same => n,Playback(test3)
 same => n,Goto(default,624,1)

exten => 2,1,NoOp(Pressed 2)
 same => n,Playback(test4)
 same => n,Goto(default,624,1)

exten => 3,1,NoOp(Pressed 3)
 same => n,Playback(test5)
 same => n,Goto(default,624,1)

exten = i,1,NoOp(unknown key)
 same => n,Playback(test6)
 same => n,Goto(default,624,1)

The likely reason is that there is another extension, in the same context, that also begins with 1.

Is the problem here in the extensions.conf or in the pjsip.conf? Die extension.conf. In the extension.conf contains only what I have posted!

extensions.conf. pjsip.conf doesn’t contain extensions in asterisk terms, only in FreePBX terns.

Your extensions.conf must have included at least a section name, as well.

Could it be the phone that is causing the delay?

Five seconds is a typical last digit timeout when you have reached the minimum length for a number, but not the maximum.

I have now adjusted the files, however the problem still remains. It’s not the phone, because I have the same problem from the smartphone. Attached the complete conf.
Asterist should only respond to incoming calls on extension 624 and route them to the IVR. Outgoing calls are not planned.

extensions.conf

[incoming]

exten => 624,1,NoOp(You are in IVR now)
 same => n,Answer
 same => n,Playback(test1)
 same => n,Background(test2)
 same => n,Goto(default,624,1)

exten => 1,1,NoOp(Pressed 1)
 same => n,Playback(test3)
 same => n,Goto(default,624,1)

exten => 2,1,NoOp(Pressed 2)
 same => n,Playback(test4)
 same => n,Goto(default,624,1)

exten => 3,1,NoOp(Pressed 3)
 same => n,Playback(test5)
 same => n,Goto(default,624,1)

exten = i,1,NoOp(unknown key)
 same => n,Playback(test6)
 same => n,Goto(default,624,1)
 
[default]
include => hints
include => lokal
include => incoming

pjsip.conf

;--
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Non mapped elements start
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[general]
allowoverlap = no

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Non mapped elements end
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
--;

[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0:5060
local_net = 192.168.0.0/255.255.255.0

[reg_192.168.0.2]
type = registration
retry_interval = 60
max_retries = 10
contact_user = 624
expiration = 120
transport = transport-udp
outbound_auth = auth_reg_192.168.0.2
client_uri = sip:Asterisk@192.168.0.2
server_uri = sip:192.168.0.2

[auth_reg_192.168.0.2]
type = auth
username = Asterisk
password = password

[624]
type = aor
contact = sip:Asterisk@192.168.0.2

[624]
type = identify
endpoint = 624
match = 192.168.0.2

[624]
type = auth
username = Asterisk
password = password

[624]
type = endpoint
dtmf_mode = auto
disallow = all
allow = !all,g722,alaw,ulaw
trust_id_inbound = no
send_rpid = yes
from_user = Asterisk
from_domain = 192.168.0.2
language = de
allow_subscribe = yes
subscribe_context = default_1
auth = 624
outbound_auth = 624
aors = 624

[acl]
type = acl
permit = 192.168.0.0/255.255.255.0
;deny = 0.0.0.0/0.0.0.0

[624_in]
type = aor
contact = sip:192.168.0.2

[624_in]
type = identify
endpoint = 624
match = 192.168.0.2

[624_in]
type = endpoint
context = incoming
dtmf_mode = auto
disallow = all
allow = !all,g722,alaw,ulaw
trust_id_inbound = no
send_rpid = yes
from_domain = 192.168.0.2
language = de
allow_subscribe = yes
subscribe_context = default_2
aors = 624_in

Please post the output (not a picture, not retyped, wrapped in preformatted text tags) of:

dialplan show incoming

The timestamped (sudo asterisk -T -r) output of a call demonstrating the issue may be clueful, as may enabling SIP debugging.

Your calls seem to be being handled in the default context, so one also has to consider whether anything in one of the other included contexts starts with 1.

This means ‘play test1 and then allow entry to interrupt test2.’

Would:

same = n, background(test1&test2)

improve your caller experience?

I had that before and was the same problem.

Sorry. It was just a drive-by comment/suggestion, not related to resolving your issue.

I have currently changed the announcements, but the problem when pressing button 1 remains the same.

vm-asterisk*CLI> dialplan show incoming
[ Context 'incoming' created by 'pbx_config' ]
  '1' =>            1. NoOp(Pressed 1)                            [extensions.conf:9]
                    2. Playback(bitcoin_markt&1&kaufsignale&1&cardano&1&dogecoin&1&wiederhole&1&cardano&1&dogecoin&1&kaufsignale_umsetzen&1&keine_garantie&1&hauptmenue_umleiten) [extensions.conf:10]
                    3. Goto(default,624,1)                        [extensions.conf:11]
  '2' =>            1. NoOp(Pressed 2)                            [extensions.conf:13]
                    2. Playback(3&ethereum_markt&1&kaufsignale&1&1&cardano&1&dogecoin&1&wiederhole&1&cardano&1&dogecoin&1&kaufsignale_umsetzen&1&keine_garantie&1&hauptmenue_umleiten) [extensions.conf:14]
                    3. Goto(default,624,1)                        [extensions.conf:15]
  '3' =>            1. NoOp(Pressed 3)                            [extensions.conf:17]
                    2. Playback(3&tether_markt&1&kaufsignale&1&1&cardano&1&dogecoin&1&wiederhole&1&cardano&1&dogecoin&1&kaufsignale_umsetzen&1&keine_garantie&1&hauptmenue_umleiten) [extensions.conf:18]
                    3. Goto(default,624,1)                        [extensions.conf:19]
  '624' =>          1. NoOp(You are in IVR now)                   [extensions.conf:3]
                    2. Answer()                                   [extensions.conf:4]
                    3. Playback(1&intro)                          [extensions.conf:5]
                    4. Background(1&intro_taste_1&1&intro_taste_2&1&intro_taste_3&1&wiederhole&intro_taste_1&1&intro_taste_2&1&intro_taste_3) [extensions.conf:6]
                    5. Goto(default,624,1)                        [extensions.conf:7]
  'i' =>            1. NoOp(unknown key)                          [extensions.conf:21]
                    2. Playback(falsche_eingabe&hauptmenue_umleiten) [extensions.conf:22]
                    3. Goto(default,624,1)                        [extensions.conf:23]

-= 5 extensions (17 priorities) in 1 context. =-

Please do dialplan show default, as that is the context you are actually using.

vm-asterisk*CLI> dialplan show default
[ Context 'default' created by 'pbx_lua' ]
  '1234' =>         hint: SIP/1234                                [pbx_lua]
  Include =>        'hints'                                       [pbx_config]
  Include =>        'lokal'                                       [pbx_config]
  Include =>        'incoming'                                    [pbx_config]
  Alt. Switch =>    'Lua/'                                        [pbx_lua]

-= 1 extension (1 priority) in 1 context. =-

I changed back once again, because after the change key 2 and 3 did not work!

dialplan show default
[ Context 'default' created by 'pbx_config' ]
  '1' =>            1. NoOp(Pressed 1)                            [extensions.conf:8]
                    2. Playback(bitcoin_markt&1&kaufsignale&1&cardano&1&dogecoin&1&wiederhole&1&cardano&1&dogecoin&1&kaufsignale_umsetzen&1&keine_garantie&1&hauptmenue_umleiten) [extensions.conf:9]
                    3. Goto(default,624,1)                        [extensions.conf:10]
  '1234' =>         hint: SIP/1234                                [pbx_lua]
  '2' =>            1. NoOp(Pressed 2)                            [extensions.conf:12]
                    2. Playback(3&ethereum_markt&1&kaufsignale&1&1&cardano&1&dogecoin&1&wiederhole&1&cardano&1&dogecoin&1&kaufsignale_umsetzen&1&keine_garantie&1&hauptmenue_umleiten) [extensions.conf:13]
                    3. Goto(default,624,1)                        [extensions.conf:14]
  '3' =>            1. NoOp(Pressed 3)                            [extensions.conf:16]
                    2. Playback(3&tether_markt&1&kaufsignale&1&1&cardano&1&dogecoin&1&wiederhole&1&cardano&1&dogecoin&1&kaufsignale_umsetzen&1&keine_garantie&1&hauptmenue_umleiten) [extensions.conf:17]
                    3. Goto(default,624,1)                        [extensions.conf:18]
  '624' =>          1. NoOp(You are in IVR now)                   [extensions.conf:3]
                    2. Answer()                                   [extensions.conf:4]
                    3. Background(1&intro&intro_taste_1&1&intro_taste_2&1&intro_taste_3&1&wiederhole&intro_taste_1&1&intro_taste_2&1&intro_taste_3) [extensions.conf:5]
                    4. Goto(default,624,1)                        [extensions.conf:6]
  'i' =>            1. NoOp(unknown key)                          [extensions.conf:20]
                    2. Playback(falsche_eingabe&hauptmenue_umleiten) [extensions.conf:21]
                    3. Goto(default,624,1)                        [extensions.conf:22]
  Alt. Switch =>    'Lua/'                                        [pbx_lua]

I think this is where the problem lies.
‘1234’ => hint: SIP/1234 [pbx_lua]

How can I remove this?. It is not written anywhere in extensions.conf

Actually, I misread your pjsip.conf. There is a context=incoming. However, its in an endpoint that is unreachable, and doesn’t seem to serve any useful purpose.

The type=identify for 624-in is ambiguous with respect to that for 624, and both are connected to the endpoint 624. endpoint 624 has no associated context, so, presumably uses default. default includes lokal as well as incoming. I suspect lokal contains extensions starting with 1.

In this case, there would be no reason for including an “in” section, even for chan_sip.

The problem could be fixed by deleting extensions.lua. Here the demo with key 1 was in conflict with key 1 of my IVR. I will clean up the pjsip.conf again.

Thanks for the support. Without the hint on the dialplan show default I would not have come here on it!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.