Hello, I am working on a project on which I would need the sdp not to be modified, my goal is to have the rtp stream going from peer to peer (without going through asterisk).
Both client + the asterisk server are on the same network. Both client are using an PJSIP extension.
You can’t. Asterisk doesn’t support or implement such a thing. Any such functionality would be something you’d have to hack up the code to do in some way.
This is generally referred to as Direct Media and is fully supported by
Asterisk.
Is there any specific problem you are running into and are asking for
assistance with?
Antony.
The conflict between the two answers is that direct media is not implemented by sending SDP unchanged, but rather by sending SDP with compatible descriptions for the primary audio stream.
Also note that Asterisk only supports direct media as a re-INVITEd configuration, after an initial, relay, configuration is established. Although chan_sip has code to try to negotiate it directly, that has never been officially supported.
Note that, as the OP refers to extension in a sense used by FreePBX, but not by Asterisk, I should point out that you have to disable a lot of FreePBX for direct media to work, as anything that requires recording or monitoring, and, in most configurations, any enabling of feature codes, means that Asterisk needs access to the media stream.
Thanks for the responses, I disabled some feature my FreePBX and now I have the rtp stream going from phoneA to phoneB without going to go through the server.
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.19.50.99:5060;rport=5060;branch=z9hG4bKPje762fc5d-683d-4eb2-8ede-4855af9c323d;received=172.19.50.99
From: <sip:1002@172.19.50.99;user=phone>;tag=f3517a10-dd4b-461c-bf42-df78cedb6eba
To: <sip:1001@172.19.50.99>;tag=f9e320af16
Call-ID: 0ba4a5156ebad724
CSeq: 3845 INVITE
Accept-Language: en
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, OPTIONS, UPDATE, PRACK, SUBSCRIBE, INFO, PUBLISH
Allow-Events: talk, hold, conference, LocalModeStatus
Contact: <sip:1001@172.19.50.111:5060;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-1000-8000-1400E90675A2>"
Server: noname
Supported: path, replaces
Content-Type: application/sdp
Content-Length: 235
v=0
o=MxSIP 0 2 IN IP4 172.19.50.111
s=SIP Call
c=IN IP4 172.19.50.111
t=0 0
m=audio 3000 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=silenceSupp:off - - - -
a=fmtp:101 0-15
a=ptime:20
a=sendrecv
You might get problems handling DTMF signaling in scenarios where you want Asteirsk to process them. (Eg. features configured in features.conf)
Asterisk disables direct media when those are enabled.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.