Parked calls and context

Hello, I have issues with parked calls, when the called user parks a call it always is parked in the default parking, instead of the custom one, this is the content of res_parking.conf:

[general]

; Default parking lot
[default]
context=parkedcalls
parkext=700
parkpos=701-702
parkingtime=2

[company_11]
context=park_company_11
parkext=700
parkext_exclusive=yes
parkpos=701-710
parkingtime=300

I had not added anything related to my dial-plan, since everything is being created automatically, I can confirm that by running dialplan show:

[ Context ‘park_company_11’ created by ‘res_parking/company_11’ ]
‘700’ => 1. Park(company_11) [res_parking/company_11]
‘701’ => 1. ParkedCall(company_11,701) [res_parking/company_11]
‘702’ => 1. ParkedCall(company_11,702) [res_parking/company_11]
‘703’ => 1. ParkedCall(company_11,703) [res_parking/company_11]
‘704’ => 1. ParkedCall(company_11,704) [res_parking/company_11]
‘705’ => 1. ParkedCall(company_11,705) [res_parking/company_11]
‘706’ => 1. ParkedCall(company_11,706) [res_parking/company_11]
‘707’ => 1. ParkedCall(company_11,707) [res_parking/company_11]
‘708’ => 1. ParkedCall(company_11,708) [res_parking/company_11]
‘709’ => 1. ParkedCall(company_11,709) [res_parking/company_11]
‘710’ => 1. ParkedCall(company_11,710) [res_parking/company_11]

[ 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]

Please help me understand what I’m doing wrong.

Maybe:

I had set the channel:
exten => _*9XXXX,1,NoOp(Direct call ${EXTEN:2})
same => n,Set(CHANNEL(parkinglot)=park_company_11)
same => n,Dial(PJSIP/${EXTEN:2},tk)

How was the parking requested? By/on which channel?

Also note that we strongly prefer plain text, as it is not possible to search images.

Executing [*91002@company_11:1] NoOp("PJSIP/1003-00000006", "Direct call 1002") in new stack
    -- Executing [*91002@company_11:2] Set("PJSIP/1003-00000006", "CHANNEL(parkinglot)=park_company_11") in new stack
    -- Executing [*91002@company_11:3] NoOp("PJSIP/1003-00000006", "Call recording") in new stack
    -- Executing [*91002@company_11:4] Set("PJSIP/1003-00000006", "COMPANY=11") in new stack
    -- Executing [*91002@company_11:5] Set("PJSIP/1003-00000006", "MONITOR_FILENAME=/recordings/company_11/1731364665.12-1003.wav") in new stack
    -- Executing [*91002@company_11:6] Set("PJSIP/1003-00000006", "TIMESTAMP=2024-11-11 22:37:45") in new stack
    -- Executing [*91002@company_11:7] Set("PJSIP/1003-00000006", "DIRECTION=Local") in new stack
    -- Executing [*91002@company_11:8] MixMonitor("PJSIP/1003-00000006", "/recordings/company_11/1731364665.12-1003.wav,b") in new stack
    -- Executing [*91002@company_11:9] Dial("PJSIP/1003-00000006", "PJSIP/1002,,tk") in new stack
  == Begin MixMonitor Recording PJSIP/1003-00000006
    -- Called PJSIP/1002
    -- PJSIP/1002-00000007 is ringing
[Nov 11 22:37:46] WARNING[104230]: res_pjsip_pubsub.c:3396 pubsub_on_rx_publish_request: No registered publish handler for event presence from 1002
[Nov 11 22:37:48] WARNING[104230]: res_pjsip_pubsub.c:3396 pubsub_on_rx_publish_request: No registered publish handler for event presence from 1002
       > 0x7f0bbc04e7b0 -- Strict RTP learning after remote address set to: 192.168.68.55:39781
    -- PJSIP/1002-00000007 answered PJSIP/1003-00000006
       > 0x7f0bbc00a9d0 -- Strict RTP learning after remote address set to: 192.168.68.82:57398
    -- Channel PJSIP/1002-00000007 joined 'simple_bridge' basic-bridge <76d362d7-ae27-4c31-af46-2b7cc6203049>
    -- Channel PJSIP/1003-00000006 joined 'simple_bridge' basic-bridge <76d362d7-ae27-4c31-af46-2b7cc6203049>
       > 0x7f0bbc00a9d0 -- Strict RTP switching to RTP target address 192.168.68.82:57398 as source
       > 0x7f0bbc04e7b0 -- Strict RTP switching to RTP target address 192.168.68.55:39781 as source
       > 0x7f0bbc04e7b0 -- Strict RTP learning complete - Locking on source address 192.168.68.55:39781
       > 0x7f0bbc00a9d0 -- Strict RTP learning complete - Locking on source address 192.168.68.82:57398
    -- Channel PJSIP/1003-00000006 left 'simple_bridge' basic-bridge <76d362d7-ae27-4c31-af46-2b7cc6203049>
    -- Parking 'PJSIP/1003-00000006' in 'default' at space 701
    -- Channel PJSIP/1003-00000006 joined 'holding_bridge' parking-bridge <0f925470-324a-4f0a-8ba5-81cf11a98e9f>
    -- Started music on hold, class 'default', on channel 'PJSIP/1003-00000006'
    -- <PJSIP/1002-00000007> Playing 'digits/7.gsm' (language 'en')
    -- <PJSIP/1002-00000007> Playing 'digits/0.gsm' (language 'en')
    -- <PJSIP/1002-00000007> Playing 'digits/1.gsm' (language 'en')
    -- Channel PJSIP/1003-00000006 left 'holding_bridge' parking-bridge <0f925470-324a-4f0a-8ba5-81cf11a98e9f>
    -- Stopped music on hold on PJSIP/1003-00000006
    -- Executing [PJSIP_1002@park-dial:1] Dial("PJSIP/1003-00000006", "PJSIP/1002,30") in new stack
    -- Called PJSIP/1002
  == Everyone is busy/congested at this time (1:1/0/0)
    -- Auto fallthrough, channel 'PJSIP/1003-00000006' status is 'BUSY'
