Unable to do SIP calling between WebRTC clients


#21

@jcolp Please excuse me for the questions. I am asking all those because I didn’t have experience on these things.


#22

You gain experience through experimentation and trying to understand things, reading the information you have, reading documentation. The forum is best used when you have exhausted that - otherwise to the volunteers here it’s as if you are asking them to help you completely set up what you are trying to do.


#23

@jcolp Now we are able to do outgoing calls through webrtc client and audio is working fine. But for incoming calls, call was landing to the agent but for the dialer is getting ring tone and after few seconds the call is getting hangup.


#24

There’s nothing else I can really add or say, if you provide console output/logging for this then maybe I can.


#25

Below is the output when we are getting incoming call.

– Starting simple switch on ‘DAHDI/1-1’
– Executing [s@from-pstn:1] Set(“DAHDI/1-1”, “ODBC_SAVE_CDR()=, ,”) in new stack
[May 15 15:41:46] WARNING[607][C-00000039]: func_odbc.c:477 execute: SQL Execute returned an error -1: 42000: [MySQL][ODBC 5.1 Driver][mysqld-5.1.73]You have an error in your SQL syntax; check the manual that corresponds to your MySQL serve r version for the right syntax to use near ‘,)’ at line 1 (200)
[May 15 15:41:46] WARNING[607][C-00000039]: func_odbc.c:486 execute: SQL Exec Di rect failed (-1)![INSERT INTO CDR_Report VALUES (,)]
– Executing [s@from-pstn:2] Set(“DAHDI/1-1”, “MONITOR_FILENAME=20170515-154 146-9000957493”) in new stack
– Executing [s@from-pstn:3] MixMonitor(“DAHDI/1-1”, “/var/www/html/httpshar e/record/incoming/20170515-154146-9000957493.wav,b”) in new stack
– Executing [s@from-pstn:4] GotoIfTime(“DAHDI/1-1”, “23:06-08:59|mon-sat|| ?fail") in new stack
– Executing [s@from-pstn:5] GotoIfTime(“DAHDI/1-1”, "00:00-23:59|sun|
|
?fa il”) in new stack
== Begin MixMonitor Recording DAHDI/1-1
– Executing [s@from-pstn:6] GotoIfTime(“DAHDI/1-1”, “09:00-23:05|mon-sat|*| *?suc”) in new stack
– Goto (from-pstn,s,7)
– Executing [s@from-pstn:7] Dial(“DAHDI/1-1”, “SIP/6000,20”) in new stack
== DTLS ECDH initialized (secp256r1), faster PFS enabled
== Using SIP RTP CoS mark 5
– Called SIP/6000
Nobody picked up in 20000 ms
– Executing [s@from-pstn:8] Hangup(“DAHDI/1-1”, “”) in new stack
== Spawn extension (from-pstn, s, 8) exited non-zero on ‘DAHDI/1-1’
– Hanging up on ‘DAHDI/1-1’
– Hungup ‘DAHDI/1-1’
== MixMonitor close filestream (mixed)
== End MixMonitor Recording DAHDI/1-1


#26

Below is my extensions.conf for incoming calls.

[from-pstn]

exten => s,1,Set(ODBC_SAVE_CDR()=${uniqueid},${calldate},${clid},${src},${dst},${dcontext},${channel},${dstchannel},${lastapp},${lastdata},${start},${answer},${end},${duration},${billsec},${disposition})
exten => s,n,Set(MONITOR_FILENAME=${STRFTIME(${EPOCH},%Y%m%d-%H%M%S)}-${CALLERID(num)})

exten => s,n,MixMonitor(/var/www/html/httpshare/record/incoming/${MONITOR_FILENAME}.wav,b)

exten => s,n,GoToIfTime(23:06-08:59|mon-sat||?fail)

exten => s,n,GoToIfTime(00:00-23:59|sun||?fail)

exten => s,n,GoToIfTime(09:00-23:05|mon-sat||?suc)

exten => s,n(suc),Dial(SIP/6000,20)

exten => s,n,Hangup

exten => s,n(fail),Answer

exten => s,n,Playback(./welcome)

exten => s,n,Hangup


#27

You called it for 20 seconds, and it did not pick up, as the message said.


#28

But I pick the phone in my web phone it is showing that in call but in my mobile it’s ringing.


#29

You’ll need to provide the “sip set debug on” to show what Asterisk actually got. If it didn’t receive an answer, then you’ll see the above.


#30

@jcolp please find the attached output of “sip set debug on”.

SIP-Debug1.txt (241.2 KB)


#31

It does not appear as though any response was received from the remote. You’ll need to investigate why that is, seeing if the other side received it, if it had problems with it, or some other reason.


#32

But there is no issue with outgoing calls. We are able to do outgoing calls from web phone.


#33

That doesn’t change the fact this isn’t working, so you need to investigate further and dig in to determine why.


#34

Ok thank you @jcolp for your response. Please share me any document to configure webrtc from scratch.


#35

There is a tutorial[1] on the wiki. This does not cover digging into every problem that may occur with WebRTC, though.

[1] https://wiki.asterisk.org/wiki/display/AST/WebRTC+tutorial+using+SIPML5


#36

@jcolp
Is libsrtp-devel is required to install for webrtc


#37

SRTP is mandatory for WebRTC so yes.


#38

@jcolp Getting below error while installing libsrtp-devel dependency.

[root@Nipun ~]# yum install libsrtp-devel
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Determining fastest mirrors
epel/metalink | 5.4 kB 00:00

  • base: mirror.fibergrid.in
  • epel: mirror.pregi.net
  • extras: mirror.fibergrid.in
  • updates: mirror.fibergrid.in
    asterisk-11 | 1.1 kB 00:00
    asterisk-current | 1.1 kB 00:00
    base | 3.7 kB 00:00
    digium-11 | 951 B 00:00
    digium-current | 1.1 kB 00:00
    epel | 4.3 kB 00:00
    epel/primary_db | 5.0 MB 00:26
    extras | 3.3 kB 00:00
    mariadb | 2.9 kB 00:00
    updates | 3.4 kB 00:00
    Resolving Dependencies
    –> Running transaction check
    —> Package libsrtp-devel.i686 0:1.4.4-4.20101004cvs.el6 will be updated
    —> Package libsrtp-devel.i686 0:1.5.4-3.el6 will be an update
    –> Processing Dependency: libsrtp(x86-32) = 1.5.4-3.el6 for package: libsrtp-devel-1.5.4-3.el6.i686
    –> Processing Dependency: libsrtp.so.1 for package: libsrtp-devel-1.5.4-3.el6.i686
    –> Running transaction check
    —> Package libsrtp.i686 0:1.4.4-4.20101004cvs.el6 will be updated
    –> Processing Dependency: libsrtp.so.0 for package: pjproject-2.3-0.digium3.1_centos6.i686
    –> Processing Dependency: libsrtp.so.0 for package: asterisk-core-11.17.1-1_centos6.i686
    —> Package libsrtp.i686 0:1.5.4-3.el6 will be an update
    –> Running transaction check
    —> Package libsrtp.i686 0:1.4.4-4.20101004cvs.el6 will be updated
    –> Processing Dependency: libsrtp.so.0 for package: asterisk-core-11.17.1-1_centos6.i686
    —> Package pjproject.i686 0:2.3-0.digium3.1_centos6 will be updated
    –> Processing Dependency: pjproject = 2.3-0.digium3.1_centos6 for package: pjproject-devel-2.3-0.digium3.1_centos6.i686
    —> Package pjproject.i686 0:2.3-7.el6 will be an update
    –> Running transaction check
    —> Package libsrtp.i686 0:1.4.4-4.20101004cvs.el6 will be updated
    –> Processing Dependency: libsrtp.so.0 for package: asterisk-core-11.17.1-1_centos6.i686
    —> Package pjproject-devel.i686 0:2.3-0.digium3.1_centos6 will be updated
    —> Package pjproject-devel.i686 0:2.3-7.el6 will be an update
    –> Finished Dependency Resolution
    Error: Package: asterisk-core-11.17.1-1_centos6.i686 (@asterisk-11)
    Requires: libsrtp.so.0
    Removing: libsrtp-1.4.4-4.20101004cvs.el6.i686 (@asterisk-current)
    libsrtp.so.0
    Updated By: libsrtp-1.5.4-3.el6.i686 (epel)
    Not found
    You could try using --skip-broken to work around the problem
    You could try running: rpm -Va --nofiles --nodigest

#39

I don’t use Redhat based distributions and have no comments on that.


#40

@jcolp Thank you for the support.

Please some one help me on this.