Valet Parking destination as header

Dast

Member
Nov 11, 2019
63
11
8
Hi all

I've got a user that wants to receive the valet parking lot destination as a SIP header when parking a call using *5900.

I have modified the `app/valet_park/index.lua` script to include the following;
Code:
if (session:ready()) then
        session:execute("export", "sip_bye_h_X-Parked-To=sip:*"..destination_number.."@"..context);
end

However I am not seeing the "X-Parked-To" header. What am I doing wrong?
 
Last edited:

Dast

Member
Nov 11, 2019
63
11
8
Figured I'd post my solution.
For context, the users are using a custom webrtc based softphones, and they want to know where a call is parked.
Because a blind transfer is being used to park calls, I couldn't figure out a way to include the valet destination in a header.

Though it's not the best/ideal solution, in the end I setup a webhook using mod_curl that's called whenever a call is parked/unparked.
 

whut

Active Member
Dec 23, 2022
282
33
28
I am interested in your topic @Dast and would like to learn more about your solution. Which webrtc softphone are you using? In what way does the the parking_lot display in your softphone?
 
  • Like
Reactions: ou812

Dast

Member
Nov 11, 2019
63
11
8
I am interested in your topic @Dast and would like to learn more about your solution. Which webrtc softphone are you using? In what way does the the parking_lot display in your softphone?

A custom softphone was developed and is being used. It integrates with the clients CRM to display the caller's profile/details when a call is answered.
When a call is parked, it effectively provides a BLF button to retrieve that specific call.

The initial problem was that when doing a blind xfer to park a call, you don't receive the destination of where the call was parked (eg; *5904).
You could subscribe to all parking destinations, but that's a bit overkill, and afaik it won't tell you who parked the call in each destination.
I considered fixing this in the Freeswitch source by replacing the hardcoded values it currently returns, but in the end the mod_curl solution was easier and does the trick.