SIP connectivity with opensips

Arif Butt

Member
Hi there

We are trying to make a connectivity with SIP API, we have successfully installed opensips on WCS and its running, kindly let us know how to define the sip extension on this and how to connect the web client?

Thanks
AB
 

Arif Butt

Member
Hi there,

We have successfully created the environment and installed OpenSIPS and it is up and running, we are also connecting the calls from the SIP Phone Demo page locally, but we are having issue in connecting it from the internet... port 5060 and 5061 is also opened in the CentOS firewall, kindly assist further in which ports in router should we open more to enable the SIP traffic..., please note that if we open port 5060 and 5061 on the router then there is a lot of junk traffic we start receiving... kindly suggest an alternate if required

Thanks
AB
 

Max

Administrator
Staff member
Hello

As you can see from docs

Default SIP client ports are [30000 - 31000] TCP UDP
Code:
port_from=30000
port_to=31000
Default RTP, ICE, DTLS, RTCP, ports are [31000 - 32000] TCP UDP
Code:
media_port_from=31000
media_port_to=32000
Default Websocket port 8443 TCP
Code:
wss.port=8443
Default web UI port is 8444 TCP
Code:
https.port = 8444
So all these ports should be open for Internet to get this working.
Settings https://docs.flashphoner.com/display/WCS52EN/Settings+file+flashphoner.properties

Local port 5060 or 5061 can be closed on firewall if you do not use external connections to these ports.
 

Max

Administrator
Staff member
How Can these calls be recorded?
You can record SIP calls by two ways:
1. On WCS. To do this, a SIP call should be wrapped to stream as described here. Such stream can be recorded using this parameter in flashphoner.properties
Code:
sip_record_stream=true
Please note that SIP call must be started by REST API in this case
Code:
POST /rest-api/call/startup HTTP/1.1
HOST: 192.168.1.59:8081
content-type: application/json
 
{
    "callId":"123456711",
    "callee":"10000",
    "toStream":"stream1",
    "hasAudio":"true",
    "hasVideo":"true",
    "sipLogin":"10009",
    "sipAuthenticationName":"10009",
    "sipPassword":"1234",
    "sipDomain":"226.226.225.226",
    "sipOutboundProxy":"226.226.225.226",
    "sipPort":"5060",
    "appKey":"defaultApp",
    "sipRegisterRequired":"false",
    "visibleName":"WCS_10009"
}
So this way is more suitable for conference call with the following flow:
- user calls to the SIP conference on SIP PBX (the conferece must be arranged by SIP PBX settings)
- WCS calls to this SIP conference
- the SIP call stream is recording on WCS
2. On OpenSIPS. In this case, you should configure SIPREC module according to its manual. This way is suitable for browser-to-browser and browser-to-softphone SIP calls without SIP conference setup.
 

Arif Butt

Member
Hi there
While testing the SIP phone demo we have noticed that the user extension gets locked and not unregistered on some situations.. after that we are unable to receive inbound call on this extension from other sip phones only outcall is working.. while we can register and connect as other user extensions successfully from the sip phone demo page... kindly let us know how to unlock/unregister the extension from opensips... we have restarted opensips also but still the same issue...

Kindly assist...
 

Max

Administrator
Staff member
Hello,

Please clarify, after the issue occurs ("extension gets locked"), what happens when the user tries again to register - status is ESTABLISHED but not REGISTERED?
For the case when the issue is reproduced (user does not unregister), please collect a report as described here and send it using this link, with the details (including the used SIP account) on the steps done to reproduced.
 

Arif Butt

Member
after the issue occurs ("extension gets locked") and when the user tries again to register - the status is REGISTERED again, but unable to receive calls, however it can make calls to other registered users...
If the same extension is used with xLite softphone it has the same behaviour, not receiving calls but can make calls, it shows that this extension is locked from opensips and the message is not processed further to WCS.

Therefore we need to clear / unregister this extension from opensips...

kindly let me know if you still need the logs from WCS?

AB
 

Arif Butt

Member
The WCS is causing the SIP user extensions to a locked situation, on abrupt closure of sip-phone webpage (from browser top cross button)... after that the user extension gets locked and unable to receive further calls, but the status shows as registered and out calls can also be done successfully to other sip users... The xLite client is not creating this situation.. kindly assist
 

Max

Administrator
Staff member
It may be that there are too many registrations for the user extension.
There are opensipsctl commands to check that.
Registrations can be seen using this command
Code:
opensipsctl ul show <sip_login>@<sip_domain>
and deleted using this command
Code:
opensipsctl ul rm <sip_login>@<sip_domain>
For any further information, please refer to OpenSIPS documentation.
 

Arif Butt

Member
Yes you were right about that, there were too many registration for that extension and after that it stopped working, I am wondering that why flashphoner SIP Pone demo page is not unregistered on Disconnect Botton where as it shows on the screen that it is disconnected... and on each connect it register as a new connection... Is there any way that we can de register from FlashPhoner?

Thnx
 

Arif Butt

Member
Or use the same registration of last connect, purpose is not to get locked after sometimes since the users will be logging in and in several times.

thnx
 

Max

Administrator
Staff member
Seems like expiration timer at WCS side continues to work after session disconnection, so OpenSIPS keeps connection alive. We raised the ticket WCS-3025 and let you know here about it.
As workaroung, you can remove expired connections using opensipsctl ul rm <sip_login>@<sip_domain> command at OpenSIPS side.
 

Arif Butt

Member
Thanks, the update is now working for Disconnection, but I have noticed that if I login as 108 the WCS registration is adding some number after the 108 and making it as sip:108-102877877@192.168.0.223:30004

I want to get register only as sip:108@192.168.0.223:30004 how can I configure this... kindly assist

Thnx
 

Arif Butt

Member
If above configuration is not possible then how can I know the additional number that WCS is adding via the API sip:108-102877877 ?
 
Top