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:
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)
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>
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
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.