How to setup webrtc call to GSM number?

Hi All,

is there anyone who was able to setup webrtc successfully call to GSM number?
I have some issue on it.

if anyone know, could you please share it?

thank you

What issue? What actually happens? There is no difference between calling different things in Asterisk using WebRTC.

And there is no such thing as a GSM number. Most mobile phone numbers no longer result in calls using GSM, and all mobile phone numbers are are just PSTN numbers.

Hi @jcolp

thanks for your reply.
my issue for now is there’s no sound neither on my webrtc or my GSM number.
maybe you could share how to resolve this issue??

thanks

Try to call from webrtc to normal softphone , if sound still not ok so you should check your webrtc

What is your actual setup?

Do you have a cellular device hooked up to a computer running Asterisk, and uses that to make calls?

Do you have a Cellular to SIP gateway you route the calls through from Asterisk?

Do you have a normal VoIP line from a VoIP provider, and you happen to just call your own cellphone for testing?

Do your webrtc device connect directly to Asterisk, or through some other webrtc/webrtc to SIP proxy?

Every answer given without answer to the above questions, has to make some assumptions in regards to your actual setup.

You can also check the network traffic for RTP traffic. There should usually be 2 RTP flows, one from your softphone/webrtp proxy to Asterisk, and one from Asterisk to the external gateway (In case you’re not using a cellular adaptor on the Asterisk machine directly)

Also I have multiple Asterisk servers running, with customers connecting to them using webrtc based softphones, and they are able to call every number in the world, without issue.

hi @Chano

actually i was setup the webrtc device connect directly to asterisk.
asterisk will forward that calls to SBC’s provider.

If i use softphone to call the GSM number, sound is on.
but why if use webrtc directly call to GSM number, there’s no sound??

is it cause of the codecs not match or something else?

or maybe i wrong setup??

this is my sip.conf

  • [1060] ; This will be WebRTC client

type=friend

username=1060 ; The Auth user for SIP.js

host=dynamic ; Allows any host to register

secret=password ; 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=SVCOUT ; Tell Asterisk which context to use when this peer is dialing

;context=WEBRTC ; Tell Asterisk which context to use when this peer is dialing

;context=tesWeb ; Tell Asterisk which context to use when this peer is dialing

directmedia=no ; Asterisk will relay media for this peer

transport=udp,ws,wss ; Asterisk will allow this peer to register on UDP or WebSockets

force_avp=yes ; Force Asterisk to use avp. Introduced in Asterisk 11.11

dtlsenable=yes ; Tell Asterisk to enable DTLS for this peer

dtlsverify=fingerprint ; Tell Asterisk to verify DTLS fingerprint

dtlscertfile=/etc/asterisk/keys/asterisk.pem ; Tell Asterisk where your DTLS cert file is

dtlssetup=actpass ; Tell Asterisk to use actpass SDP parameter when setting up DTLS

rtcp_mux=yes ; Tell Asterisk to do RTCP mux

disallow=all

allow=alaw,ulaw*

and this is my extension.conf

  • [SVCOUT]

exten => _X.,1,NoOp

same => n,Verbose(Caller id terbaca ${CALLERID(num)})

;same => n,AGI(svc/taufikTest.php, ${CHANNEL})

;same => n,Set(CALLERID(num)=628119361808)

same => n,Set(CALLERID(num)=628119363497)

same => n,Set(CDR(outbound_cnum)=${CALLERID(num)})

;same => n,Dial(PJSIP/${EXTEN:1},300)

;same => n,Dial(PJSIP/svcCloud/sip:${EXTEN}@10.0.1.4:5060,300)

same => n,Dial(SIP/svcCloud/${EXTEN},300)

;same => n,Dial(SIP/svcjtn/${EXTEN},300)

;same => n,Dial(SIP/briker/${EXTEN},300)

same => n,Hangup()*

thanks

If GSM = Cellphone number, try calling a regular landline, or VoIP line somewhere instead, does that work?
Usually when dialing out through a VoIP provider, your problems are NOT related to the type of number you call, as the routing in the phone network is really not that different for the majority of the path. At some point your call will have to go to either a cellphone, a landline or a VoIP line, but that’s really just the final stretch.

If not, check with a packet capture solution or pjsip set logger command to see what codecs are negotiated. Usually if there are no common codecs, the call will be dropped, not established without sound.

In the SIP packets, you should also see some SDP payload, this will help you identify the IP addresses and ports used for the audio streams, use a packetcapture tool like tcpdump, to locate these streams, and see if they are present.

If you have an outbound audio stream from your Asterisk, but not from your provider, check if your network is blocking the traffic, if you have a stream in both directions, check if there are RTP streams to the softphone (Softphone in this case is ANYTHING connected to an extension in Asterisk, regardless of protocols used.)

If you suspect the problem is in your end, try eliminating as many variables as possible. Eg. download some established SIP softphone, install it on 2 computers, that are on the same network as the Asterisk server. Does that work?
If it works, move one of the computers outside your own network, does it still work? If not, most likely a network issue in your end.
If it works, try with webRTC on your internal network. Works? Try with one of the clients outside your network.
And so on…

The idea is to start with as simple a setup as possible, then gradually work up to the actual scenario causing the problem.

thanks @Chano for your explanation, I will check on it based on your mention above

will inform you later whether it works or not.

thank you

Hi all,

thanks for your replying on my questions above.
so, finally i found what’s the causing of no sound call to GSM’s number.
it’s like what @Chano said, that the RTP’s port was blocked by router, after that’s port opened, I able to hear the sound in cellphone and also in webrtc

thanks

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.