Diversion Header problem


(Andrzej Czarnowski) #1

Hello,

I have problem with blind transfer on my PBXAct. I know from provider that I need to generate diversion header in SIP but it seems that it’s not generated.

In advanced setting “Generate Diversion Headers” is on:

For extension and SIP trunk:
sendrpid=pai
trustrpid=yes

But in SIP debug to provider I can’t see field divension (there is an PAI but no divension).
Part of my SIP debug during blind transfer is as follow:

Audio is at 14208
Adding codec alaw to SDP
Adding codec g722 to SDP
Adding codec ulaw to SDP
Adding codec gsm to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to YY.YY.YY.YY:5283:
INVITE sip:CCCCCCCCC@YY.YY.YY.YY:5283;user=phone SIP/2.0
Via: SIP/2.0/UDP XX.XX.XX.XX:5060;branch=z9hG4bK42b1e686
Max-Forwards: 70
From: “AAAAAAAAA” sip:AAAAAAAAA@YY.YY.YY.YY;tag=as008e0059
To: sip:CCCCCCCC@83.220.124.225:5283;user=phone
Contact: sip:AAAAAAAAA@YY.YY.YY.YY:5060
Call-ID: 6b3aa4bb0a3b3c396b90fbbc748d4117@YY.YY.YY.YY:5060
CSeq: 102 INVITE
User-Agent: PBXact-13.0.194.2
Date: Thu, 07 May 2020 11:30:44 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
P-Asserted-Identity: “AAAAAAAAA” sip:AAAAAAAAA@YY.YY.YY.YY
Content-Type: application/sdp
Content-Length: 309

v=0
o=root 2125675531 2125675531 IN IP4 YY.YY.YY.YY
s=Asterisk PBX
c=IN IP4 YY.YY.YY.YY
t=0 0
m=audio 14208 RTP/AVP 8 9 0 3 101
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:150
a=sendrecv

Where is a problem?
What should I change to generate that field in my SIP?

Current Asterisk Version: 13.29.2

Best regards,
Andcza


(Quarea) #2

Hello Andcza,

You have to configure it in extensions_custom.conf under [macro-dialout-trunk-predial-hook] context. There you can add the diversion header using REDIRECTING function.

https://wiki.asterisk.org/wiki/display/AST/Function_REDIRECTING

Best regards,


(Andrzej Czarnowski) #3

Many thanks for info Quarea. I will check that funttion, but I think it must be a bug or mistake in configuration. It should work.

I checked on another PBXAct (version 14) with the same asterisk 13.29.2 and when I turn on “Generate Diversion Headers” in SIP I can see diversion field. In version 13 not :frowning:

So I’m looking what could be wrong with my PBXAct (version 13).
Any idea?

Best regards,


(Andrzej Czarnowski) #4

And one more thing.
In logs I can see that dialplan is manipulating SIP HEADER as follow

[s@sub-diversion-header:1] Set(“SIP/AAAA-00000134”, “DIVERSION_REASON=no-answer”) in new stack
[s@sub-diversion-header:2] Gosub(“SIP/AAAA-00000134”, “func-set-sipheader,s,1(Diversion,tel:AAAAAAAAA;reason=no-answer;screen=no;privacy=off)”) in new stack
[s@func-set-sipheader:1] NoOp(“SIP/AAAA-00000134”, “Sip Add Header function called. Adding Diversion = tel:AAAAAAAA;reason=no-answer;screen=no;privacy=off”) in new stack
[s@func-set-sipheader:2] Set(“SIP/AAAA-00000134”, “HASH(__SIPHEADERS,Diversion)=tel:AAAAAAAA;reason=no-answer;screen=no;privacy=off”) in new stack

but some how that field is not in SIP Debug.
Strange

Best regards,
Andzca