Skip to content

Commit

Permalink
Merge pull request #129 from wazo-platform/WP-1671-sip-diversion-extern
Browse files Browse the repository at this point in the history
dialplan outcall: allow setting external Diversion SIP header

Why:

Operators expect Diversion header to contain a DID owned by the PBX
sending the header

Reviewed-by: Alexandre Fournier
  • Loading branch information
wazo-community-zuul[bot] authored Dec 10, 2024
2 parents 0a71cad + 38a51a7 commit eebaf66
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dialplan/asterisk/extensions_lib_outcall.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ same = n,Set(WAZO_CONTEXT=${WAZO_BASE_CONTEXT})
same = n,Set(WAZO_CHANNEL_DIRECTION=to-wazo)
same = n,Set(__WAZO_CALL_DIRECTION=outbound)
same = n,Gosub(originate-caller-id,s,1)
same = n,Gosub(wazo-outcall-redirecting,s,1)
same = n,AGI(agi://${WAZO_AGID_IP}/outgoing_user_set_features)
same = n,GoSub(wazo-setup-userevent-dial-echo,s,1)
same = n,GoSub(wazo-subroutine,s,1(${XIVO_OUTCALLPREPROCESS_SUBROUTINE}))
Expand Down Expand Up @@ -88,3 +89,10 @@ same = n,GotoIf(${WAZO_OUTCALL_PAI_NUMBER}?:done)
same = n,Verbose(Using the trunk caller ID as a P-Asserted-Identity fallback)
same = n(pai),Set(PJSIP_HEADER(add,P-Asserted-Identity)=tel:${WAZO_OUTCALL_PAI_NUMBER})
same = n(done),Return()

[wazo-outcall-redirecting]
exten = s,1,NoOp
same = n,GotoIf(${EXISTS(${WAZO_DST_REDIRECTING_EXTERN_NUM})}?:return)
same = n,Set(REDIRECTING(from-num,i)=${WAZO_DST_REDIRECTING_EXTERN_NUM})
same = n,Set(REDIRECTING(from-name,i)=${WAZO_DST_REDIRECTING_EXTERN_NAME})
same = n(return),Return

0 comments on commit eebaf66

Please sign in to comment.