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

Joseph Ades (JIRA) noreply at issues.asterisk.org
Fri May 8 10:23:25 CDT 2020


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

Joseph Ades edited comment on ASTERISK-28878 at 5/8/20 10:22 AM:
-----------------------------------------------------------------

My apologies.

The steps or actions was simply dialing the appropriate extension number with the below code. The behavior expected was for both endpoints to force to codec g722.

I also attached a PCAP from asterisk 13 where this works, and a PCAP from asterisk 16 where it's broken

Code (see attached - Code.txt. I did not know how to format here):

CLI Verbose on Asterisk 16 where this is not working. Neither of the endpoints were asked to change codecs:
(see attached - verbose16.txt)

CLI verbose on Asterisk 13 where this is working as expected. Same code. Both endpoints were forced to codec g722.
(see attached - verbose13.txt)


was (Author: jades):
My apologies.

The steps or actions was simply dialing the appropriate extension number with the below code. The behavior expected was for both endpoints to force to codec g722.

I also attached a PCAP from asterisk 13 where this works, and a PCAP from asterisk 16 where it's broken

Code:
[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()

CLI Verbose on Asterisk 16 where this is not working. Neither of the endpoints were asked to change codecs:
  == Setting global variable 'SIPDOMAIN' to '104.129.18.120'
  == Using SIP RTP Audio TOS bits 184
  == Using SIP RTP Audio TOS bits 184 in TCLASS field.
    -- Executing [204 at from-jc-custom:1] Set("PJSIP/525202-0000002f", "PJSIP_MEDIA_OFFER(audio)=!all,g722") in new stack
    -- Executing [204 at from-jc-custom:2] Set("PJSIP/525202-0000002f", "PJSIP_SEND_SESSION_REFRESH()=invite") in new stack
    -- Executing [204 at from-jc-custom:3] Dial("PJSIP/525202-0000002f", "PJSIP/525204,,b(gosub-jc-custom^s^1)") in new stack
    -- PJSIP/525204-00000030 Internal Gosub(gosub-jc-custom,s,1) start
    -- Executing [s at gosub-jc-custom:1] Set("PJSIP/525204-00000030", "PJSIP_MEDIA_OFFER(audio)=!all,g722") in new stack
    -- Executing [s at gosub-jc-custom:2] Set("PJSIP/525204-00000030", "PJSIP_SEND_SESSION_REFRESH()=invite") in new stack
    -- Executing [s at gosub-jc-custom:3] Return("PJSIP/525204-00000030", "") in new stack
  == Spawn extension (from-jc-custom, 204, 1) exited non-zero on 'PJSIP/525204-00000030'
    -- PJSIP/525204-00000030 Internal Gosub(gosub-jc-custom,s,1) complete GOSUB_RETVAL=
    -- Called PJSIP/525204
  == Using SIP RTP Audio TOS bits 184
  == Using SIP RTP Audio TOS bits 184 in TCLASS field.
    -- PJSIP/525204-00000030 is ringing
    -- PJSIP/525204-00000030 is ringing
    -- PJSIP/525204-00000030 answered PJSIP/525202-0000002f
    -- Channel PJSIP/525204-00000030 joined 'simple_bridge' basic-bridge <a3c11ef8-8f5f-482b-a0c5-ecc5d4807081>
    -- Channel PJSIP/525202-0000002f joined 'simple_bridge' basic-bridge <a3c11ef8-8f5f-482b-a0c5-ecc5d4807081>


CLI verbose on Asterisk 13 where this is working as expected. Same code. Both endpoints were forced to codec g722.
  == Using SIP RTP Audio TOS bits 184
  == Using SIP RTP Audio TOS bits 184 in TCLASS field.
    -- Executing [225 at from-jc-custom:1] Set("PJSIP/525221-0001d91e", "PJSIP_MEDIA_OFFER(audio)=!all,g722") in new stack
    -- Executing [225 at from-jc-custom:2] Set("PJSIP/525221-0001d91e", "PJSIP_SEND_SESSION_REFRESH()=invite") in new stack
    -- Executing [225 at from-jc-custom:3] Dial("PJSIP/525221-0001d91e", "PJSIP/525225,,b(gosub-jc-custom^s^1)") in new stack
    -- PJSIP/525225-0001d91f Internal Gosub(gosub-jc-custom,s,1) start
    -- Executing [s at gosub-jc-custom:1] Set("PJSIP/525225-0001d91f", "PJSIP_MEDIA_OFFER(audio)=!all,g722") in new stack
    -- Executing [s at gosub-jc-custom:2] Set("PJSIP/525225-0001d91f", "PJSIP_SEND_SESSION_REFRESH()=invite") in new stack
    -- Executing [s at gosub-jc-custom:3] Return("PJSIP/525225-0001d91f", "") in new stack
  == Spawn extension (from-jc-custom, 225, 1) exited non-zero on 'PJSIP/525225-0001d91f'
    -- PJSIP/525225-0001d91f Internal Gosub(gosub-jc-custom,s,1) complete GOSUB_RETVAL=
    -- Called PJSIP/525225
  == Using SIP RTP Audio TOS bits 184
  == Using SIP RTP Audio TOS bits 184 in TCLASS field.
PBX01v5*CLI>
PBX01v5*CLI>
PBX01v5*CLI>
    -- PJSIP/525225-0001d91f is ringing
    -- PJSIP/525225-0001d91f is ringing
PBX01v5*CLI>
    -- PJSIP/525225-0001d91f answered PJSIP/525221-0001d91e
    -- Channel PJSIP/525225-0001d91f joined 'simple_bridge' basic-bridge <0493c76e-526b-4238-98ff-72d53859a5f9>
    -- Channel PJSIP/525221-0001d91e joined 'simple_bridge' basic-bridge <0493c76e-526b-4238-98ff-72d53859a5f9>


> 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.10.0
>            Reporter: Joseph Ades
>            Assignee: Unassigned
>            Severity: Minor
>         Attachments: asterisk13-Working.pcap, 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