Hello everyone.
I had a problem switching from Asterisk version 13 to version 20.
Previously I could get information from the BYE headers with SIP_HEADER, with which I transferred the call. When changing to version 20 and using PJSIP_HEADER I do not get the same result.
Attached is the dialplan with SIP:
[contex]
exten => _1XXXX,1,NoOp()
same => n,Set(CALLERID(all)=Asterisk <${UNIQUEID}>)
same => n,Set(_MCHAN=${CHANNEL})
same => n,Dial(SIP/test/sip:XXX@aaaa.com,gb(contex^callee_handler^1))
same => n,NoOp(Transfer to ${SHARED(TRANSFERTO)})
same => n,Transfer(SIP/${SHARED(TRANSFERTO)})
same => n,Hangup()
exten => callee_handler,1,NoOp()
same => n,Set(CHANNEL(hangup_handler_push)=contex,hangup_handler,1);
same => n,Return()
exten => hangup_handler,1,NoOp()
same => n,Set(SHARED(TRANSFERTO,${MCHAN})=${SIP_HEADER(read,X-message)})
same => n,Return()
Dialplan PJSIP:
[contex]
exten => _1XXXX,1,NoOp()
same => n,Set(CALLERID(all)=Asterisk <${UNIQUEID}>)
same => n,Set(_MCHAN=${CHANNEL})
same => n,Dial(PJSIP/test/sip:XXX@aaaa.com,gb(contex^callee_handler^1))
same => n,NoOp(Transfer to ${SHARED(TRANSFERTO)})
same => n,Transfer(PJSIP/${SHARED(TRANSFERTO)})
same => n,Hangup()
exten => callee_handler,1,NoOp()
same => n,Set(CHANNEL(hangup_handler_push)=contex,hangup_handler,1);
same => n,Return()
exten => hangup_handler,1,NoOp()
same => n,Set(SHARED(TRANSFERTO,${MCHAN})=${PJSIP_HEADER(read,X-message)})
same => n,Return()
Is there a way to get the BYE message with PJSIP?
I hope someone can help me.