Basic parking cannot be set up. Asterisk does not respond to DTMF

I’m trying to set up parking, according to the Asterisk documentation.

Asterisk 18.13.0

pjsip.conf

[udp-any]
type=transport
protocol=udp
bind=0.0.0.0

[office](!)
type=endpoint
context=from-internal
disallow=all
allow=ulaw
transport=udp-any
direct_media=no
permit=0.0.0.0/0.0.0.0
language=ru
force_rport=yes
rtp_symmetric=yes
rewrite_contact=yes
pickup_group=1
call_group=1

[office-auth](!)
type=auth
auth_type=userpass
password=password

[office-aor](!)
type=aor
max_contacts=5
qualify_frequency=60

[301](office)
auth=auth301
aors=301
callerid=Director <301>

[302](office)
auth=auth302
aors=302
callerid=Secretary <302>

[303](office)
auth=auth303
aors=303
callerid=Manager <303>

[304](office)
auth=auth304
aors=304
callerid=Accountant <304>

[auth301](office-auth)
username=301
[auth302](office-auth)
username=302
[auth303](office-auth)
username=303
[auth304](office-auth)
username=304

[301](office-aor)
[302](office-aor)
[303](office-aor)
[304](office-aor)

extensions.conf

[general]
[globals]

[from-internal]
include => parkedcalls

exten => _30[1-4],1,Dial(PJSIP/${EXTEN})
same => n,Hangup()

features.conf

[general]
pickupexten=*8

res_parking.conf

[general]

[default]
parkext => 700
parkpos => 701-709
context => parkedcalls
parkingtime => 60
findslot => next

Modules loaded

localhost*CLI> module show like features 
Module                         Description                              Use Count  Status      Support Level
bridge_builtin_features.so     Built in bridging features               1          Running              core
bridge_builtin_interval_features.so Built in bridging interval features      0          Running              core
features                       Call Features                            1          Running              core
3 modules loaded
localhost*CLI> module show like parking
Module                         Description                              Use Count  Status      Support Level
res_parking.so                 Call Parking Resource                    0          Running              core
1 modules loaded

When a call is in progress, Asterisk does not respond to pressing #700 on the called side. I can’t put my phone in the parking lot.

UPD.

If I do as in the instructions, then my module does not load and Asterisk issues errors in the CLI.

изображение

localhost*CLI> module load res_parking.so 
Unable to load module res_parking.so
Command 'module load res_parking.so ' failed.
[Nov 28 01:13:30] ERROR[6927]: config_options.c:780 aco_process_var: Could not find option suitable for category 'general' named 'parkext' at line 2 of 
[Nov 28 01:13:30] ERROR[6927]: config_options.c:544 process_category: In res_parking.conf: Processing options for general failed

parkext doesn’t go in the general section:

I don’t quite understand… My config, which I presented above, is correct, the module is loaded. There are no errors. I can’t park the number when calling. Just no reaction to button presses.

    -- Executing [301@from-internal:1] Dial("PJSIP/302-00000004", "PJSIP/301") in new stack
    -- Called PJSIP/301
    -- PJSIP/301-00000005 is ringing
    -- PJSIP/301-00000005 is ringing
       > 0x7fca9c071140 -- Strict RTP learning after remote address set to: 192.168.0.100:4004
    -- PJSIP/301-00000005 answered PJSIP/302-00000004
       > 0x7fca9c049d20 -- Strict RTP learning after remote address set to: 192.168.0.105:4004
    -- Channel PJSIP/301-00000005 joined 'simple_bridge' basic-bridge <3fc0e28b-6825-4727-b052-3132c0324291>
    -- Channel PJSIP/302-00000004 joined 'simple_bridge' basic-bridge <3fc0e28b-6825-4727-b052-3132c0324291>
       > Bridge 3fc0e28b-6825-4727-b052-3132c0324291: switching from simple_bridge technology to native_rtp
       > Locally RTP bridged 'PJSIP/302-00000004' and 'PJSIP/301-00000005' in stack
       > 0x7fca9c049d20 -- Strict RTP qualifying stream type: audio
       > 0x7fca9c049d20 -- Strict RTP switching source address to 46.72.31.224:4004
       > 0x7fca9c071140 -- Strict RTP qualifying stream type: audio
       > 0x7fca9c071140 -- Strict RTP switching source address to 46.72.31.224:4004
       > 0x7fca9c049d20 -- Strict RTP learning complete - Locking on source address 46.72.31.224:4004
       > 0x7fca9c071140 -- Strict RTP learning complete - Locking on source address 46.72.31.224:4004
    -- Channel PJSIP/301-00000005 left 'native_rtp' basic-bridge <3fc0e28b-6825-4727-b052-3132c0324291>
    -- Channel PJSIP/302-00000004 left 'native_rtp' basic-bridge <3fc0e28b-6825-4727-b052-3132c0324291>
  == Spawn extension (from-internal, 301, 1) exited non-zero on 'PJSIP/302-00000004'

