I have now managed to get it working—many thanks for your link, David! I was running my head against the wall but didn’t give up…
As you already mentioned, it works like this:
pjsip.conf:
send_rpid=yes
subscribe_context=HINTS
(if using send_rpid=no
the function conntectedline will not work)
extensions.conf:
[HINTS]
…
; Parking
exten => 800,hint,park:800@LocationA-parking-lot
exten => 801,hint,park:801@LocationA-parking-lot
exten => 802,hint,park:802@LocationA-parking-lot
exten => 803,hint,park:803@LocationA-parking-lot
exten => 804,hint,park:804@LocationA-parking-lot
exten => 805,hint,park:805@LocationA-parking-lot
exten => 806,hint,park:806@LocationA-parking-lot
exten => 807,hint,park:807@LocationA-parking-lot
exten => 808,hint,park:808@LocationA-parking-lot
exten => 809,hint,park:809@LocationA-parking-lot
[MyContext]
exten => 1000,1,NoOp()
same => n,Set(CONNECTEDLINE(num)=+1 23 45 678 9)
same => n,Set(CONNECTEDLINE(name)=Called Parkpos is 800)
same => n,Dial(Local/800@LocationA-parking)
same => n,Hangup()
My Cisco now displays both lines, i.e., num
and name
. However, since only name
is displayed prominently, I will only use name
and show the number there. This means I will use the num as name:
same => n,Set(CONNECTEDLINE(name)=+1 23 45 678 9)
Now I need to find a way to store the counterpart’s number “+1 23 45 678 9” when parking. I will probably use the Asterisk DB for this so that I can retrieve the value here:
same => n,Set(CONNECTEDLINE(name)= ### VALUE FROM AST DB ###)
I park the call directly on the parking positions ‘800’, ‘801’, ‘802’, etc. I don’t need ‘799’ at all and I don’t even know why it is being suggested! So this is my final dialplan:
[outgoing]
include => LocationA-parking-lot
; Park
exten => _80X,1,ExecIf($[“${EXTENSION_STATE(${EXTEN}@LocationA-parking-lot)}” = “INUSE”]?ParkedCall(LocationA-parking,${EXTEN}))
; Unpark (Pickup)
exten => _80X,n,Set(PARKED_CALLEE=${DB(forward/${CALLERID(num)})})
exten => _80X,n,Set(CONNECTEDLINE(name)=${PARKED_CALLEE})
exten => _80X,n,Set(PARKINGEXTEN=${EXTEN})
exten => _80X,n,Park(LocationA-parking,s,${CALLERID(num)},300)
exten => _80X,n,Set(DB(forward/${PARKED_CALLEE})=)
Now I am able to use the following result in my cisco ip settings to park/unpark and blf:
Line Key 10 extended func:
fnc=sd+blf;ext=800@192.xxx.xxx;sub=800@192.xxx.xxx.xxx
Line Key 11 extended func:
fnc=sd+blf;ext=801@192.xxx.xxx;sub=801@192.xxx.xxx.xxx
Line Key 12 extended func:
fnc=sd+blf;ext=802@192.xxx.xxx;sub=802@192.xxx.xxx.xxx
and so on…