[asterisk-users] Receiving Messages and Extensions Config for WebRTC

Vivian Alan vivian at inttel.net
Wed Oct 28 15:39:14 CDT 2015


Hi All,

I have configured WebRTC according to the install document.

The clients register correctly. I'm use SIPjs.
The clients are able to send messages to the server. The SIP debug shows
the messages being received.
However I'm stumped for directions on how to route the messages between the
clients.

Asterisk 11.11.0

Here is my client sip config:
[1060]
type=friend
username=1060 ; The Auth user for SIP.js
host=dynamic ; Allows any host to register
secret=fee50 ; The SIP Password for SIP.js
;encryption=yes ; Tell Asterisk to use encryption for this peer
avpf=yes ; Tell Asterisk to use AVPF for this peer
icesupport=yes ; Tell Asterisk to use ICE for this peer
context=default ; Tell Asterisk which context to use when this peer is
dialing
directmedia=no ; Asterisk will relay media for this peer
transport=ws ; Asterisk will allow this peer to register on UDP or
WebSockets
force_avp=yes ; Force Asterisk to use avp. Introduced in Asterisk 11.11
nat=force_rport,comedia
accept_outofcall_message=yes
outofcall_message_context=messages
;dtlsenable=yes ; Tell Asterisk to enable DTLS for this peer
;dtlsverify=no ; Tell Asterisk to not verify your DTLS certs
;dtlscertfile=/etc/asterisk/keys/asterisk.pem ; Tell Asterisk where your
DTLS cert file is
;dtlsprivatekey=/etc/asterisk/keys/asterisk.pem ; Tell Asterisk where your
DTLS private key is
;dtlssetup=actpass ; Tell Asterisk to use actpass SDP parameter when
setting up DTLS

[1061] ; This will be the legacy SIP client
type=friend
username=1061
host=dynamic
secret=fee50
;encryption=yes ; Tell Asterisk to use encryption for this peer
avpf=yes ; Tell Asterisk to use AVPF for this peer
icesupport=yes ; Tell Asterisk to use ICE for this peer
context=default ; Tell Asterisk which context to use when this peer is
dialing
directmedia=no ; Asterisk will relay media for this peer
transport=ws ; Asterisk will allow this peer to register on UDP or
WebSockets
force_avp=yes ; Force Asterisk to use avp. Introduced in Asterisk 11.11
nat=force_rport,comedia
accept_outofcall_message=yes
outofcall_message_context=messages
;dtlsenable=yes ; Tell Asterisk to enable DTLS for this peer
;dtlsverify=no ; Tell Asterisk to not verify your DTLS certs
;dtlscertfile=/etc/asterisk/keys/asterisk.pem ; Tell Asterisk where your
DTLS cert file is
;dtlsprivatekey=/etc/asterisk/keys/asterisk.pem ; Tell Asterisk where your
DTLS private key is
;dtlssetup=actpass ; Tell Asterisk to use actpass SDP parameter when
setting up DTLS


Here is my extensions config: (I guess this is the wrong way to go, but any
pointers are appreciated).

[messages]
exten => 1060,1,Dial(SIP/1060) ; Dialing 1060 will call the SIP client
registered to 1060
;exten => 1061,1,Dial(SIP/1061) ; Dialing 1061 will call the SIP client
registered to 1061
exten => 1061,1,NoOp(Message from: ${MESSAGE(from)})
same => n,NoOp(Message to: ${MESSAGE(to)})
same => n,NoOp(Message body: ${MESSAGE(body)})
same => n,MessageSend(sip:1061 at 254.248.223.23:$[SIPPEER(1061,port)])
same => n,NoOp(Message send status: ${MESSAGE_SEND_STATUS})
same => n,Hangup()


Thank you

Vivian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20151028/9fd9a883/attachment.html>


More information about the asterisk-users mailing list