[Nov 11 22:37:59] WARNING[105417][C-00000003]: channel.c:4689 indicate_data_internal: Unable to handle indication 5 for 'PJSIP/1003-00000006'
    -- Channel PJSIP/1002-00000007 left 'simple_bridge' basic-bridge <76d362d7-ae27-4c31-af46-2b7cc6203049>
  == MixMonitor close filestream (mixed)
  == End MixMonitor Recording PJSIP/1003-00000006
asterisk*CLI>

You have parkext = 700 for both parking lots. Move one of them somewhere else.

Long story short: it makes no difference.

I changed to:

[general]

; Default parking lot
[default]
context=parkedcalls
parkext=700
parkpos=701-702
parkingtime=2

[company_11]
context=park_company_11
parkext=800
parkext_exclusive=yes
parkpos=801-810
parkingtime=300

I dial the extension, and then from the called extension I send the DTMF code #700, and it triggers this:

-- Contact 1005/sip:1005@192.168.68.76:48043;transport=udp is now Reachable.  RTT: 375.918 msec
    -- Channel PJSIP/1003-00000000 left 'simple_bridge' basic-bridge <c51826cc-5b5c-4dff-99c2-6ad9bb4b4b96>
    **-- Parking 'PJSIP/1003-00000000' in 'default' at space 701**
    -- Channel PJSIP/1003-00000000 joined 'holding_bridge' parking-bridge <8b1e530a-a90f-43a6-b0e7-ccc19281028b>
    -- <PJSIP/1002-00000001> Playing 'digits/7.gsm' (language 'en')
    -- Started music on hold, class 'default', on channel 'PJSIP/1003-00000000'
    -- <PJSIP/1002-00000001> Playing 'digits/0.gsm' (language 'en')
    -- <PJSIP/1002-00000001> Playing 'digits/1.gsm' (language 'en')
    -- Channel PJSIP/1003-00000000 left 'holding_bridge' parking-bridge <8b1e530a-a90f-43a6-b0e7-ccc19281028b>
    -- Stopped music on hold on PJSIP/1003-00000000
    -- Executing [PJSIP_1002@park-dial:1] Dial("PJSIP/1003-00000000", "PJSIP/1002,30") in new stack
    -- Called PJSIP/1002

For reference, this is what I get when I run parking show :

Parking General Options
-----------------------
Dynamic Parking     :  no

Parking Lot: company_11
--------------------------------------------------------------------------
Parking Extension   :  800
Parking Context     :  park_company_11
Parking Spaces      :  801-810
Parking Time        :  300 sec
Comeback to Origin  :  yes
Comeback Context    :  parkedcallstimeout (comebacktoorigin=yes, not used)
Comeback Dial Time  :  30 sec
MusicOnHold Class   :  
Enabled             :  yes
Dynamic             :  no

Parking Lot: default
--------------------------------------------------------------------------
Parking Extension   :  700
Parking Context     :  parkedcalls
Parking Spaces      :  701-702
Parking Time        :  2 sec
Comeback to Origin  :  yes
Comeback Context    :  parkedcallstimeout (comebacktoorigin=yes, not used)
Comeback Dial Time  :  30 sec
MusicOnHold Class   :  
Enabled             :  yes
Dynamic             :  no

I followed the instructions for multi-tenant Parking of this tutorial How to setup call parking ⋆ Asterisk

Progress!, I am using Asterisk static real-time configuration, turns out I have to store this CHANNEL(parkinglot)=park_company_11 on the set_var column of pjsip_endpoints table.

Now the parking lot is “unknown”:

[Nov 11 23:24:44] WARNING[143009][C-00000002]: parking/parking_bridge_features.c:513 parking_park_call: Cannot Park PJSIP/1002-00000003: lot park_company_11 unknown
       > 0x7f490404b330 -- Strict RTP learning complete - Locking on source address 192.168.68.55:48892
       > 0x7f49040681e0 -- Strict RTP learning complete - Locking on source address 192.168.68.82:53245

It’s alive!!!

For future references, the value for set_var column should be equal to the context name being it “default”, “company_11”, etc.

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