SOLVED Parking without losing caller id

Status
Not open for further replies.

djzort

Member
Feb 28, 2018
76
5
8
41
Sydney, Australia
bytefoundry.com.au
This is completely my own work, although its heavily derived from the default settings, a little inspiration from the freeswitch email list, pouring over the freeswitch doco, and copious trial+error.

Note: I havent factored in anything but blind parking and i dont use the orbit+park button in Snom. I just use BLF.

I recommend you disable (Enabled: False) the provided settings for your future reference.

Smooshing in to one extension was just mind bending, so it results in 4 extensions which are hopefully easy enough to understand and customize.

Once the destination number is found to match 59XX, the Referred-By and park_uuid are used to determine what the call is doing.

Referred-By will have something in it, if the call is being blind transferred in to parking. Otherwise the extension is trying to call in to it (i.e. pick up a call)

If a park uuid is found, that means that there is a call in the parking lot slot.

I also only set the parking lot variables if a call is going to go into the lot, which differs from the default configuration.

Here is 450 which just sets variables. For reference the parking_uuid line in full is:
Code:
park_uuid=${regex(${valet_info park@${domain_name}}|extension\suuid=.([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})..\*${park_lot}..extension|%1|n)}

I found that regexes in FusionPBX really really dont like quotes or gt's and lt's. Perhaps they arent being escaped properly when stored? i ended up just using dot's. The above regex could definitely be simplified, but i prefer my regexes to be as specific as possible to avoid side effects.

dp450.png

451 immediately transfers calls back to the referrer if the parking lot is in use
dp451.png


455 is where the callerid is retrieved and sent back to the extension trying to pick up the park. This example is snom specific - so you will need to work out what headers your extensions want to see and make changes as needed.

This is the extension that you will want to customize to suit your phones.

The magic is that the uuid_getvar allows us to pull variables out of any active channel - such as the channel in the parking lot! So with the uuid from the parking lot, I grabbed the caller_id_number and shoved it in a header for the extension retrieving the parked call. Having sip-cid-in-1xx=false eliminates having duplicate headers sent to the retrieving extension - although Snom's ignore it, i think its better to just have one header.

dp455.png

460 is where the call is either parked of retrieved depending if a Referred-By header is present
dp460.png



Breaks in the dial plan are very mind bending, so having separate extensions definitely make understanding and debugging much easier.
 

djzort

Member
Feb 28, 2018
76
5
8
41
Sydney, Australia
bytefoundry.com.au
Please note, the above works correctly when the B leg parks the A leg (someone calling in to your PBX is parked, then retrieved). I suspect that if the A leg parks the B leg then caller ID wont work right (i.e. when you call out of your PBX, then park that call, then someone else on your PBX retrieves it)

I would very much appreciate peoples feedback and improvements
 

chandramouli

New Member
Jun 19, 2018
12
0
1
44
Hello DjZort,

I am facing caller Id issue in valet parking. I have gone through your above solution. Do I need to change anything in FreeSwitch configuration? I am just confusing about your solution matches to my problem or not. Could you please go through my below thread and help me to resolve the issue:


I look forward to hear your help. Thank you.

Best Regards,
Chandramouli.
 
Status
Not open for further replies.