Use webrtc_client for multi instance call

Hi, thanks for comunity
I am using asterisk for call to pstn numbers, i configured asterisk to connect to pstn getways, also i configure it to support webrtc connection, i define webrtc_client as said in document. in client in browser i use jssip and webrtc apis, every thing is work properly and i can call to psnt number, but there is a problem i want to my customer be able to use just one webrtc client (username password) to connect to asterisk and make call to pstn number they want, is it posibble? i can define caller and callee number. and want to use one static number for all calls. if you have any data about this or better option please help me. thanks.

What do you mean with “Just one webRTC client” and “one username/password”? If you setup your endpoint in pjsip.conf correctly you can register multiple clients with the same username and password no problem, and have multiple connections from different locations. However, be aware that EVERYONE with the username and password can dial WHATEVER your dialplan allows.

Just connecting a website to the PSTN can easily get expensive, if your do NOT consider security on the web application and in the dialplan. Imagine someone wanting to call a satellite phone, those easily costs upwards of 5 USD a minute, for the worst case, usually calls are made to expensive international destinations, and I’ve heard of bills in my conuntry of upwards of 80000 USD in a matter of HOURS, in fraud cases. Just a word of warning, before you launch a potential monster.

If you want calls to go to a specific number always, you just make a dialplan like

exten => _X.,1,Dial(whatever)

That would more or less make sure that no matter what number is dialed, they will always end up calling what YOU decided. That would also mostly solve the security issues mentioned above.

You also mention PSTN gateways, is that an on-premise gateway that connects to the an analog or ISDN connection, or some ITSP external to you? If the former, your number of simultaneous calls are limited by the number of phone lines you have from your provider, with analog it’s usually 1 call per inbound cable pair, with ISDN it’s usually either 2 or 30 calls, but it’s possible to have a PRI ISDN connection, with a limited number of channels available.

1 Like

Hi, I am also trying to setup a webrtc client to register with asterisk and make calls to outside pstn/mobile numbers using a GSM gateway. Can you please guide me how this can be done

  1. Setup the GSM gateway to process calls from Asterisk
  2. Setup a PJSIP endpoint for the GSM gateway, Asterisk can use for outbound calls
  3. Configure your dialplan to perform the outbound calls. (Test with a basic SIP client, like a softphone, for one less point of failure)
  4. Setup Asterisk for WebRTC. You need the appropriate modules loaded, the http module, and some WebRTC specific PJSIP modules as well.
  5. Write your WebRTC client, to connect to Asterisk. There’s samples around the web you can look at.
  6. Secure your setup. Eg. make sure the dialplan only allows calls you want to perform, no credentials you don’t wanna share with the world is visible in the webRTC client etc.
  7. Sit back, relax and enjoy the fruits of your labour.

Thank you so much for detailing the steps needed.
Just one more question… Is it available or is it possible to have a WebRTC client android mobile application ? Any samples are available ?

I found this example in 1 minute using google… Asterisk WebRTC With PJSip From Scratch

Don’t know anything about the quality of the guide, but have a look and see how far you get, then get back here, with more specific questions, if you run into problems.

In most cases everyone are willing to point you in the right direction, but few are able/willing to spend the time doing your work for you.

If you’re asking about the mobile client itself, that’s not something the Asterisk project itself does and I suspect few (if any) here have experience.

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