[asterisk-bugs] [JIRA] (ASTERISK-28878) chan_pjsip: PJSIP_MEDIA_OFFER Broken asterisk 16

Kevin Harwell (JIRA) noreply at issues.asterisk.org
Mon Aug 24 14:09:43 CDT 2020


    [ https://issues.asterisk.org/jira/browse/ASTERISK-28878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=251745#comment-251745 ] 

Kevin Harwell commented on ASTERISK-28878:
------------------------------------------

After some more investigation it doesn't appear the use case of attempting to send a session refresh before a call has been answered has ever been supported, and if so it shouldn't have been. So for instance,
{noformat}
[from-jc-custom]
exten => _2XX,1,Set(PJSIP_MEDIA_OFFER(audio)=!all,g722)
exten => _2XX,n,Set(PJSIP_SEND_SESSION_REFRESH()=invite)
exten => _2XX,n,Dial(PJSIP/525${EXTEN},,b(gosub-jc-custom^s^1))
exten => _2XX,n,Hangup()

[gosub-jc-custom]
exten => s,1,Set(PJSIP_MEDIA_OFFER(audio)=!all,g722)
exten => s,n,Set(PJSIP_SEND_SESSION_REFRESH()=invite)
exten => s,n,Return()
{noformat}
In both of these cases a session refresh is attempted on channels (caller and callee) prior to the call, and associated sessions, being fully setup and established. It's actually a bug that Asterisk attempts to do anything at all in that case. Instead the PJSIP_SEND_SESSION_REFRESH function should fail and return an error.

If you want to update the codecs, and re-invite then you'll have to do that after answer.

> chan_pjsip: PJSIP_MEDIA_OFFER Broken asterisk 16
> ------------------------------------------------
>
>                 Key: ASTERISK-28878
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28878
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_pjsip
>    Affects Versions: 16.4.0, 16.10.0
>            Reporter: Joseph Ades
>            Assignee: Kevin Harwell
>            Severity: Minor
>      Target Release: 13.35.0, 16.12.0, 17.6.0
>
>         Attachments: asterisk13-Working.pcap, asterisk13-working.txt, asterisk16-12-notworking.txt, asterisk16-NOT-WORKING.pcap, Code.txt, verbose13.txt, verbose16.txt
>
>
> I am migrating from asterisk 13 and have successfully utilized the pjsip_media_offer function. Very simple code, not much else to it, and worked for years.
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Function_PJSIP_MEDIA_OFFER
> After testing an asterisk 16 machine, using exactly the same code, I am unable to get it to work. The CLI reads the code, but does not do anything with it. Furthermore, after analyzing the packet capture, there is no evidence of the asterisk machine sending an INVITE to renegotiate the codec.
> I downgraded back to asterisk 13 and everything started to work again



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list