SOLVED Outbound Caller ID's and handset diversions?

Status
Not open for further replies.

hfoster

Active Member
Jan 28, 2019
684
81
28
34
Here's the situation. These are some standalone single user handsets, and as there's going to be a number of strange SIP devices on the end we can't rely on feature key sync for diverting. It's essentially a response to the PSTN shutdown in the UK

My problem however is when a Yealink deskphone enabled a forward all, when that call hits the PBX, it gets pushed to the Yealink who replies back with a 301 Redirect and the PBX then tries to forward the original callers number out the trunk as its own identity. This results in a failure as it triggers the anti-spoofing.

Does anyone know the method to set a diversion outbound call to the extensions outbound_caller_id number? I've been tweaking for hours with stuff like:

${caller_id_number}
${user_data ${username}@${domain} var outbound_caller_id_number}

It works when I set outbound_caller_id_number={EXTENSION NUMBER} for example: outbound_caller_id_number=01234567890 but this isn't dynamically changing to the extension who has forwarded it.

I can provide more info if this isn't clear.
 

hfoster

Active Member
Jan 28, 2019
684
81
28
34
Nevermind. It was simpler than I thought. All I had to do was export a new variable diversion_outbound_number=${dialed_extension} and use that in the outbound routes as my effective_caller_id_number.

There's me trying to complicate things by doing it in the one leg,
 
Status
Not open for further replies.