If it were correct, you would not get these errors:

If it were loaded, you would get an error that it was already loaded.

You misunderstood me. I wrote that I don’t have any mistakes. I wrote that the information on the Asterisk website turns out to be incorrect.

And here are my settings:

localhost*CLI> dialplan show parkedcalls
[ Context 'parkedcalls' created by 'res_parking/default' ]
  '700' =>          1. Park()                                     [res_parking]
  '701' =>          1. ParkedCall(default,701)                    [res_parking/default]
  '702' =>          1. ParkedCall(default,702)                    [res_parking/default]
  '703' =>          1. ParkedCall(default,703)                    [res_parking/default]
  '704' =>          1. ParkedCall(default,704)                    [res_parking/default]
  '705' =>          1. ParkedCall(default,705)                    [res_parking/default]
  '706' =>          1. ParkedCall(default,706)                    [res_parking/default]
  '707' =>          1. ParkedCall(default,707)                    [res_parking/default]
  '708' =>          1. ParkedCall(default,708)                    [res_parking/default]
  '709' =>          1. ParkedCall(default,709)                    [res_parking/default]
  '710' =>          1. ParkedCall(default,710)                    [res_parking/default]
  '711' =>          1. ParkedCall(default,711)                    [res_parking/default]
  '712' =>          1. ParkedCall(default,712)                    [res_parking/default]
  '713' =>          1. ParkedCall(default,713)                    [res_parking/default]
  '714' =>          1. ParkedCall(default,714)                    [res_parking/default]
  '715' =>          1. ParkedCall(default,715)                    [res_parking/default]
  '716' =>          1. ParkedCall(default,716)                    [res_parking/default]
  '717' =>          1. ParkedCall(default,717)                    [res_parking/default]
  '718' =>          1. ParkedCall(default,718)                    [res_parking/default]
  '719' =>          1. ParkedCall(default,719)                    [res_parking/default]
  '720' =>          1. ParkedCall(default,720)                    [res_parking/default]

-= 21 extensions (21 priorities) in 1 context. =-
localhost*CLI> features show
Builtin Feature           Default Current
---------------           ------- -------
Pickup                    *8      *8     
Blind Transfer            #       #1     
Attended Transfer                 *2     
One Touch Monitor                 *1     
Disconnect Call           *       *0     
Park Call                         *72    
One Touch MixMonitor              *3     

Dynamic Feature           Default Current
---------------           ------- -------
(none)

Feature Groups:
---------------
(none)

image

image

image

I have already tried both softphones and a physical device - parking does not work not according to #700 and not according to *72

Calls work, but parking does not.
Asterisk does not respond to DTMF clicks. Nothing crashes in the logs. Even through sngrep there is nothing.

You should set an explicit dtmf_mode and make sure that the endpoint supports it, although RFC 4733 seems to be the default, which is the one you would normally expect.

Enabling DTMF debugging will show whether Asterisk is seeing the DTMF. Enabling RTP debugging will show whether it is being sent RFC 4733 frames. Using pjsip set logger on will show you what the endpoint is offering.

You haven’t enabled parking feature requests for either party. In fact, you haven’t enabled any features at all. Please look at the documentation for Dial().

1 Like

That “wiki” page seems to have multiple problems. There seems to be code there that isn’t used. There is the missing “default” section, and whilst it mentions the Dial options at least twice, one of them on the line above the Dial call, it fails to include it in the actual call!

Although it says it is a Wiki, it is not in the Wikipedia language and it doesn’t seem to offer me either an edit option or a comments section. I’d be a bit reluctant to fix it though, as I might miss something and I don’t have access to a test environment.

You were right. I completely overlooked the kK parameters. Apparently, I have outdated information. Thank you very much! Now I have brought my Dial() to the desired format and the parking has started working!

exten => _30[1-4],1,Dial(PJSIP/${EXTEN},30,rtTkK)

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