Re: [asterisk-users] WebRTC demo phones

2015-03-12 Thread Olli Heiskanen
Hello David,

I'd recommend trying http://sipjs.com/ , it's similar to sipjs but you can
choose which kind of media it uses via a configuration object:
http://sipjs.com/guides/make-call/

Check out the guides, they are extremely clear and informative:
http://sipjs.com/guides/

cheers,
Olli


2015-03-12 9:20 GMT+02:00 Mitul Limbani mi...@enterux.in:

 Sipml5 works. You need to have TLS enabled on asterisk web socket.

 Mitul
 On 12-Mar-2015 12:47 PM, David Cunningham dcunning...@voisonics.com
 wrote:

 Hello,

 Can anyone recommend a particular online WebRTC phone for testing with
 Asterisk?

 We tried:

 - JsSIP, but even with the enable video checkbox disabled it sends
 video options in the INVITE SDP and Asterisk rejects it with Rejecting
 secure video stream without encryption details.

 - sipML5, but it won't register, perhaps something to do with not using
 the Asterisk Websocket server (which I don't see an option to choose)

 - Janus, but the INVITE SDP contains RTP/AVP not RTP/SAVP, and
 Asterisk rejects it with We are requesting SRTP for audio, but they
 responded without it!

 Thanks for any suggestions.

 --
 David Cunningham, Voisonics
 http://voisonics.com/
 USA: +1 213 221 1092
 UK: +44 (0) 20 3298 1642
 Australia: +61 (0) 2 8063 9019

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Question regarding custom announcements used by several Asterisk servers

2015-02-06 Thread Olli Heiskanen
Oops, quite right, how typoful of me!

Thanks for the excellent points, I'll look into gluster and puppet and see
may way onwards from there.

cheers,
Olli

2015-02-06 12:32 GMT+02:00 Gareth Blades mailinglist+aster...@dns99.co.uk:

 On 06/02/15 07:54, Olli Heiskanen wrote:

 My goal is to allow my users record their own queue announcements and
 choose which announcements they want to use in each queue. I have several
 Asterisk servers and a Kamailio server which dispatches call traffic
 between the Asterisks. Question is, is it possible to have something like a
 NSF disk shared between several asterisk servers and store custom
 announcements there, where all Asterisks would use them? I expect to have
 to place the files under whatever I configure in asterisk.conf.
 Additionally, can I place the announcements in subfolders under that
 directory and in my realtime queue table use values something like
 '/subfldr/myannouncement'?


 I assume you mean NFS.
 Yes you can do that although using NFS you will then have a single point
 of failure and in the standard NFS client configuration if you try to
 access a file which is on NFS but it is unavailable then the file access
 will hang.

 So you might be better off having the files copied onto each of the
 asterisks servers local file storage or use a redundant file system such as
 gluster.



 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Question regarding custom announcements used by several Asterisk servers

2015-02-05 Thread Olli Heiskanen
Hello,

Got a question regarding custom announcements in Asterisk.

My goal is to allow my users record their own queue announcements and
choose which announcements they want to use in each queue. I have several
Asterisk servers and a Kamailio server which dispatches call traffic
between the Asterisks. Question is, is it possible to have something like a
NSF disk shared between several asterisk servers and store custom
announcements there, where all Asterisks would use them? I expect to have
to place the files under whatever I configure in asterisk.conf.
Additionally, can I place the announcements in subfolders under that
directory and in my realtime queue table use values something like
'/subfldr/myannouncement'?

Keep up the good work!

cheers,
Olli
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Problem with odbc connector with cdr

2015-02-03 Thread Olli Heiskanen
Hello,

I'm stuck with getting cdr records stored in MySql database. I have a
working realtime environment and have verified that the db connection works
fine when used via res_config_mysql.conf. I'd appreciate Your help on how
to get the odbc connector working as I think there's something wrong with
its configuration.

The problem presented itself as an error when making a call that was
supposed to be stored in mysql cdr: Unable to retrieve database handle.
CDR failed.
This kept popping up every time I was trying to have a call be stored in my
mysql cdr table, and I traced the problem to the odbc connector, where my
knowhow is about to end.

One problem may be that odbcinst -j outputs wrong ini files, I believe I
need these to be under /etc/ instead of /usr/local/etc/, but I'm unsure
about how to change those permanently.

# odbcinst -j
unixODBC 2.3.2
DRIVERS: /usr/local/etc/odbcinst.ini
SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini
FILE DATA SOURCES..: /usr/local/etc/ODBCDataSources
USER DATA SOURCES..: /root/.odbc.ini
SQLULEN Size...: 4
SQLLEN Size: 4
SQLSETPOSIROW Size.: 2

Odbcinst does see the connection, it reads it from
/usr/local/etc/odbcinst.ini.
# odbcinst -q -d
[MySQL]

I tried copying my connection information onto those files listed above and
I'm not getting any errors in Asterisk logs when restarting Asterisk.
However:
# echo select 1 | isql -v MySQL
[IM002][unixODBC][Driver Manager]Data source name not found, and no default
driver specified
[ISQL]ERROR: Could not SQLConnect


Here's the contents of odbc.ini:

[MySQL-asterisk]
Description = MySQL Asterisk database
Trace = Off
TraceFile = stderr
Driver = MySQL
SERVER = serverip
USER = myuser
PASSWORD = mypass
PORT = 3306
DATABASE = asterisk

And odbcinst.ini:
[MySQL]
Description = ODBC for MySQL
Driver  = /usr/lib/libmyodbc5.so
Setup   = /usr/lib/libodbcmyS.so
Driver64= /usr/lib64/libmyodbc5.so
Setup64 = /usr/lib64/libodbcmyS.so
FileUsage   = 1

And here I hit a wall, how can I fix the configuration?


MySQL-asterisk is referred to in res_odbc.conf, whose label is referred to
in cdr_odbc.conf. When the odbc connector starts working, is this the
correct way to configure the cdr db connection in Asterisk?

Thanks,
Olli
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Problem with odbc connector with cdr

2015-02-03 Thread Olli Heiskanen
Thanks John,

At first got an error using MySQL-asterisk, but then I removed /etc/ ini
files and used the DSN in /usr/local/etc/odbc.ini, that did the trick for
isql. I must have created the files /etc/ while following a guide online.
Nice!

After some meddling with the Asterisk conf files to have the correct values
I got the cdrs working, thanks dude!

cheers,
Olli






2015-02-03 18:04 GMT+02:00 John Kiniston johnkinis...@gmail.com:

 I notice you have MySQL-asterisk as your definition in your odbc.ini but
 you are trying to connect to simply 'MySQL' with your 'isql' command.

 Does isql work with 'MySQL-asterisk' as the DSN instead of simply 'MySQL' ?

 I have machines that use /etc/odbc.ini and machines that use
 /usr/local/etc/odbc.ini depending on if I used a package to instal ODBC or
 if I compiled ODBC myself.

 On Tue, Feb 3, 2015 at 1:35 AM, Olli Heiskanen 
 ohjelmistoarkkite...@gmail.com wrote:


 Hello,

 I'm stuck with getting cdr records stored in MySql database. I have a
 working realtime environment and have verified that the db connection works
 fine when used via res_config_mysql.conf. I'd appreciate Your help on how
 to get the odbc connector working as I think there's something wrong with
 its configuration.

 The problem presented itself as an error when making a call that was
 supposed to be stored in mysql cdr: Unable to retrieve database handle.
 CDR failed.
 This kept popping up every time I was trying to have a call be stored in
 my mysql cdr table, and I traced the problem to the odbc connector, where
 my knowhow is about to end.

 One problem may be that odbcinst -j outputs wrong ini files, I believe I
 need these to be under /etc/ instead of /usr/local/etc/, but I'm unsure
 about how to change those permanently.

 # odbcinst -j
 unixODBC 2.3.2
 DRIVERS: /usr/local/etc/odbcinst.ini
 SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini
 FILE DATA SOURCES..: /usr/local/etc/ODBCDataSources
 USER DATA SOURCES..: /root/.odbc.ini
 SQLULEN Size...: 4
 SQLLEN Size: 4
 SQLSETPOSIROW Size.: 2

 Odbcinst does see the connection, it reads it from
 /usr/local/etc/odbcinst.ini.
 # odbcinst -q -d
 [MySQL]

 I tried copying my connection information onto those files listed above
 and I'm not getting any errors in Asterisk logs when restarting Asterisk.
 However:
 # echo select 1 | isql -v MySQL
 [IM002][unixODBC][Driver Manager]Data source name not found, and no
 default driver specified
 [ISQL]ERROR: Could not SQLConnect


 Here's the contents of odbc.ini:

 [MySQL-asterisk]
 Description = MySQL Asterisk database
 Trace = Off
 TraceFile = stderr
 Driver = MySQL
 SERVER = serverip
 USER = myuser
 PASSWORD = mypass
 PORT = 3306
 DATABASE = asterisk

 And odbcinst.ini:
 [MySQL]
 Description = ODBC for MySQL
 Driver  = /usr/lib/libmyodbc5.so
 Setup   = /usr/lib/libodbcmyS.so
 Driver64= /usr/lib64/libmyodbc5.so
 Setup64 = /usr/lib64/libodbcmyS.so
 FileUsage   = 1

 And here I hit a wall, how can I fix the configuration?


 MySQL-asterisk is referred to in res_odbc.conf, whose label is referred
 to in cdr_odbc.conf. When the odbc connector starts working, is this the
 correct way to configure the cdr db connection in Asterisk?

 Thanks,
 Olli

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users




 --
 A human being should be able to change a diaper, plan an invasion, butcher
 a hog, conn a ship, design a building, write a sonnet, balance accounts,
 build a wall, set a bone, comfort the dying, take orders, give orders,
 cooperate, act alone, solve equations, analyze a new problem, pitch manure,
 program a computer, cook a tasty meal, fight efficiently, die gallantly.
 Specialization is for insects.
 ---Heinlein

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Asterisk removes a charachter from sip peer name

2015-01-05 Thread Olli Heiskanen
Perfect, that's it! Thank you Paddy for pointing that out to me, I had
totally missed it!

Thanks,
Olli

2015-01-05 15:15 GMT+02:00 Paddy Grice pa...@wizaner.com:

  *From:* asterisk-users-boun...@lists.digium.com [mailto:
 asterisk-users-boun...@lists.digium.com] *On Behalf Of *Olli Heiskanen
 *Sent:* 03 January 2015 08:04
 *To:* Asterisk Users Mailing List - Non-Commercial Discussion
 *Subject:* [asterisk-users] Asterisk removes a charachter from sip peer
 name



 Hello all,

 Just wondering on a behavior I noticed while testing with realtime sip
 peers with names like 111@mydomain.com. Using Kamailio as outbound
 proxy, it sends Asterisk a sip message where To header value is 
 sip:111@mydomain.com and From header has value username 
 sip:111@mydomain.com;transport=UDP;tag=fc609171. When Asterisk sends
 out the sip message, the To header is as it was but as for From header,
 Asterisk removes the . charachter from the user part of the sip uri, thus
 resulting in 111333. Also the Contact header is affected the same way.

 I was wondering what might be causing this? Does Asterisk not allow dots
 in the peer names? The call itself connects so it's not much of an issue
 but it would be good to know about this, as of course there's a chance I've
 just missed something relevant.

 cheers,
 Olli

 Sounds a bit like

 From sip.conf

 ; The shrinkcallerid function removes '(', ' ', ')', non-trailing '.', and
 '-' not
 ; in square brackets.  For example, the caller id value 555. becomes
 555
 ; when this option is enabled.  Disabling this option results in no
 modification
 ; of the caller id value, which is necessary when the caller id represents
 something
 ; that must be preserved.  This option can only be used in the [general]
 section.
 ; By default this option is on.
 ;
 ;shrinkcallerid=yes ; on by default
 Paddy


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Asterisk removes a charachter from sip peer name

2015-01-03 Thread Olli Heiskanen
Hello all,

Just wondering on a behavior I noticed while testing with realtime sip
peers with names like 111@mydomain.com. Using Kamailio as outbound
proxy, it sends Asterisk a sip message where To header value is 
sip:111@mydomain.com and From header has value username 
sip:111@mydomain.com;transport=UDP;tag=fc609171. When Asterisk sends
out the sip message, the To header is as it was but as for From header,
Asterisk removes the . charachter from the user part of the sip uri, thus
resulting in 111333. Also the Contact header is affected the same way.

I was wondering what might be causing this? Does Asterisk not allow dots in
the peer names? The call itself connects so it's not much of an issue but
it would be good to know about this, as of course there's a chance I've
just missed something relevant.

cheers,
Olli
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Inbound call from sip peer to internal webrtc peer fails while internal sip-webrtc calls work

2014-12-05 Thread Olli Heiskanen
Hello,

I'd appreciate your comments on the following problem I'm having, please
forgive me if this is something obvious, I've been scratching my head on
this for a while:

I have Asterisk+Kamailio setup where I'm currently testing inbound calls
from outside. I have both webrtc and sip clients, where webrtc peers are
defined according to sip.js instructions (
http://sipjs.com/guides/server-configuration/asterisk/). Calls between
these work nicely without problems. Now when I call from outside, from an
external Asterisk 11.5 server, I end up having problems calling from a sip
client to a webrtc client. The Asterisk I have on my main testing server is
the latest current 11.14.1.

When there's an internal call, Asterisk changes the sdp in the INVITE
message and handles the rtp nicely, but it does not do so when the call
comes from outside. Why not? Instead, it sends back 488 Not acceptable
here. If I react to that in Kamailio and use rtpengine to rewrite the sdp,
Asterisk accepts the INVITE and sends it to the websocket peer, but the sdp
contains a very simple sdp with RTP/AVP profile. This I'd consider invalid
behavior, since Asterisk knows the called party is webrtc and the INVITE
already contains valid sdp with RTP/SAVPF profile. It's likely I have
something wrong in my setup, or maybe I've overlooked something relevant?

Question is, what is causing this behavior and what can I do to fix it?
Either I'd need Asterisk to handle the sdp and rtp like it does for
internal calls (which would be preferable in this case) or after the 488
sent by Asterisk I'd need Asterisk to relay the sdp offered by
Kamailio/rtpengine as such without rewriting it.


Here the call works fine (internal call from sip peer 771 to webrtc peer
660):

INVITE that Asterisk (at port 5070) receives:
PU.BL.IC.IP:5060  PU.BL.IC.IP:5070: SIP, length: 1046
INVITE sip:6...@testers.com;transport=UDP SIP/2.0
Record-Route: sip:PU.BL.IC.IP;lr=on;ftag=41030177
Via: SIP/2.0/UDP
PU.BL.IC.IP;branch=z9hG4bKd7b.ca8b6ac6a82d605cf658af0fea7c9e86.0
Via: SIP/2.0/UDP
AST.ER.ISK.IP:38699;rport=38699;branch=z9hG4bK-d8754z-bd00e9fd46368417-1---d8754z-
Max-Forwards: 69
Contact: sip:7...@ast.er.isk.ip:38699;transport=UDP
To: sip:6...@testers.com;transport=UDP
From: 771sip:7...@testers.com;transport=UDP;tag=41030177
Call-ID: YWYwMjMwMmZlODEwM2MwODdjZWJmYjc2NjM5ZmIyNzk.
CSeq: 2 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO,
SUBSCRIBE
Content-Type: application/sdp
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
User-Agent: Z 3.2.21357 r21367
Allow-Events: presence, kpml
Content-Length: 239

v=0
o=Z 0 0 IN IP4 AST.ER.ISK.IP
s=Z
c=IN IP4 AST.ER.ISK.IP
t=0 0
m=audio 8000 RTP/AVP 3 110 8 0 98 101
a=rtpmap:110 speex/8000
a=rtpmap:98 iLBC/8000
a=fmtp:98 mode=20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv

Invite that Asterisk sends:
PU.BL.IC.IP:5070  PU.BL.IC.IP:5060: SIP, length: 1238
INVITE sip:6...@pu.bl.ic.ip:5060 SIP/2.0
Via: SIP/2.0/UDP PU.BL.IC.IP:5070;branch=z9hG4bK26a2386a;rport
Max-Forwards: 70
From: 771 win8 minipc sip:7...@testers.com:5070;tag=as05e60cc6
To: sip:6...@pu.bl.ic.ip:5060
Contact: sip:7...@pu.bl.ic.ip:5070
Call-ID: 7985f7161fcf1a6824b8388d451be...@testers.com
CSeq: 102 INVITE
User-Agent: I Am the Devil
Date: Fri, 05 Dec 2014 15:50:33 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 663

v=0
o=root 777617621 777617621 IN IP4 PU.BL.IC.IP
s=Asterisk PBX 11.14.1
c=IN IP4 PU.BL.IC.IP
t=0 0
m=audio 15662 RTP/SAVPF 0 3 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=ice-ufrag:75a7e84431d15f682bd728ee10bd867d
a=ice-pwd:028c19574216643c12188a8530f278f8
a=candidate:H5bdd423d 1 UDP 2130706431 PU.BL.IC.IP 15662 typ host
a=candidate:H5bdd423d 2 UDP 2130706430 PU.BL.IC.IP 15663 typ host
a=connection:new
a=setup:actpass
a=fingerprint:SHA-256
CE:EE:D9:28:EA:B0:6E:D0:CE:4F:5A:9A:FB:53:66:74:83:47:18:37:2F:76:C1:6D:10:C0:EE:FF:A4:56:F4:05
a=sendrecv


Here the call fails (sip peer 201 calls from outside the server to webrtc
peer 660):

Invite that Asterisk receives:
PU.BL.IC.IP:5060  PU.BL.IC.IP:5070: SIP, length: 1345
INVITE sip:660%40testers@pu.bl.ic.ip SIP/2.0
Record-Route: sip:PU.BL.IC.IP;lr=on;ftag=as4647f03c;nat=yes
Via: SIP/2.0/UDP
PU.BL.IC.IP;branch=z9hG4bK3264.8a896801756c527f2496fdc14e3f30ad.0
Via: SIP/2.0/UDP 192.168.0.201:5060
;rport=5060;received=AST.ER.ISK.IP;branch=z9hG4bK56f5698e
Max-Forwards: 69
From: Pirjo Ahvenainen sip:201@192.168.0.201;tag=as4647f03c
To: sip:660%40testers@pu.bl.ic.ip
Contact: sip:201@192.168.0.201:5060;alias=AST.ER.ISK.IP~5060~1
Call-ID: 69e66f05330de0063b5eba760191da6c@192.168.0.201:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 11.5.0
Date: Tue, 02 Dec 2014 08:34:57 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,

Re: [asterisk-users] Inbound call from sip peer to internal webrtc peer fails while internal sip-webrtc calls work

2014-12-05 Thread Olli Heiskanen
Hello,

Thanks Gareth for your reply. I assume you're referring to the first INVITE
in my message, which is from the call that works. I don't know why the sdp
displays only iLBC and speex at that point but the Zoiper client that's
making the call is configured to support gsm, speex, ulaw, alaw, and iLBC,
and the call works fine, audio and all, as the sdp that leaves Asterisk
(thus reaches the called peer) actually contains ulaw, gsm and alaw.

In the failing case Asterisk sends the INVITE via Kamailio to the called
webrtc client, and in this message the rtp profile is m=audio 12902 RTP/AVP
0 3 8 101. Kamailio sends the INVITE to the client, which responds with
488. Kamailio notices this and uses rtpengine to handle the rtp, but: the
client will not accept a second INVITE even though the sdp is correct this
time: the client responds with 482 Loop Detected because the Call-ID is the
same as the previous INVITE it got. This is why I can't handle the rtp
using rtpengine, and here things have already gone wrong. So I need the
INVITE to contain correct sdp when it leaves Asterisk, so sdp conversion
and rtpengine would net be needed. Wonder if there's any way to do that?

cheers,
Olli




2014-12-05 18:53 GMT+02:00 Gareth Blades mailinglist+aster...@dns99.co.uk:

  On 05/12/14 16:46, Olli Heiskanen wrote:

 INVITE that Asterisk (at port 5070) receives:
 PU.BL.IC.IP:5060  PU.BL.IC.IP:5070: SIP, length: 1046
  INVITE sip:6...@testers.com;transport=UDP SIP/2.0
  Record-Route: sip:PU.BL.IC.IP;lr=on;ftag=41030177
  Via: SIP/2.0/UDP
 PU.BL.IC.IP;branch=z9hG4bKd7b.ca8b6ac6a82d605cf658af0fea7c9e86.0
  Via: SIP/2.0/UDP
 AST.ER.ISK.IP:38699;rport=38699;branch=z9hG4bK-d8754z-bd00e9fd46368417-1---d8754z-
  Max-Forwards: 69
  Contact: sip:7...@ast.er.isk.ip:38699;transport=UDP
 sip:7...@ast.er.isk.ip:38699;transport=UDP
  To: sip:6...@testers.com;transport=UDP
  From: 771sip:7...@testers.com;transport=UDP;tag=41030177
  Call-ID: YWYwMjMwMmZlODEwM2MwODdjZWJmYjc2NjM5ZmIyNzk.
  CSeq: 2 INVITE
  Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO,
 SUBSCRIBE
  Content-Type: application/sdp
  Supported: replaces, norefersub, extended-refer, timer,
 X-cisco-serviceuri
  User-Agent: Z 3.2.21357 r21367
  Allow-Events: presence, kpml
  Content-Length: 239

  v=0
  o=Z 0 0 IN IP4 AST.ER.ISK.IP
  s=Z
  c=IN IP4 AST.ER.ISK.IP
  t=0 0
  m=audio 8000 RTP/AVP 3 110 8 0 98 101
  a=rtpmap:110 speex/8000
  a=rtpmap:98 iLBC/8000
  a=fmtp:98 mode=20
  a=rtpmap:101 telephone-event/8000
  a=fmtp:101 0-15
  a=sendrecv


 This client is saying it only supports speex and iLBC and would prefer
 them in that order.
 Your sip.conf appears to only permit alaw, ulaw and gsm so there is no
 mutual supported codec and hence the call fails.


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Asterisk removes ice lines in sdp when calling between webrtc clients

2014-10-07 Thread Olli Heiskanen
Hi,

Thanks Matthew for trying to reproduce the problem, I appreciate your
efforts very much.

There must be something off in my setup in one way or another. I could just
discard this server and build a new one, but I think it's not good practice
to leave a problem unsolved, so I'll continue trying to figure this out.
One thing I noticed - don't know if it's relevant or not - due to a repo
mismatch, I had problems with updating libgdiplus and libgdiplus-devel
package, had to disable a repo and reinstall those and my mono installation
(which is making me lose my hair).

Is there a way to debug Asterisk itself? Or find the code that parses the
outbound sdp? I figured there must be an if statement or more that
determines whether or not to parse the ice lines into the sdp body. Finding
that/those statements that produce the kind of sdp I'm seeing Asterisk send
out, might tell something about what's wrong with my setup. As my c is not
exactly fluent I wasn't sure which code files to search, can you guys help
out with that?

cheers,
Olli



2014-10-03 11:31 GMT+03:00 Matthew Jordan mjor...@digium.com:

 On Thu, Oct 2, 2014 at 10:18 AM, Olli Heiskanen
 ohjelmistoarkkite...@gmail.com wrote:
  Hi,
 
  Thanks Eric for your reply, yes I know Asterisk replaces the sdp,
 however it
  should create ice lines when calling to a webrtc client, which it is
  currently not doing.
 
  To recap my problem (check previous messages for details); I have 2
 webrtc
  clients (sip.js on chrome) with realtime information that appears to be
  correct. When calling from A to B, INVITE coming to Asterisk contains
  correct sdp, but when the INVITE leaves Asterisk, the sdp lacks ice
 lines.
 

 Unfortunately, I can't reproduce this. We've been running a lot of
 tests with a variety of SIP clients over the past week here at SIPit -
 both with and without ICE - and I haven't had a single instance of
 Asterisk failing to provide any ICE candidates when it is properly
 configured to do so.

 --
 Matthew Jordan
 Digium, Inc. | Engineering Manager
 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
 Check us out at: http://digium.com  http://asterisk.org

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Asterisk removes ice lines in sdp when calling between webrtc clients

2014-10-07 Thread Olli Heiskanen
Hi Joshua,

Excellent! I didn't even remember to consider newer versions of asterisk as
11.11 was the latest one when I started building on. I have had libuuid and
libuuid-devel installed the whole time, but perhaps 11.11 just did not see
it there. I just installed 11.13 and it works perfectly.

Thank you sir, I will raise a drink for you next time I'm out.

cheers,
Olli

2014-10-07 16:55 GMT+03:00 Joshua Colp jc...@digium.com:

 Olli Heiskanen wrote:

 Hi,

 Thanks Matthew for trying to reproduce the problem, I appreciate your
 efforts very much.

 There must be something off in my setup in one way or another. I could
 just discard this server and build a new one, but I think it's not good
 practice to leave a problem unsolved, so I'll continue trying to figure
 this out. One thing I noticed - don't know if it's relevant or not - due
 to a repo mismatch, I had problems with updating libgdiplus and
 libgdiplus-devel package, had to disable a repo and reinstall those and
 my mono installation (which is making me lose my hair).


 I would suggest using the latest version of 11 (as older versions will not
 work with current browsers). As well do you have the uuid development
 library installed? If not pjproject won't be built and you won't have ICE
 support which will yield exactly this result.

 --
 Joshua Colp
 Digium, Inc. | Senior Software Developer
 445 Jan Davis Drive NW - Huntsville, AL 35806 - US
 Check us out at: www.digium.com  www.asterisk.org


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Asterisk removes ice lines in sdp when calling between webrtc clients

2014-10-02 Thread Olli Heiskanen
Hi,

Is there anything I can do with this problem? Re-installing Asterisk does
not solve this and the problem still persists. Or is there any other logs
or configurations I can provide to help figure out why Asterisk is removing
lines from the sdp?

Any ideas would be greatly appreciated! I also tried removing everything
under /etc/asterisk/ and make samples to restore any errors I could have
had in my configurations, then restoring my minimal configuration:
asterisk.conf, extconfig.conf, extensions.conf, res_mysql.conf and
sip.conf. This did not help.

(in case this message comes double, I just canceled posting of previous
similar one as it was too big)

cheers,
Olli
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Asterisk removes ice lines in sdp when calling between webrtc clients

2014-10-02 Thread Olli Heiskanen
Hi,

Thanks Eric for your reply, yes I know Asterisk replaces the sdp, however
it should create ice lines when calling to a webrtc client, which it is
currently not doing.

To recap my problem (check previous messages for details); I have 2 webrtc
clients (sip.js on chrome) with realtime information that appears to be
correct. When calling from A to B, INVITE coming to Asterisk contains
correct sdp, but when the INVITE leaves Asterisk, the sdp lacks ice lines.

cheers,
Olli

2014-10-02 18:13 GMT+03:00 Eric Wieling ewiel...@nyigc.com:

 Asterisk is not a SIP Proxy.   It is a B2BUA and will **always** replace
 the SDP with its own.



 *From:* asterisk-users-boun...@lists.digium.com [mailto:
 asterisk-users-boun...@lists.digium.com] *On Behalf Of *Olli Heiskanen
 *Sent:* Thursday, October 02, 2014 9:06 AM
 *To:* Asterisk Users Mailing List - Non-Commercial Discussion
 *Subject:* Re: [asterisk-users] Asterisk removes ice lines in sdp when
 calling between webrtc clients




 Hi,



 Is there anything I can do with this problem? Re-installing Asterisk does
 not solve this and the problem still persists. Or is there any other logs
 or configurations I can provide to help figure out why Asterisk is removing
 lines from the sdp?



 Any ideas would be greatly appreciated! I also tried removing everything
 under /etc/asterisk/ and make samples to restore any errors I could have
 had in my configurations, then restoring my minimal configuration:
 asterisk.conf, extconfig.conf, extensions.conf, res_mysql.conf and
 sip.conf. This did not help.



 (in case this message comes double, I just canceled posting of previous
 similar one as it was too big)



 cheers,

 Olli

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Asterisk removes ice lines in sdp when calling between webrtc clients

2014-09-08 Thread Olli Heiskanen
Hello,

I have a problem with a call between 2 webrtc clients. Asterisk removes the
ice-related lines from the sdp when it sends the INVITE out, and the called
webrtc client rejects the INVITE due to the missing ice lines. Both webrtc
clients are defined exactly the same way, same values in all fields except
the number of the peer.

There's probably something I've changed that causes this behavior. Can
anyone tell me what's wrong in my configuration?

res_rtp_asterisk is included in the compilation and uuid-devel is
installed, Asterisk version is 11.11.0. Ice is enabled in rtp.conf as well
as in both clients in the realtime sip peer table.

Here's my realtime peer data:
*CLI realtime load sippeers name 660
   Column Name  Column Value
    
id  4
  type  friend
  name  660
  host  dynamic
secret
encryption  yes
  avpf  yes
icesupport  yes  ICE is enabled
ipaddr  PU.BL.IC.IP
  port  5060
regseconds  1410185500
   defaultuser  660
   fullcontact  sip:6...@pu.bl.ic.ip:5060
lastms  0
 useragent
   context  default
   directmedia  no
  deny  0.0.0.0/0.0.0.0
permit  PU.BL.IC.IP
   nat  force_rport,comedia
  language
  disallow
 allow
 force_avp  yes
  callerid
  amaflags
   mailbox
  regexten
 regserver
fromdomain  testers.com
  videosupport  no
 contactpermit
   contactdeny
  fullname  660 win8
  hasvoicemail
  subscribemwi
dtlsenable  yes
dtlsverify  no
  dtlscertfile  /etc/asterisk/keys/asterisk.pem
dtlsprivatekey  /etc/asterisk/keys/asterisk.pem
 dtlssetup  actpass
 sippasswd  md5pwd
  rpid
domain  testers.com
sippasswd2

and my sip.conf:

[general]
bindport = 5070
bindaddr = PU.BL.IC.IP
udpbindaddr = PU.BL.IC.IP
tcpenable = yes
limitonpeers = yes
rtcachefriends = no
tos_sip=cs3
tos_audio=ef
realm = testers.com
autodomain=yes
domain=PU.BL.IC.IP
domain=testers.com
transport=ws,wss,udp
outboundproxy=PU.BL.IC.IP:5060


I'd appreciate Your advice.

cheers,
Olli
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Asterisk removes ice lines in sdp when calling between webrtc clients

2014-09-08 Thread Olli Heiskanen
) in new stack
-- Executing [661@default:2] Dial(SIP/660-0007,
SIP/661,3600,rt) in new stack
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
Audio is at 18366
Adding codec 13 (ulaw) to SDP
Adding codec 12 (gsm) to SDP
Adding codec 14 (alaw) to SDP
Adding codec 100017 (testlaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to PU.BL.IC.IP:5060:
INVITE sip:6...@pu.bl.ic.ip:5060 SIP/2.0
Via: SIP/2.0/UDP PU.BL.IC.IP:5070;branch=z9hG4bK4e738afa;rport
Max-Forwards: 70
From: 660 win8 sip:6...@testers.com;tag=as73376885
To: sip:6...@pu.bl.ic.ip:5060
Contact: sip:6...@pu.bl.ic.ip:5070
Call-ID: 2f70cc9567be50a46ba2879d4391a...@testers.com
CSeq: 102 INVITE
User-Agent: I Am the Devil
Date: Mon, 08 Sep 2014 15:15:37 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 437

v=0
o=root 630896079 630896079 IN IP4 PU.BL.IC.IP
s=Asterisk PBX 11.11.0
c=IN IP4 PU.BL.IC.IP
t=0 0
m=audio 18366 RTP/SAVPF 0 3 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=connection:new
a=setup:actpass
a=fingerprint:SHA-256
CE:EE:D9:28:EA:B0:6E:D0:CE:4F:5A:9A:FB:53:66:74:83:47:18:37:2F:76:C1:6D:10:C0:EE:FF:A4:56:F4:05
a=sendrecv

---

--- SIP read from UDP:PU.BL.IC.IP:5060 ---
SIP/2.0 100 trying -- your call is important to us
Via: SIP/2.0/UDP PU.BL.IC.IP:5070;branch=z9hG4bK4e738afa;rport=5070
From: 660 win8 sip:6...@testers.com;tag=as73376885
To: sip:6...@pu.bl.ic.ip:5060
Call-ID: 2f70cc9567be50a46ba2879d4391a...@testers.com
CSeq: 102 INVITE
Content-Length: 0

-
--- (7 headers 0 lines) ---
-- Called SIP/661

--- Transmitting (NAT) to PU.BL.IC.IP:5060 ---
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP
PU.BL.IC.IP;branch=z9hG4bK3cb9.e83bde7c484eec5374f679e7232435af.0;received=PU.BL.IC.IP;rport=5060
Via: SIP/2.0/WS
8d833dsg4asm.invalid;rport=47184;received=CL.IE.NT.IP;branch=z9hG4bK3627044
Record-Route: sip:PU.BL.IC.IP;r2=on;lr=on;ftag=856i7ei98p;nat=yes
Record-Route:
sip:PU.BL.IC.IP;transport=ws;r2=on;lr=on;ftag=856i7ei98p;nat=yes
From: 660 sip:6...@testers.com;tag=856i7ei98p
To: sip:6...@testers.com;tag=as4298ec2e
Call-ID: oc0ppijresm05k2emsgt
CSeq: 3394 INVITE
Server: I Am the Devil
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH, MESSAGE
Supported: replaces, timer
Contact: sip:6...@pu.bl.ic.ip:5070
Content-Length: 0




--- SIP read from UDP:PU.BL.IC.IP:5060 ---
SIP/2.0 404 No destinations
Via: SIP/2.0/UDP PU.BL.IC.IP:5070;branch=z9hG4bK4e738afa;rport=5070
From: 660 win8 sip:6...@testers.com;tag=as73376885
To: sip:6...@pu.bl.ic.ip:5060;tag=b552f34cdfad88fd2d6dc20c55c3a3ed-ba78
Call-ID: 2f70cc9567be50a46ba2879d4391a...@testers.com
CSeq: 102 INVITE
Content-Length: 0

-
--- (7 headers 0 lines) ---
Transmitting (NAT) to PU.BL.IC.IP:5060:
ACK sip:6...@pu.bl.ic.ip:5060 SIP/2.0
Via: SIP/2.0/UDP PU.BL.IC.IP:5070;branch=z9hG4bK4e738afa;rport
Max-Forwards: 70
From: 660 win8 sip:6...@testers.com;tag=as73376885
To: sip:6...@pu.bl.ic.ip:5060;tag=b552f34cdfad88fd2d6dc20c55c3a3ed-ba78
Contact: sip:6...@pu.bl.ic.ip:5070
Call-ID: 2f70cc9567be50a46ba2879d4391a...@testers.com
CSeq: 102 ACK
User-Agent: I Am the Devil
Content-Length: 0


---
Scheduling destruction of SIP dialog '
2f70cc9567be50a46ba2879d4391a...@testers.com' in 32000 ms (Method: INVITE)
  == Everyone is busy/congested at this time (1:0/0/1)
-- Executing [661@default:3] Hangup(SIP/660-0007, ) in new stack
  == Spawn extension (default, 661, 3) exited non-zero on 'SIP/660-0007'
Scheduling destruction of SIP dialog 'oc0ppijresm05k2emsgt' in 32000 ms
(Method: INVITE)

--- Reliably Transmitting (NAT) to PU.BL.IC.IP:5060 ---
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP
PU.BL.IC.IP;branch=z9hG4bK3cb9.e83bde7c484eec5374f679e7232435af.0;received=PU.BL.IC.IP;rport=5060
Via: SIP/2.0/WS
8d833dsg4asm.invalid;rport=47184;received=CL.IE.NT.IP;branch=z9hG4bK3627044
From: 660 sip:6...@testers.com;tag=856i7ei98p
To: sip:6...@testers.com;tag=as4298ec2e
Call-ID: oc0ppijresm05k2emsgt
CSeq: 3394 INVITE
Server: I Am the Devil
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0




--- SIP read from UDP:PU.BL.IC.IP:5060 ---
ACK sip:6...@testers.com SIP/2.0
Via: SIP/2.0/UDP
PU.BL.IC.IP;branch=z9hG4bK3cb9.e83bde7c484eec5374f679e7232435af.0
Max-Forwards: 69
To: sip:6...@testers.com;tag=as4298ec2e
From: 660 sip:6...@testers.com;tag=856i7ei98p
Call-ID: oc0ppijresm05k2emsgt
CSeq: 3394 ACK
Content-Length: 0

-
--- (8 headers 0 lines) ---
u363id562*CLI




2014-09-08 17:57 GMT+03:00 Matthew Jordan mjor...@digium.com:



 On Mon, Sep 8, 2014 at 9:48 AM, Olli Heiskanen 
 ohjelmistoarkkite...@gmail.com wrote:

 Hello,

 I have a problem with a call between 2 webrtc clients. Asterisk removes

Re: [asterisk-users] Asterisk removes ice lines in sdp when calling between webrtc clients

2014-09-08 Thread Olli Heiskanen
 Daylight Time) | sip.transport |
sending WebSocket message:

SIP/2.0 100 Trying
Via: SIP/2.0/WS
 PU.BL.IC.IP;branch=z9hG4bKff35.a9b596f609aadeccdf58183a9fe4fcba.1
Via: SIP/2.0/UDP PU.BL.IC.IP:5070;branch=z9hG4bK39a2221b;rport=5070
To: sip:6...@pu.bl.ic.ip:5060
From: 660 win8 sip:6...@testers.com;tag=as40c12073
Call-ID: 597260a76cb0cb9155392f3a3c0be...@testers.com
CSeq: 102 INVITE
Supported: gruu,outbound
Content-Length: 0

...

Mon Sep 08 2014 20:21:41 GMT+0300 (FLE Daylight Time) |
sip.inviteservercontext | invalid SDP sip-0.6.2.js:2655
Mon Sep 08 2014 20:21:41 GMT+0300 (FLE Daylight Time) |
sip.inviteservercontext | Failed to set remote offer sdp: Called with SDP
without ice-ufrag and ice-pwd. sip-0.6.2.js:2655
Mon Sep 08 2014 20:21:41 GMT+0300 (FLE Daylight Time) | sip.transport |
sending WebSocket message:

SIP/2.0 488 Not Acceptable Here
Via: SIP/2.0/WS
 PU.BL.IC.IP;branch=z9hG4bKff35.a9b596f609aadeccdf58183a9fe4fcba.0
Via: SIP/2.0/UDP PU.BL.IC.IP:5070;branch=z9hG4bK39a2221b;rport=5070
To: sip:6...@pu.bl.ic.ip:5060;tag=cl8lmb52gl
From: 660 win8 sip:6...@testers.com;tag=as40c12073
Call-ID: 597260a76cb0cb9155392f3a3c0be...@testers.com
CSeq: 102 INVITE
Supported: gruu,outbound
Content-Length: 0

...

Mon Sep 08 2014 20:21:41 GMT+0300 (FLE Daylight Time) | sip.transport |
received WebSocket text message:

ACK sip:v1vbuq35@0i03dp4lli27.invalid;transport=ws SIP/2.0
Via: SIP/2.0/WS
 PU.BL.IC.IP;branch=z9hG4bKff35.a9b596f609aadeccdf58183a9fe4fcba.0
Max-Forwards: 69
From: 660 win8 sip:6...@testers.com;tag=as40c12073
To: sip:6...@pu.bl.ic.ip:5060;tag=cl8lmb52gl
Call-ID: 597260a76cb0cb9155392f3a3c0be...@testers.com
CSeq: 102 ACK
Content-Length: 0





Thanks,
Olli



2014-09-08 18:50 GMT+03:00 Matthew Jordan mjor...@digium.com:



 On Mon, Sep 8, 2014 at 10:19 AM, Olli Heiskanen 
 ohjelmistoarkkite...@gmail.com wrote:

 Hi Matthew,

 Here's the debug output:





 --- SIP read from UDP:PU.BL.IC.IP:5060 ---
 INVITE sip:6...@testers.com SIP/2.0
 Record-Route: sip:PU.BL.IC.IP;r2=on;lr=on;ftag=856i7ei98p;nat=yes
 Record-Route:
 sip:PU.BL.IC.IP;transport=ws;r2=on;lr=on;ftag=856i7ei98p;nat=yes
 Via: SIP/2.0/UDP
 PU.BL.IC.IP;branch=z9hG4bK3cb9.e83bde7c484eec5374f679e7232435af.0
 Via: SIP/2.0/WS
 8d833dsg4asm.invalid;rport=47184;received=CL.IE.NT.IP;branch=z9hG4bK3627044
 Max-Forwards: 69
 To: sip:6...@testers.com
 From: 660 sip:6...@testers.com;tag=856i7ei98p
 Call-ID: oc0ppijresm05k2emsgt
 CSeq: 3394 INVITE
 Contact: sip:6...@testers.com
 ;gr=urn:uuid:81780308-9304-4e37-984f-a2e864b17bd3;alias=CL.IE.NT.IP~47184~5;alias=CL.IE.NT.IP~47184~5
 Allow: ACK,CANCEL,BYE,OPTIONS,INFO,NOTIFY,INVITE,MESSAGE
 Content-Type: application/sdp
 Supported: gruu,outbound
 User-Agent: SIP.js/0.6.2
 Content-Length: 1862

 v=0
 o=- 9082254022026432015 2 IN IP4 PU.BL.IC.IP
 s=-
 t=0 0
 a=group:BUNDLE audio
 a=msid-semantic: WMS JtsXs3B8wXmgyUYVkUGWHBYVYgX0aSC38IWx
 m=audio 10862 RTP/SAVPF 111 103 104 0 8 106 105 13 126
 c=IN IP4 PU.BL.IC.IP
 a=candidate:3350409123 1 udp 2122194687 192.168.0.101 65339 typ host
 generation 0
 a=candidate:3350409123 2 udp 2122194687 192.168.0.101 65339 typ host
 generation 0
 a=candidate:2301678419 1 tcp 1518214911 192.168.0.101 0 typ host
 generation 0
 a=candidate:2301678419 2 tcp 1518214911 192.168.0.101 0 typ host
 generation 0
 a=candidate:1190865175 1 udp 1685987071 CL.IE.NT.IP 65339 typ srflx raddr
 192.168.0.101 rport 65339 generation 0
 a=candidate:1190865175 2 udp 1685987071 CL.IE.NT.IP 65339 typ srflx raddr
 192.168.0.101 rport 65339 generation 0
 a=ice-ufrag:7N23UxBo9XUgx9pJ
 a=ice-pwd:jL7AIeiJD5byGDSapfSftPRl
 a=ice-options:google-ice
 a=fingerprint:sha-256
 93:E7:FC:E6:C2:74:71:2F:4F:81:43:7D:0C:A1:0F:C9:FC:3B:85:E6:44:2F:5A:39:05:79:DD:A6:0B:05:49:80
 a=setup:actpass
 a=mid:audio
 a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
 a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
 a=rtpmap:111 opus/48000/2
 a=fmtp:111 minptime=10
 a=rtpmap:103 ISAC/16000
 a=rtpmap:104 ISAC/32000
 a=rtpmap:0 PCMU/8000
 a=rtpmap:8 PCMA/8000
 a=rtpmap:106 CN/32000
 a=rtpmap:105 CN/16000
 a=rtpmap:13 CN/8000
 a=rtpmap:126 telephone-event/8000
 a=maxptime:60
 a=ssrc:1842567493 cname:aJCyVX5iKPNU6Gf8
 a=ssrc:1842567493 msid:JtsXs3B8wXmgyUYVkUGWHBYVYgX0aSC38IWx
 01a46fec-8a85-412d-9905-dcbefb8952b6
 a=ssrc:1842567493 mslabel:JtsXs3B8wXmgyUYVkUGWHBYVYgX0aSC38IWx
 a=ssrc:1842567493 label:01a46fec-8a85-412d-9905-dcbefb8952b6
 a=sendrecv
 a=rtcp:10863
 a=rtcp-mux
 a=candidate:GjpvUWJxlvHL7PZ6 1 UDP 1518214655 PU.BL.IC.IP 10862 typ host
 a=candidate:GjpvUWJxlvHL7PZ6 2 UDP 1518214654 PU.BL.IC.IP 10863 typ host
 -
 --- (16 headers 42 lines) ---
 Sending to PU.BL.IC.IP:5060 (no NAT)
 Sending to PU.BL.IC.IP:5060 (no NAT)
 Using INVITE request as basis request - oc0ppijresm05k2emsgt
 Found peer '660' for '660' from PU.BL.IC.IP:5060
   == Using SIP RTP TOS bits 184
   == Using SIP RTP CoS mark 5
 Found RTP audio format 111
 Found RTP audio format 103
 Found RTP audio format 104
 Found RTP audio

[asterisk-users] Asterisk rejects sdp from webrtc client

2014-08-22 Thread Olli Heiskanen
Hello,

I was testing with sdp and something came up worth asking:

While calling from a webrtc client to another (chrome, sip.js) Asterisk
receives the following sdp and rejects it with 488 Not Acceptable. Why does
this happen, what's wrong with the sdp? The second sdp body below is
accepted instead. Both have rtp profile RTP/SAVPF, difference is that the
second one was produced by rtpengine, first one came directly from the
client.

I defined my clients according to the sip.js guide:
http://sipjs.com/guides/server-configuration/asterisk/

So this was rejected:
(I marked the extra lines with '//' to ease looking through the differences)

v=0
o=- 9046935681162021751 2 IN IP4 91.221.66.61
s=-
t=0 0
a=group:BUNDLE audio //
a=msid-semantic: WMS Kqg5QpXyqNeviT8qxUIRi8QNUaV7mUnFiDIF
m=audio 11076 RTP/SAVPF 111 103 104 0 8 106 105 13 126
c=IN IP4 91.221.66.61
a=candidate:2999745851 1 udp 2122260223 192.168.56.1 52820 typ host
generation 0 //
a=candidate:2999745851 2 udp 2122260223 192.168.56.1 52820 typ host
generation 0 //
a=candidate:3350409123 1 udp 2122194687 192.168.0.101 52821 typ host
generation 0 //
a=candidate:3350409123 2 udp 2122194687 192.168.0.101 52821 typ host
generation 0 //
a=candidate:4233069003 1 tcp 1518280447 192.168.56.1 0 typ host generation 0
//
a=candidate:4233069003 2 tcp 1518280447 192.168.56.1 0 typ host generation 0
//
a=candidate:2301678419 1 tcp 1518214911 192.168.0.101 0 typ host generation
0 //
a=candidate:2301678419 2 tcp 1518214911 192.168.0.101 0 typ host generation
0 //
a=candidate:1190865175 1 udp 1685987071 91.145.67.22 52821 typ srflx raddr
192.168.0.101 rport 52821 generation 0 //
a=candidate:1190865175 2 udp 1685987071 91.145.67.22 52821 typ srflx raddr
192.168.0.101 rport 52821 generation 0 //
a=ice-ufrag:QJy1Fslu8ITGYl/d //
a=ice-pwd:Q8N6+0PPj4CUG6leGAie7zaL //
a=ice-options:google-ice //
a=fingerprint:sha-256
CF:30:A7:7F:71:11:D4:5E:B0:E7:E3:F9:D8:C2:F4:60:2A:D0:76:46:F8:3A:97:01:C9:0C:5A:F7:B8:7D:C1:43
a=setup:actpass
a=mid:audio //
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level //
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time //
a=rtpmap:111 opus/48000/2
a=fmtp:111 minptime=10
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:126 telephone-event/8000
a=maxptime:60
a=ssrc:2179369454 cname:SvzCJjIAujxHGm9P
a=ssrc:2179369454 msid:Kqg5QpXyqNeviT8qxUIRi8QNUaV7mUnFiDIF
add6e533-c83d-42f2-b487-fcac8646ad32
a=ssrc:2179369454 mslabel:Kqg5QpXyqNeviT8qxUIRi8QNUaV7mUnFiDIF
a=ssrc:2179369454 label:add6e533-c83d-42f2-b487-fcac8646ad32
a=sendrecv
a=rtcp:11077
a=rtcp-mux
a=candidate:hhsCc0ehS5qzXXxS 1 UDP 1518214655 91.221.66.61 11076 typ host
a=candidate:hhsCc0ehS5qzXXxS 2 UDP 1518214654 91.221.66.61 11077 typ host


And this was accepted as such:

v=0
o=- 9046935681162021751 2 IN IP4 91.221.66.61
s=-
t=0 0
a=msid-semantic: WMS Kqg5QpXyqNeviT8qxUIRi8QNUaV7mUnFiDIF
m=audio 11080 RTP/SAVPF 111 103 104 0 8 106 105 13 126
c=IN IP4 91.221.66.61
a=rtpmap:111 opus/48000/2
a=fmtp:111 minptime=10
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:126 telephone-event/8000
a=maxptime:60
a=ssrc:2179369454 cname:SvzCJjIAujxHGm9P
a=ssrc:2179369454 msid:Kqg5QpXyqNeviT8qxUIRi8QNUaV7mUnFiDIF
add6e533-c83d-42f2-b487-fcac8646ad32
a=ssrc:2179369454 mslabel:Kqg5QpXyqNeviT8qxUIRi8QNUaV7mUnFiDIF
a=ssrc:2179369454 label:add6e533-c83d-42f2-b487-fcac8646ad32
a=sendrecv
a=rtcp:11081
a=rtcp-mux
a=crypto:1 AES_CM_128_HMAC_SHA1_80
inline:RV9RgRP59zI6AoZKhGT4iq0Fj6A5tVbLy+zzj9JB
a=setup:actpass
a=fingerprint:sha-1
C2:D0:75:69:46:19:83:17:22:08:D4:8F:46:39:C7:AD:06:6A:CD:CC


cheers,
Olli
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Letting rtp profiles be handled by rtpengine instead of Asterisk

2014-08-15 Thread Olli Heiskanen
Hello,

After having thought this through a bit I have some thoughts I'd like to
share.

In this case where the rtp profile is RTP/AVP Asterisk accepts and handles
the call normally. If a webrtc client calls a sip client, or even another
webrtc client, rtpengine is needed to step in (in my setup most of the
clients would indeed be webrtc, but some of them might be sip). I think it
would be better to use RTP/SAVPF throughout the process if both clients are
webrtc (or otherwise speak RTP/SAVPF), but currently there is no way to
accomplish this?

Is it possible to configure Asterisk to only accept the RTP/SAVPF profile,
and send 488 to all others? If it's not possible to force Asterisk to
ignore rtp profiles (thus allowing the sdp be handled by rtpengine
entirely), I'd prefer to use RTP/SAVPF or RTP/SAVP in the communication
between Kamailio and Asterisk servers and use rtpengine to bridge to
RTP/AVP and RTP/AVPF only if the client cannot speak securely.

I'd very much like to hear opinions and thoughts on these.

cheers,
Olli







2014-08-13 20:39 GMT+03:00 Olli Heiskanen ohjelmistoarkkite...@gmail.com:


 Aaa now I understood better, thanks!

 That's the instruction I used originally to write my Kamailio config, but
 I wasn't sure on how the sdp was supposed to be altered at which places in
 the whole SIP flow. I was thinking the original INVITE with the original
 sdp would go all the way to the receiving client, which return 488, which
 Kamailio would pick up and use rtpengine to alter the sdp at that point.

 So I'll need to alter the sdp every time before sending it to the Asterisk
 servers altogether and so avoid all the hassle I've been having with
 Asterisk.

 cheers,
 Olli


 2014-08-13 20:07 GMT+03:00 Paul Belanger paul.belan...@polybeacon.com:

 On Wed, Aug 13, 2014 at 4:35 AM, Olli Heiskanen
 ohjelmistoarkkite...@gmail.com wrote:
  Hi,
 
  Wow, thanks Paul, realizing the problem makes a lot of sense.
 
  So I setup Kamailio as a peer, but if I disable chan_sip module
 completely,
  I can't do it in sip.conf like I'd otherwise assume to do. I tried to
  rebuild Asterisk without chan_sip, but I guess that's not quite the way
 to
  go? Asterisk stopped sending back any sip messages so either there is a
  configuration means on how to do this or I'm doing something wrong with
 my
  current setup. My next thought was to compile Asterisk normally and set
  rtcachefriends to no, that did not work either, when dialing the cli
 stated:
  app_dial.c:2437 dial_exec_full: Unable to create channel of type 'SIP'
  (cause 20 - Subscriber absent)
  which I guess says Asterisk does not know where to send the message.
 
  The inner workings of Asterisk is a bit beyond me, if you don't mind
 giving
  advice on how to proceed I'd be most grateful.
 
 I think you are still mis-understanding me.  I'll try to be clearer.

 From the POV of asterisk, you do still need chan_sip, however the only
 peer asterisk needs to be away of it Kamailio.  All other peers will
 be stored within kamailio.  This was the reason for my comment about
 realtime sip, you don't need it.

 Then, within kamailio, you'll need to invoke rtpengine using
 (rtpproxy-ng with kamailio 4.1) to rewrite the sdp for the invite to
 asterisk.  You'll use the rtpproxy_offer and rtp_answer functions to
 remove ICE when calls originate from webrtc clients.  Since you are
 not using a websocket in asterisk, it will just be a SIP over udp, the
 need for ICE and SAVPF is not needed.

 What you are trying to do is pretty complicated, it took me about 2
 weeks to get everything setup properly.  There is good information[1]
 on the web, you just need to google for it.

 [1] http://www.slideshare.net/crocodilertc/webrtc-websockets

 --
 Paul Belanger | PolyBeacon, Inc.
 Jabber: paul.belan...@polybeacon.com | IRC: pabelanger (Freenode)
 Github: https://github.com/pabelanger | Twitter:
 https://twitter.com/pabelanger

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users



-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Letting rtp profiles be handled by rtpengine instead of Asterisk

2014-08-15 Thread Olli Heiskanen
Thanks Paul, I appreciate your thoughts.

I understand your way, it's logical in your environment. I prefer to use
LTS versions of Asterisk so I'm guessing what I want to do is not quite
possible with Asterisk 11.

I'd prefer my setup to work like this in different cases.

webrtc (rtp/savpf) -- kamailio -- asterisk -- kamailio -- webrtc (rtp/savpf)
sip (rtp/avp) -- kamailio -- rtpengine (rtp/savpf) -- asterisk -- kamailio
-- rtpengine (rtp/avp) -- sip (rtp/avp)
webrtc (rtp/savpf) -- kamailio -- asterisk -- kamailio -- rtpengine
(rtp/avp) -- sip (rtp/avp)

... essentially, using RTP/AVP only when the client does not speak securely.

It appears I'll have to try out the RTP/AVP way until there is an Asterisk
that can accomplish this without having to use peer-specific settings.
Down-side to this is that rtpengine needs resources from the server for
webrtc clients even though both ends speak the same profile.

It's not so complicated now that I know more on what Asterisk supports and
how it handles the sdp, I just needed to learn by doing, testing and
asking. I must be a bit ahead of my time for going for a RTP/SAVPF within
my architecture, but using RTP/AVP is not such a bad option as srtp is on
its way anyway in future Asterisk versions and the rtp flowing between
Kamailio and users' networks are far more important than internal rtp
traffic.

cheers,
Olli





2014-08-15 18:48 GMT+03:00 Paul Belanger paul.belan...@polybeacon.com:

 On Fri, Aug 15, 2014 at 10:41 AM, Olli Heiskanen
 ohjelmistoarkkite...@gmail.com wrote:
  Hello,
 
  After having thought this through a bit I have some thoughts I'd like to
  share.
 
  In this case where the rtp profile is RTP/AVP Asterisk accepts and
 handles
  the call normally. If a webrtc client calls a sip client, or even another
  webrtc client, rtpengine is needed to step in (in my setup most of the
  clients would indeed be webrtc, but some of them might be sip). I think
 it
  would be better to use RTP/SAVPF throughout the process if both clients
 are
  webrtc (or otherwise speak RTP/SAVPF), but currently there is no way to
  accomplish this?
 
  Is it possible to configure Asterisk to only accept the RTP/SAVPF
 profile,
  and send 488 to all others? If it's not possible to force Asterisk to
 ignore
  rtp profiles (thus allowing the sdp be handled by rtpengine entirely),
 I'd
  prefer to use RTP/SAVPF or RTP/SAVP in the communication between Kamailio
  and Asterisk servers and use rtpengine to bridge to RTP/AVP and RTP/AVPF
  only if the client cannot speak securely.
 
  I'd very much like to hear opinions and thoughts on these.
 
 Again, I'll only share my experiences, but we do the complete
 opposite.  Traffic between kamailio and asterisk is only RTP/AVP since
 the version of asterisk we are using does not support RTP/SAVPF (1.8).
 However, if you want RTP/SAVPF then honestly, you should just
 completely remove rtpengine from the picture since newer version of
 asterisk support both RTP/AVP and RTP/SAVPF (asterisk 12+).

 What I think you should do is go back to the basics, and document
 everything you want to do.  Right now you have too many pieces in the
 puzzle and making the setup complicated.  Like I said before, this is
 a complex setup and you need to start some place.  Here is a diagram
 of what we do.

 webrtc (RTP/SAVPF) - kamailio - rtpengine  - asterisk (RTP/AVP)

 This way, only RTP/AVP is in the core of our network. Rtpengine is on
 the edge (where it belongs), proxing rtp traffic.  And, for us, we
 keep RTP/SAVPF outside of asterisk since support for it has been
 recently added. I also believe there are some open issue with dtls +
 srtp too.

 --
 Paul Belanger | PolyBeacon, Inc.
 Jabber: paul.belan...@polybeacon.com | IRC: pabelanger (Freenode)
 Github: https://github.com/pabelanger | Twitter:
 https://twitter.com/pabelanger

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Letting rtp profiles be handled by rtpengine instead of Asterisk

2014-08-13 Thread Olli Heiskanen
Hi,

Wow, thanks Paul, realizing the problem makes a lot of sense.

So I setup Kamailio as a peer, but if I disable chan_sip module completely,
I can't do it in sip.conf like I'd otherwise assume to do. I tried to
rebuild Asterisk without chan_sip, but I guess that's not quite the way to
go? Asterisk stopped sending back any sip messages so either there is a
configuration means on how to do this or I'm doing something wrong with my
current setup. My next thought was to compile Asterisk normally and
set rtcachefriends to no, that did not work either, when dialing the cli
stated:
app_dial.c:2437 dial_exec_full: Unable to create channel of type 'SIP'
(cause 20 - Subscriber absent)
which I guess says Asterisk does not know where to send the message.

The inner workings of Asterisk is a bit beyond me, if you don't mind giving
advice on how to proceed I'd be most grateful.

cheers,
Olli


2014-08-12 17:40 GMT+03:00 Paul Belanger paul.belan...@polybeacon.com:

 On Tue, Aug 12, 2014 at 4:17 AM, Olli Heiskanen
 ohjelmistoarkkite...@gmail.com wrote:
  Hello,
 
  Thank You Paul for your reply,
 
  The registrations in my setup are not duplicated, the 'secret' field in
 the
  realtime table is empty, which causes Asterisk to not authenticate
 requests
  from my Kamailio. Kamailio handles registrations, and also routes the
  traffic to Asterisk using dispatcher. Also, all peers have the Kamailio
  ip:port as outbound proxy so all traffic goes through Kamailio.
 
 That is your issue, stop using chan_sip with realtime (using data from
 kamailio).  The only SIP peer asterisk should know of is kamailio, and
 your webrtc clients should be anonymous SIP users.  This way, Asterisk
 doesn't even need to deal with websockets and RTP/SAVPF (this is what
 kamailio and rtpengine) is for.

 In your current setup, you are bypassing the functionality of
 rtpengine and not even leveraging it.

  Looks like version 11.11 works differently, I'll try to revert back to a
  previous version, and see if that works. I know at least the 'force_avp'
  field is new to 11.11 so it's safe to assume there's some difference
 between
  versions in rtp profile handling.
 
  It would be good to know how to handle this scenario in the new versions
 as
  well, I'll probably need to upgrade ahead anyway.
 


 --
 Paul Belanger | PolyBeacon, Inc.
 Jabber: paul.belan...@polybeacon.com | IRC: pabelanger (Freenode)
 Github: https://github.com/pabelanger | Twitter:
 https://twitter.com/pabelanger

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Letting rtp profiles be handled by rtpengine instead of Asterisk

2014-08-13 Thread Olli Heiskanen
Aaa now I understood better, thanks!

That's the instruction I used originally to write my Kamailio config, but I
wasn't sure on how the sdp was supposed to be altered at which places in
the whole SIP flow. I was thinking the original INVITE with the original
sdp would go all the way to the receiving client, which return 488, which
Kamailio would pick up and use rtpengine to alter the sdp at that point.

So I'll need to alter the sdp every time before sending it to the Asterisk
servers altogether and so avoid all the hassle I've been having with
Asterisk.

cheers,
Olli


2014-08-13 20:07 GMT+03:00 Paul Belanger paul.belan...@polybeacon.com:

 On Wed, Aug 13, 2014 at 4:35 AM, Olli Heiskanen
 ohjelmistoarkkite...@gmail.com wrote:
  Hi,
 
  Wow, thanks Paul, realizing the problem makes a lot of sense.
 
  So I setup Kamailio as a peer, but if I disable chan_sip module
 completely,
  I can't do it in sip.conf like I'd otherwise assume to do. I tried to
  rebuild Asterisk without chan_sip, but I guess that's not quite the way
 to
  go? Asterisk stopped sending back any sip messages so either there is a
  configuration means on how to do this or I'm doing something wrong with
 my
  current setup. My next thought was to compile Asterisk normally and set
  rtcachefriends to no, that did not work either, when dialing the cli
 stated:
  app_dial.c:2437 dial_exec_full: Unable to create channel of type 'SIP'
  (cause 20 - Subscriber absent)
  which I guess says Asterisk does not know where to send the message.
 
  The inner workings of Asterisk is a bit beyond me, if you don't mind
 giving
  advice on how to proceed I'd be most grateful.
 
 I think you are still mis-understanding me.  I'll try to be clearer.

 From the POV of asterisk, you do still need chan_sip, however the only
 peer asterisk needs to be away of it Kamailio.  All other peers will
 be stored within kamailio.  This was the reason for my comment about
 realtime sip, you don't need it.

 Then, within kamailio, you'll need to invoke rtpengine using
 (rtpproxy-ng with kamailio 4.1) to rewrite the sdp for the invite to
 asterisk.  You'll use the rtpproxy_offer and rtp_answer functions to
 remove ICE when calls originate from webrtc clients.  Since you are
 not using a websocket in asterisk, it will just be a SIP over udp, the
 need for ICE and SAVPF is not needed.

 What you are trying to do is pretty complicated, it took me about 2
 weeks to get everything setup properly.  There is good information[1]
 on the web, you just need to google for it.

 [1] http://www.slideshare.net/crocodilertc/webrtc-websockets

 --
 Paul Belanger | PolyBeacon, Inc.
 Jabber: paul.belan...@polybeacon.com | IRC: pabelanger (Freenode)
 Github: https://github.com/pabelanger | Twitter:
 https://twitter.com/pabelanger

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Letting rtp profiles be handled by rtpengine instead of Asterisk

2014-08-12 Thread Olli Heiskanen
Hello,

Thank You Paul for your reply,

The registrations in my setup are not duplicated, the 'secret' field in the
realtime table is empty, which causes Asterisk to not authenticate requests
from my Kamailio. Kamailio handles registrations, and also routes the
traffic to Asterisk using dispatcher. Also, all peers have the Kamailio
ip:port as outbound proxy so all traffic goes through Kamailio.

Looks like version 11.11 works differently, I'll try to revert back to a
previous version, and see if that works. I know at least the 'force_avp'
field is new to 11.11 so it's safe to assume there's some difference
between versions in rtp profile handling.

It would be good to know how to handle this scenario in the new versions as
well, I'll probably need to upgrade ahead anyway.

Thanks,
Olli



2014-08-12 1:56 GMT+03:00 Paul Belanger paul.belan...@polybeacon.com:

 On Mon, Aug 11, 2014 at 4:45 AM, Olli Heiskanen
 ohjelmistoarkkite...@gmail.com wrote:
 
  Hello,
 
  I'm trying to get calls working between websocket clients and sip
 clients.
  For clients I have sip.js based clients on chrome, Zoipers and a
 Grandstream
  phone. Challenge here is I'd like to have Kamailio and rtpengine to
 handle
  the bridging between different rtp profiles but Asterisk changes them in
 the
  sdp bodies along the way. I'm using Asterisk 11.11.0.
 
  Is there a way to configure Asterisk to ignore the rtp profile but allow
  calls to pass with either of those profiles (even though clients might
  answer with 488 which would be caught and handled by Kamailio and
  rtpengine)? In my setup I have Asterisk Kamailio realtime integration,
 and
  the second goal is to be able to add peers to the db table with similar
  data, as in no different values based on what kind of client wants to
  register. I'd like to allow the user to register using which ever client
  they choose (in this case one of the 3 I mentioned).
 
  Previously I had problems like 'rejecting secure audio stream without
  encryption details', no audio or BYE messages sent immediately after call
  has begun etc, but according to sip.js documentation
  (http://sipjs.com/guides/server-configuration/asterisk/) the settings
 avpf
  and force_avp affect the way Asterisk handles the rtp profiles and now my
  calls do work ok but I'd need to move the rtp profile handling to
 rtpengine.
 
 We are successfully using kamailio / rtpengine with websockets and
 asterisk 1.8. First question is why are you duplicating registrations
 within asterisk?  Secondly, why are you using websockets in asterisk?

 Without knowing more about your use case, I'll tell you how we did it.
 Like I said, kamailio is responsible for our SIP/ws subscribers and
 registrations.  Once within kamailio we simply dispatch traffic to
 asterisk via SIP/udp.  RTP is handled by rtpengine (using rtproxy-ng)
 and that is basically it.

 No special configuration is needed for asterisk (in fact 1.8 has no
 support for RTP/SAVPF) so we rewrite SDP on 488.  Then setup a
 kamailio peer and away you go.

 --
 Paul Belanger | PolyBeacon, Inc.
 Jabber: paul.belan...@polybeacon.com | IRC: pabelanger (Freenode)
 Github: https://github.com/pabelanger | Twitter:
 https://twitter.com/pabelanger

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Letting rtp profiles be handled by rtpengine instead of Asterisk

2014-08-12 Thread Olli Heiskanen
Okay, tried reverting to Asterisk 11.10.2. I didn't change the realtime
table yet, but now when calling from websocket client to another websocket
client, cli says:

WARNING[30620][C-]: chan_sip.c:11056 process_sdp_a_dtls:
Unsupported fingerprint hash type 'sha-2' received on dialog
'36ns50nk1fo04pu3m7lf'
WARNING[30620][C-]: chan_sip.c:10509 process_sdp: Rejecting secure
audio stream without encryption details: audio 10640 RTP/SAVPF 111 103 104
0 8 106 105 13 126

This many times, until the forking capacity of Kamailio has been reached
and call fails. The clients are running on chrome, and calls have worked
before... I wonder if I should revert further back and/or change or remove
some realtime table fields?

cheers,
Olli


2014-08-12 11:17 GMT+03:00 Olli Heiskanen ohjelmistoarkkite...@gmail.com:

 Hello,

 Thank You Paul for your reply,

 The registrations in my setup are not duplicated, the 'secret' field in
 the realtime table is empty, which causes Asterisk to not authenticate
 requests from my Kamailio. Kamailio handles registrations, and also routes
 the traffic to Asterisk using dispatcher. Also, all peers have the Kamailio
 ip:port as outbound proxy so all traffic goes through Kamailio.

 Looks like version 11.11 works differently, I'll try to revert back to a
 previous version, and see if that works. I know at least the 'force_avp'
 field is new to 11.11 so it's safe to assume there's some difference
 between versions in rtp profile handling.

 It would be good to know how to handle this scenario in the new versions
 as well, I'll probably need to upgrade ahead anyway.

 Thanks,
 Olli



 2014-08-12 1:56 GMT+03:00 Paul Belanger paul.belan...@polybeacon.com:

 On Mon, Aug 11, 2014 at 4:45 AM, Olli Heiskanen
 ohjelmistoarkkite...@gmail.com wrote:
 
  Hello,
 
  I'm trying to get calls working between websocket clients and sip
 clients.
  For clients I have sip.js based clients on chrome, Zoipers and a
 Grandstream
  phone. Challenge here is I'd like to have Kamailio and rtpengine to
 handle
  the bridging between different rtp profiles but Asterisk changes them
 in the
  sdp bodies along the way. I'm using Asterisk 11.11.0.
 
  Is there a way to configure Asterisk to ignore the rtp profile but allow
  calls to pass with either of those profiles (even though clients might
  answer with 488 which would be caught and handled by Kamailio and
  rtpengine)? In my setup I have Asterisk Kamailio realtime integration,
 and
  the second goal is to be able to add peers to the db table with similar
  data, as in no different values based on what kind of client wants to
  register. I'd like to allow the user to register using which ever client
  they choose (in this case one of the 3 I mentioned).
 
  Previously I had problems like 'rejecting secure audio stream without
  encryption details', no audio or BYE messages sent immediately after
 call
  has begun etc, but according to sip.js documentation
  (http://sipjs.com/guides/server-configuration/asterisk/) the settings
 avpf
  and force_avp affect the way Asterisk handles the rtp profiles and now
 my
  calls do work ok but I'd need to move the rtp profile handling to
 rtpengine.
 
 We are successfully using kamailio / rtpengine with websockets and
 asterisk 1.8. First question is why are you duplicating registrations
 within asterisk?  Secondly, why are you using websockets in asterisk?

 Without knowing more about your use case, I'll tell you how we did it.
 Like I said, kamailio is responsible for our SIP/ws subscribers and
 registrations.  Once within kamailio we simply dispatch traffic to
 asterisk via SIP/udp.  RTP is handled by rtpengine (using rtproxy-ng)
 and that is basically it.

 No special configuration is needed for asterisk (in fact 1.8 has no
 support for RTP/SAVPF) so we rewrite SDP on 488.  Then setup a
 kamailio peer and away you go.

 --
 Paul Belanger | PolyBeacon, Inc.
 Jabber: paul.belan...@polybeacon.com | IRC: pabelanger (Freenode)
 Github: https://github.com/pabelanger | Twitter:
 https://twitter.com/pabelanger

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users



-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Letting rtp profiles be handled by rtpengine instead of Asterisk

2014-08-11 Thread Olli Heiskanen
Hello,

I'm trying to get calls working between websocket clients and sip clients.
For clients I have sip.js based clients on chrome, Zoipers and a
Grandstream phone. Challenge here is I'd like to have Kamailio and
rtpengine to handle the bridging between different rtp profiles but
Asterisk changes them in the sdp bodies along the way. I'm using Asterisk
11.11.0.

Is there a way to configure Asterisk to ignore the rtp profile but allow
calls to pass with either of those profiles (even though clients might
answer with 488 which would be caught and handled by Kamailio and
rtpengine)? In my setup I have Asterisk Kamailio realtime integration, and
the second goal is to be able to add peers to the db table with similar
data, as in no different values based on what kind of client wants to
register. I'd like to allow the user to register using which ever client
they choose (in this case one of the 3 I mentioned).

Previously I had problems like 'rejecting secure audio stream without
encryption details', no audio or BYE messages sent immediately after call
has begun etc, but according to sip.js documentation (
http://sipjs.com/guides/server-configuration/asterisk/) the settings avpf
and force_avp affect the way Asterisk handles the rtp profiles and now my
calls do work ok but I'd need to move the rtp profile handling to rtpengine.

Here's my sip.conf:

bindport = 5070 ;Kamailio is at port 5060, and it's always used as outbound
proxy
bindaddr = PU.BL.IC.IP
tcpenable = yes
limitonpeers = yes
rtcachefriends = yes
rtupdate=yes
tos_sip=cs3
tos_audio=ef
realm = testers.com
 autodomain=no
domain=testers.com

allowexternaldomains=no
allowguest=no
;avpf=yes ;
encryption=yes
transport=ws,wss,udp
icesupport=yes
srvlookup=yes
nat=force_rport,comedia
videosupport=yes
directmedia=no


And here's the way I've defined my websocket peer to my sippeers table:

id: 4
  name: 660
ipaddr: PU.BL.IC.IP
  port: 5060
regseconds: 1407744248
   defaultuser: 660
   fullcontact: sip:6...@pu.bl.ic.ip:5060
 regserver:
 useragent:
lastms: 0
  host: dynamic
  type: friend
   context: default
  deny: 0.0.0.0/0.0.0.0
permit: PU.BL.IC.IP
secret: NULL
 md5secret: NULL
  avpf: yes
 force_avp: yes
icesupport: yes
   directmedia: yes
encryption: yes
   nat: force_rport,comedia
 callgroup: NULL
   pickupgroup: NULL
  language: NULL
  disallow: NULL
 allow: NULL
setvar: NULL
  callerid: NULL
  amaflags: NULL
  videosupport: no
maxcallbitrate: NULL
   mailbox: NULL
  regexten: NULL
fromdomain: testers.com
  fromuser: NULL
qualify: NULL
 defaultip: NULL
 outboundproxy: PU.BL.IC.IP
 contactpermit: NULL
   contactdeny: NULL
  fullname: NULL
cid_number: NULL
   callingpres: NULL
  mohinterpret: NULL
mohsuggest: NULL
  hasvoicemail: NULL
  subscribemwi: NULL
   vmexten: NULL
  rtpkeepalive: NULL
directrtpsetup: yes
dtlsenable: yes
dtlsverify: no
dtlsprivatekey: /etc/asterisk/keys/asterisk.pem
 dtlssetup: actpass
  dtlscertfile: /etc/asterisk/keys/asterisk.pem
dtlscafile: /etc/asterisk/keys/ca.crt
 sippasswd: md5ofmypwd
  rpid: NULL
domain: testers.com
sippasswd2: NULL



This is how all other clients are currently defined:

id: 7
  name: 771
ipaddr: PU.BL.IC.IP
  port: 5060
regseconds: 1407748788
   defaultuser: 771
   fullcontact: sip:7...@pu.bl.ic.ip:5060
 regserver:
 useragent:
lastms: 0
  host: dynamic
  type: friend
   context: default
  deny: 0.0.0.0/0.0.0.0
permit: PU.BL.IC.IP
secret: NULL
 md5secret: NULL
  avpf: no
 force_avp: NULL
icesupport: NULL
   directmedia: yes
encryption: NULL
   nat: force_rport,comedia
 callgroup: NULL
   pickupgroup: NULL
  language: NULL
  disallow: NULL
 allow: NULL
setvar: NULL
  callerid: NULL
  amaflags: NULL
  videosupport: NULL
maxcallbitrate: NULL
   mailbox: NULL
  regexten: NULL
fromdomain: testers.com
  fromuser: NULL
   qualify: NULL
 defaultip: NULL
 outboundproxy: PU.BL.IC.IP
 contactpermit: NULL
   contactdeny: NULL
  fullname: NULL
cid_number: NULL
   callingpres: NULL
  mohinterpret: NULL
mohsuggest: NULL
  hasvoicemail: NULL
  subscribemwi: NULL
   vmexten: NULL
  rtpkeepalive: NULL
directrtpsetup: NULL
dtlsenable: NULL
dtlsverify: NULL
dtlsprivatekey: NULL
 dtlssetup: NULL
  dtlscertfile: NULL
dtlscafile: NULL
 sippasswd: 27e13af7c596313350986c58c9d24946
  rpid: NULL
domain: testers.com
sippasswd2: NULL


cheers,
Olli
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar 

Re: [asterisk-users] Rejecting secure audio stream without encryption details - when using ws clients and Kamailio integration

2014-08-10 Thread Olli Heiskanen
Hi,

Thanks Daniel for your reply.

Sorry for having been a bit obscure, it is my intention to have all clients
able to call each other, regardless of which ua client software they use. I
think I've realized what's going on. My goal is to use rtpengine to bridge
between rtp profiles when they are different. But according to sip.js
instruction, I set up my clients in a way that Asterisk took the place of
rtpengine and changed the rtp profiles along the way based on the realtime
table values. That got me confused but now I know at least what the problem
is so I can fix it. This setup works in a way that I can make calls between
websocket and sip clients, but the problem with it is that I need different
values in the realtime table, according to which rtp profile the client
uses.

Doing this I made a wrong turn in my project, I'll need to have universal
setup for each peer so the user can use a websocket client or a sip client
to register and use an account. I'll still need to figure out which
settings to use and which not to use, so the rtp gets handled by rtpengine,
not Asterisk. But that's a question for the Asterisk list.



The problem about Asterisk setting the rtp profile as UDP/TLS/RTP/SAVPF was
fixed using a peer setting in the realtime table, now Asterisk accepts
RTP/SAVPF I can have calls flowing as soon as I can get rtpengine to
cooperate with me.

I wonder, is there UDP/TLS/RTP/SAVPF handling in rtpengine/kamailio? I may
have to add some kind of handling to this if I have to revert back to my
previous settings.

cheers,
Olli


2014-08-05 16:49 GMT+03:00 Daniel-Constantin Mierla mico...@gmail.com:


 On 01/08/14 10:56, Olli Heiskanen wrote:

 Hi,

 I got ahead with my setup, this post helped me much:
 http://forums.digium.com/viewtopic.php?f=1t=90167sid=
 66fdf8cc4be5d955ba584e989a23442f

 At least the avpf setting had to be removed from sip.conf and put in the
 realtime db table, defined per client. I left the encryption setting in
 sip.conf. I had some problems calling from SIP client to another, then had
 to define avpf=no for those clients. Personally I don't like to use
 different settings to different clients, is there a way around this?

 With this setup I can make calls between SIP clients but not ws clients.
 My client (now I use sip.js) fails to parse the sdp - including the
 apparently correct rtp profile UDP/TLS/RTP/SAVPF - and sends back 488,
 which makes the call fail. I'd like to hear opinions from you guys which
 would be the correct place to handle this? My setup has Asterisk Kamailio
 realtime integration, and I use dispatcher in Kamailio to route calls to
 Asterisk. Kamailio sounds like the logical place, but I'd rather find a way
 to not change the rtp profile along the way, at least until the clients can
 support that one.

 To understand properly, you don't want to use rtpenging for
 srtp(webrtc)-rtp(classic sip) gatewaying?

 If yes, maybe you can partition the users (classic-sip and webrtc-sip),
 then use two asterisk instances with routing via kamailio.

 Cheers,
 Daniel

 --
 Daniel-Constantin Mierla
 http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
 Next Kamailio Advanced Trainings 2014 - http://www.asipto.com
 Sep 22-25, Berlin, Germany ::: Oct 15-17, San Francisco, USA


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] From and To headers contain same account in INVITEs

2014-08-06 Thread Olli Heiskanen
Hello,

I noticed a strange thing while testing my Asterisk-Kamailio Realtime
setup. In an INVITE the From and To headers contain the same number when
calling through a Realtime integration setup. This happens when the INVITE
leaves Asterisk.

Can you guys tell me what might be causing this? I have 6...@testers.com as
a websocket client and 7...@testers.com (caller) using a Zoiper client (db
output below). The call itself works, audio and all, only those headers are
puzzling to me. I noticed this when I tried to add a label saying '700
calling' on my web page. The same thing happens when I call from 660 to
700.

My Asterisk is 11.11.0 running on CentOS 6.5.

An INVITE is sent from my client to Kamailio and then to Asterisk:
(both Kamailio and Asterisk are at 1.1.1.1)

INVITE sip:6...@testers.com;transport=UDP SIP/2.0
Record-Route: sip:1.1.1.1;lr=on;ftag=fd070807
Via: SIP/2.0/UDP
1.1.1.1;branch=z9hG4bKf6e9.339dda0648d95af665c91db701754d98.0
Via: SIP/2.0/UDP 2.2.2.2:37730
;rport=37730;branch=z9hG4bK-d8754z-7f27c9fc35574abb-1---d8754z-
Max-Forwards: 16
Contact: sip:700@2.2.2.2:37730;transport=UDP
To: sip:6...@testers.com;transport=UDP
From: sip:7...@testers.com;transport=UDP;tag=fd070807
Call-ID: ZDc0YjU1ZjNmMWI5YjUyYzY0YWNjN2NjN2NkODg2OTk.
CSeq: 2 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS,
INFO, SUBSCRIBE
Content-Type: application/sdp
Supported: replaces, norefersub, extended-refer, timer,
X-cisco-serviceuri
User-Agent: Z 3.2.21357 r21367
Allow-Events: presence, kpml
Content-Length: 239

v=0
o=Z 0 0 IN IP4 2.2.2.2
s=Z
c=IN IP4 2.2.2.2
t=0 0
m=audio 8000 RTP/AVP 3 110 8 0 98 101
a=rtpmap:110 speex/8000
a=rtpmap:98 iLBC/8000
a=fmtp:98 mode=20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv

... and Asterisk responds with Trying:

SIP/2.0 100 Trying
Via: SIP/2.0/UDP
1.1.1.1;branch=z9hG4bKf6e9.339dda0648d95af665c91db701754d98.0;received=1.1.1.1;rport=5060
Via: SIP/2.0/UDP 2.2.2.2:37730
;rport=37730;branch=z9hG4bK-d8754z-7f27c9fc35574abb-1---d8754z-
Record-Route: sip:1.1.1.1;lr=on;ftag=fd070807
From: sip:7...@testers.com;transport=UDP;tag=fd070807
To: sip:6...@testers.com;transport=UDP
Call-ID: ZDc0YjU1ZjNmMWI5YjUyYzY0YWNjN2NjN2NkODg2OTk.
CSeq: 2 INVITE
Server: I Am the Devil
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY,
INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: sip:660@1.1.1.1:5070
Content-Length: 0

And when Asterisk sends out the INVITE, From and To headers both have the
same number:

INVITE sip:660@1.1.1.1:5060 SIP/2.0
Via: SIP/2.0/UDP 1.1.1.1:5070;branch=z9hG4bK75de61d0;rport
Max-Forwards: 70
From: sip:6...@testers.com;tag=as7b7c32a5
To: sip:660@1.1.1.1:5060
Contact: sip:660@1.1.1.1:5070
Call-ID: 7240b8a011890ec677f185f454858...@testers.com
CSeq: 102 INVITE
User-Agent: I Am the Devil
Date: Wed, 06 Aug 2014 09:54:35 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY,
INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 801

v=0
o=root 969416519 969416519 IN IP4 1.1.1.1
s=Asterisk PBX 11.11.0
c=IN IP4 1.1.1.1
t=0 0
m=audio 18740 RTP/SAVPF 0 3 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=ice-ufrag:50d777041673316422560b90281fcd2e
a=ice-pwd:0093fdde724f8a411742661c31c90f21
a=candidate:H5bdd423d 1 UDP 2130706431 1.1.1.1 18740 typ host
a=candidate:S5bdd423d 1 UDP 1694498815 1.1.1.1 18740 typ srflx
a=candidate:H5bdd423d 2 UDP 2130706430 1.1.1.1 18741 typ host
a=candidate:S5bdd423d 2 UDP 1694498814 1.1.1.1 18742 typ srflx
a=connection:new
a=setup:actpass
a=fingerprint:SHA-256
CE:EE:D9:28:EA:B0:6E:D0:CE:4F:5A:9A:FB:53:66:74:83:47:18:37:2F:76:C1:6D:10:C0:EE:FF:A4:56:F4:05
a=sendrecv


Here's the dialplan, nothing special:

exten = _XXX,1,NoOp(general : Dialed ${EXTEN})
 same = n,Dial(SIP/${EXTEN},3600,rt)
 same = n,Hangup


And here's how the clients are set in my db:

id: 4
  name: 660
ipaddr: 1.1.1.1
  port: 5060
regseconds: 1407320692
   defaultuser: 660
   fullcontact: sip:660@1.1.1.1:5060
 regserver:
 useragent:
lastms: 0
  host: dynamic
  type: friend
   context: default
  deny: 0.0.0.0/0.0.0.0
permit: 1.1.1.1
secret: NULL
 md5secret: 

Re: [asterisk-users] From and To headers contain same account in INVITEs

2014-08-06 Thread Olli Heiskanen
Hi,

There we go, that was it. Thank you Joshua!

cheers,
Olli


2014-08-06 15:26 GMT+03:00 Joshua Colp jc...@digium.com:

 Olli Heiskanen wrote:

 Hello,


 Kia ora,

  I noticed a strange thing while testing my Asterisk-Kamailio Realtime
 setup. In an INVITE the From and To headers contain the same number when
 calling through a Realtime integration setup. This happens when the
 INVITE leaves Asterisk.

 Can you guys tell me what might be causing this? I have 6...@testers.com
 mailto:6...@testers.com as a websocket client and 7...@testers.com
 mailto:7...@testers.com (caller) using a Zoiper client (db output

 below). The call itself works, audio and all, only those headers are
 puzzling to me. I noticed this when I tried to add a label saying '700
 calling' on my web page. The same thing happens when I call from 660 to
 700.


 Your configuration has fromuser set which explicitly sets the user
 portion of the From header to what you specify. This is commonly used for
 ITSPs as they use that to determine who you are trying to authenticate as.
 If you require this to be set then caller id information has to be
 transported in a different manner (RPID or PAI).

 Cheers,

 --
 Joshua Colp
 Digium, Inc. | Senior Software Developer
 445 Jan Davis Drive NW - Huntsville, AL 35806 - US
 Check us out at: www.digium.com  www.asterisk.org

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Rejecting secure audio stream without encryption details - when using ws clients and Kamailio integration

2014-08-01 Thread Olli Heiskanen
Hi,

I got ahead with my setup, this post helped me much:
http://forums.digium.com/viewtopic.php?f=1t=90167sid=66fdf8cc4be5d955ba584e989a23442f

At least the avpf setting had to be removed from sip.conf and put in the
realtime db table, defined per client. I left the encryption setting in
sip.conf. I had some problems calling from SIP client to another, then had
to define avpf=no for those clients. Personally I don't like to use
different settings to different clients, is there a way around this?

With this setup I can make calls between SIP clients but not ws clients. My
client (now I use sip.js) fails to parse the sdp - including the apparently
correct rtp profile UDP/TLS/RTP/SAVPF - and sends back 488, which makes the
call fail. I'd like to hear opinions from you guys which would be the
correct place to handle this? My setup has Asterisk Kamailio realtime
integration, and I use dispatcher in Kamailio to route calls to Asterisk.
Kamailio sounds like the logical place, but I'd rather find a way to not
change the rtp profile along the way, at least until the clients can
support that one.

cheers,
Olli





2014-07-26 12:58 GMT+03:00 Olli Heiskanen ohjelmistoarkkite...@gmail.com:


 Greetings,

 I've noticed a problem that might originate from my Asterisk
 configuration, could use a hand in sorting it out. Problem is a 488
 response from Asterisk whenever it gets RTP/SAVPF profile in the SDP.

 My current setup has Asterisk Kamailio realtime integration, and Kamailio
 uses dispatcher to route calls for Asterisk to handle. Now I have only one
 Asterisk, on the same machine as Kamailio. The version is 11.10.2. With
 Kamailio I use rtpengine, which affects SDP descriptions when 488 response
 is received.

 My goal is to enable two websocket clients using Chrome to call each
 other, using Kamailio as outbound proxy. Kamailio routes signaling to
 Asterisk, and then back to clients. Currently the problem is RTP, when
 INVITE is received from client A to Kamailio, it is relayed to Asterisk.
 Asterisk responds with 488 Not Acceptable here and the cli says:

  NOTICE[11642][C-0006]: chan_sip.c:10124 process_sdp: Received SAVPF
 profle in audio offer but AVPF is not enabled, enabling: audio 30212
 RTP/SAVPF 111 103 104 0 8 106 105 13 126
  WARNING[11642][C-0006]: chan_sip.c:10509 process_sdp: Rejecting
 secure audio stream without encryption details: audio 30212 RTP/SAVPF 111
 103 104 0 8 106 105 13 126


 Strange thing is, I don't know why Asterisk says AVPF is not enabled. The
 warning about rejecting the audio stream must be behind the 488 response
 but I didn't find any answers that would solve my case so I must turn to
 you guys. In my sip.conf I have savpf=yes, but is there something else I
 need to enable or change in the configs or change my peer configurations?

 I'm not sure if this is relevant but I checked that Asterisk was
 successfully compiled with res_srtp module.

 Here's my sip.conf contents:

 bindport = 5070 ; using this since Kamailio is at 5060
 bindaddr = PU.BL.IC.IP
 tcpenable = yes ;no
 limitonpeers = yes
 rtcachefriends = yes; for realtime
 rtupdate=yes
 tos_sip=cs3
 tos_audio=ef
 useragent=MyAsterisk
 realm = myrealm.com

 autodomain=no
 domain=PU.BL.IC.IP
 domain=testers.com

 allowexternaldomains=no
 allowguest=no
 avpf=yes
 encryption=yes

 transport=ws,udp
 icesupport=yes
 srvlookup=yes


 And here's an example of a ws client in my realtime peer table:

 id: 4
   name: 660
 ipaddr: PU.BL.IC.IP
   port: 5060
 regseconds: 1406368294
defaultuser: 660
fullcontact: sip:6...@pu.bl.ic.ip:5060
  regserver:
  useragent:
 lastms: 0
   host: dynamic
   type: friend
context: default
   deny: 0.0.0.0/0.0.0.0
 permit: PU.BL.IC.IP
 secret: NULL
  md5secret: NULL
   remotesecret: NULL
  transport: NULL
   dtmfmode: NULL
directmedia: NULL
nat: force_rport,comedia
  callgroup: NULL
pickupgroup: NULL
   language: NULL
   disallow: NULL
  allow: NULL
   insecure: NULL
  trustrpid: NULL
 progressinband: NULL
   promiscredir: NULL
  useclientcode: NULL
accountcode: NULL
 setvar: NULL
   callerid: NULL
   amaflags: NULL
callcounter: NULL
  busylevel: NULL
   allowoverlap: NULL
 allowsubscribe: NULL
   videosupport: NULL
 maxcallbitrate: NULL
  rfc2833compensate: NULL
mailbox: NULL
 session-timers: NULL
session-expires: NULL
  session-minse: NULL
  session-refresher: NULL
 t38pt_usertpsource: NULL
   regexten: NULL
 fromdomain: testers.com
   fromuser: 660
qualify: NULL
  defaultip: NULL
 rtptimeout: NULL
 rtpholdtimeout: NULL
   sendrpid: NULL

[asterisk-users] Rejecting secure audio stream without encryption details - when using ws clients and Kamailio integration

2014-07-26 Thread Olli Heiskanen
Greetings,

I've noticed a problem that might originate from my Asterisk configuration,
could use a hand in sorting it out. Problem is a 488 response from Asterisk
whenever it gets RTP/SAVPF profile in the SDP.

My current setup has Asterisk Kamailio realtime integration, and Kamailio
uses dispatcher to route calls for Asterisk to handle. Now I have only one
Asterisk, on the same machine as Kamailio. The version is 11.10.2. With
Kamailio I use rtpengine, which affects SDP descriptions when 488 response
is received.

My goal is to enable two websocket clients using Chrome to call each other,
using Kamailio as outbound proxy. Kamailio routes signaling to Asterisk,
and then back to clients. Currently the problem is RTP, when INVITE is
received from client A to Kamailio, it is relayed to Asterisk. Asterisk
responds with 488 Not Acceptable here and the cli says:

 NOTICE[11642][C-0006]: chan_sip.c:10124 process_sdp: Received SAVPF
profle in audio offer but AVPF is not enabled, enabling: audio 30212
RTP/SAVPF 111 103 104 0 8 106 105 13 126
 WARNING[11642][C-0006]: chan_sip.c:10509 process_sdp: Rejecting secure
audio stream without encryption details: audio 30212 RTP/SAVPF 111 103 104
0 8 106 105 13 126


Strange thing is, I don't know why Asterisk says AVPF is not enabled. The
warning about rejecting the audio stream must be behind the 488 response
but I didn't find any answers that would solve my case so I must turn to
you guys. In my sip.conf I have savpf=yes, but is there something else I
need to enable or change in the configs or change my peer configurations?

I'm not sure if this is relevant but I checked that Asterisk was
successfully compiled with res_srtp module.

Here's my sip.conf contents:

bindport = 5070 ; using this since Kamailio is at 5060
bindaddr = PU.BL.IC.IP
tcpenable = yes ;no
limitonpeers = yes
rtcachefriends = yes; for realtime
rtupdate=yes
tos_sip=cs3
tos_audio=ef
useragent=MyAsterisk
realm = myrealm.com

autodomain=no
domain=PU.BL.IC.IP
domain=testers.com

allowexternaldomains=no
allowguest=no
avpf=yes
encryption=yes

transport=ws,udp
icesupport=yes
srvlookup=yes


And here's an example of a ws client in my realtime peer table:

id: 4
  name: 660
ipaddr: PU.BL.IC.IP
  port: 5060
regseconds: 1406368294
   defaultuser: 660
   fullcontact: sip:6...@pu.bl.ic.ip:5060
 regserver:
 useragent:
lastms: 0
  host: dynamic
  type: friend
   context: default
  deny: 0.0.0.0/0.0.0.0
permit: PU.BL.IC.IP
secret: NULL
 md5secret: NULL
  remotesecret: NULL
 transport: NULL
  dtmfmode: NULL
   directmedia: NULL
   nat: force_rport,comedia
 callgroup: NULL
   pickupgroup: NULL
  language: NULL
  disallow: NULL
 allow: NULL
  insecure: NULL
 trustrpid: NULL
progressinband: NULL
  promiscredir: NULL
 useclientcode: NULL
   accountcode: NULL
setvar: NULL
  callerid: NULL
  amaflags: NULL
   callcounter: NULL
 busylevel: NULL
  allowoverlap: NULL
allowsubscribe: NULL
  videosupport: NULL
maxcallbitrate: NULL
 rfc2833compensate: NULL
   mailbox: NULL
session-timers: NULL
   session-expires: NULL
 session-minse: NULL
 session-refresher: NULL
t38pt_usertpsource: NULL
  regexten: NULL
fromdomain: testers.com
  fromuser: 660
   qualify: NULL
 defaultip: NULL
rtptimeout: NULL
rtpholdtimeout: NULL
  sendrpid: NULL
 outboundproxy: PU.BL.IC.IP
   timert1: NULL
timerb: NULL
   qualifyfreq: NULL
  constantssrc: NULL
 contactpermit: NULL
   contactdeny: NULL
   usereqphone: NULL
   textsupport: NULL
 faxdetect: NULL
  buggymwi: NULL
  auth: NULL
  fullname: NULL
 trunkname: NULL
cid_number: NULL
   callingpres: NULL
  mohinterpret: NULL
mohsuggest: NULL
parkinglot: NULL
  hasvoicemail: NULL
  subscribemwi: NULL
   vmexten: NULL
   autoframing: NULL
  rtpkeepalive: NULL
call-limit: NULL
   g726nonstandard: NULL
  ignoresdpversion: NULL
 allowtransfer: NULL
   dynamic: NULL
  path: NULL
   supportpath: NULL
 sippasswd: my-md5-pwd
  rpid: NULL
domain: testers.com
sippasswd2: NULL


I'd greatly appreciate help on this!

cheers,
Olli
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   

Re: [asterisk-users] Extra REGISTER messages sent by Asterisk when subscribe for MWI is defined in zoiper

2014-07-18 Thread Olli Heiskanen
Hello,

I noticed something that might be a result from the fix suggested here, so
I'll continue a bit on this thread. After removing the callbackextension
field from my realtime sip peer table, the following started happening:  I
issued command 'sip reload' on the cli and get the following warning:

WARNING[24427]: res_config_mysql.c:501 realtime_multi_mysql: MySQL
RealTime: Failed to query database: Unknown column 'callbackextension' in
'where clause'

This must be a result from removing that field from the db, but somewhere
in the code there is a select statement where the callbackextension field
is used in the where clause, resulting to the above warning.

I wonder if this something to be worried about, or is going to cause
problems later? My goal is of coure just to handle calls, save cdrs, do pbx
features etc with this asterisk.

cheers,
Olli



2014-07-15 16:56 GMT+03:00 Olli Heiskanen ohjelmistoarkkite...@gmail.com:


 Wow, thanks Joshua, it would've taken me forever to find the answer there.
 It did the trick and the registrations look much better.

 Merci beaucoup!

 - Olli



 2014-07-15 16:26 GMT+03:00 Joshua Colp jc...@digium.com:

 Olli Heiskanen wrote:


 Thanks, there are no register lines in my sip.conf, but I have defined
 callbackextension fields in the realtime table, to be the same value as
 the extension name. In this case, extension 771 has callbackextension
 value 771. I tried replacing those with null values but that had no
 effect on the outcome.


 The callbackextension is the reason this is happening.

 From sip.conf.sample:

 ; A similar effect can be achieved by adding a callbackextension option
 in a peer section.
 ; this is equivalent to having the following line in the general section:
 ;
 ;register = username:secret@host/callbackextension
 ;
 ; and more readable because you don't have to write the parameters in two
 places
 ; (note that the port is ignored - this is a bug that should be fixed).

 Remove that column from your table, restart Asterisk, and it should go
 away.


 --
 Joshua Colp
 Digium, Inc. | Senior Software Developer
 445 Jan Davis Drive NW - Huntsville, AL 35806 - US
 Check us out at: www.digium.com  www.asterisk.org

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users



-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Extra REGISTER messages sent by Asterisk when subscribe for MWI is defined in zoiper

2014-07-15 Thread Olli Heiskanen
Hello all,

I have an Asterisk installation with Kamailio using realtime integration. I
have gotten my clients to register, but there is something odd about the
sip message flow with some of my clients. My clients are Zoiper and
Asterisk is 11.10.2.

When I set 'Subscribe to MWI' value to 'both', after a normal, successful
registration Asterisk begins to send REGISTER messages to Kamailio every
105 seconds. Kamailio responds with 200 OK. If I set the value to
'disabled', Asterisk does not send these frequent REGISTER messages.
Probably due to these REGISTERs Kamailio sees 2 AORs for the account for
those clients whose 'Subscribe to MWI' setting is defined as 'both'.

I know this is mostly not an Asterisk problem, but I'd like to understand
better what exactly makes Asterisk to react this way? I didn't find any
differences in the SIP messages during registration (I could be just blind
though...), or in the way the clients are set up in the Realtime db.

On the 'Subscribe to MWI' setting the Zoiper documentation states: this
tag specifies when Zoiper is going to subscribe for Message Waiting
Indication(MWI) for this account. In addition to values 'both' and
'disabled' there are values 'before registration (Asterisk)' and 'after
registration'. To me it seems strange to use REGISTER messages for
subscribing to something related to voicemail messages. So far I haven't
learned about the way Asterisk handles voicemail stuff but if You guys have
some clarification on why I'm getting these results I'd appreciate it!

cheers,
Olli
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Extra REGISTER messages sent by Asterisk when subscribe for MWI is defined in zoiper

2014-07-15 Thread Olli Heiskanen
Hello,

Thanks for your response, I actually verified that the Zoiper setting is
not the reason for Asterisk to start sending REGISTERs, it only looked like
it as I checked the Kamailio output before Asterisk sent the first REGISTER
to Kamailio, right after I had played with that setting. (sorry, my bad!)

However, _something_ is causing these REGISTERs, here's an example of a
REGISTER message sent from Asterisk to Kamailio:

REGISTER sip:testers.com SIP/2.0
Via: SIP/2.0/UDP my_ip:5070;branch=z9hG4bK7477f754;rport
Max-Forwards: 70
From: sip:771@my_ip;tag=as7a88c4c6
To: sip:771@my_ip
Call-ID: 3e946958322b1e2d6bfa564d46bf8...@testers.com
CSeq: 121 REGISTER
User-Agent: Asterisk PBX
Expires: 120
Contact: sip:771@91.221.66.61:5070
Content-Length: 0

Is there any other reason - other than client settings - why this would
happen?

cheers,
Olli



2014-07-15 15:40 GMT+03:00 Joshua Colp jc...@digium.com:

 Olli Heiskanen wrote:


 Hello all,


 Bonjour,


  I have an Asterisk installation with Kamailio using realtime
 integration. I have gotten my clients to register, but there is
 something odd about the sip message flow with some of my clients. My
 clients are Zoiper and Asterisk is 11.10.2.

 When I set 'Subscribe to MWI' value to 'both', after a normal,
 successful registration Asterisk begins to send REGISTER messages to
 Kamailio every 105 seconds. Kamailio responds with 200 OK. If I set the
 value to 'disabled', Asterisk does not send these frequent REGISTER
 messages. Probably due to these REGISTERs Kamailio sees 2 AORs for the
 account for those clients whose 'Subscribe to MWI' setting is defined as
 'both'.


 Can you provide a link to a sip debug log of this occurring? It sounds
 extremely weird and I'm not really sure how chan_sip would be doing such a
 thing...

 Cheers,

 --
 Joshua Colp
 Digium, Inc. | Senior Software Developer
 445 Jan Davis Drive NW - Huntsville, AL 35806 - US
 Check us out at: www.digium.com  www.asterisk.org

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Extra REGISTER messages sent by Asterisk when subscribe for MWI is defined in zoiper

2014-07-15 Thread Olli Heiskanen
Thanks, there are no register lines in my sip.conf, but I have defined
callbackextension fields in the realtime table, to be the same value as the
extension name. In this case, extension 771 has callbackextension value
771. I tried replacing those with null values but that had no effect on the
outcome.

Currently when I register clients in, after some seconds Asterisk starts
sending REGISTER messages, at which point Kamailio sees 2 AORs, here's an
example:
(here 1.1.1.1 is the public ip of my server that houses Kamailio at 5060
and Asterisk at 5070, and 2.2.2.2 is the public ip of the network clients
are in)

AOR:: 7...@testers.com
Contact::
sip:771@2.2.2.2:5060;rinstance=c8447637c890c010;transport=UDP
Q=
Expires:: 3470
Callid::
NDQ5Njk4ZmUxZGJhNzRjMzUwMTA2OThmOGFjYzc4Zjk.
Cseq:: 2
User-agent:: Z 3.2.21357 r21367
State:: CS_SYNC
Flags:: 0
Cflag:: 0
Socket:: udp:1.1.1.1:5060
Methods:: 5087
Ruid:: uloc-53bfe447-35b0-608
Reg-Id:: 0
Last-Keepalive:: 1405429865
Last-Modified:: 1405429865
AOR:: 771@1.1.1.1
Contact:: sip:771@1.1.1.1:5070 Q=
Expires:: 105
Callid::
3e946958322b1e2d6bfa564d46bf8...@testers.com
Cseq:: 133
User-agent:: Asterisk PBX
State:: CS_SYNC
Flags:: 0
Cflag:: 0
Socket:: udp:1.1.1.1:5060
Methods:: 4294967295
Ruid:: uloc-53bfe447-35b0-708
Reg-Id:: 0
Last-Keepalive:: 1405429980
Last-Modified:: 1405429980

I guess there should be only one AOR, so Asterisk might get wrong kind of
data to begin with or it's configured incorrectly. In my sip trace the
REGISTER flow from client to Kamailio to Asterisk seems ok, I could be
wrong though.

In my setup clients authenticate with Kamailio and Kamailio sends a
REGISTER to Asterisk according to guide I used:
http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb

How would I fix this double-AOR problem, can it be fixed on Asterisk
configuration?

thanks,
Olli







2014-07-15 16:00 GMT+03:00 Joshua Colp jc...@digium.com:

 Olli Heiskanen wrote:

 Hello,

 Thanks for your response, I actually verified that the Zoiper setting is
 not the reason for Asterisk to start sending REGISTERs, it only looked
 like it as I checked the Kamailio output before Asterisk sent the first
 REGISTER to Kamailio, right after I had played with that setting.
 (sorry, my bad!)

 However, _something_ is causing these REGISTERs, here's an example of a
 REGISTER message sent from Asterisk to Kamailio:

 REGISTER sip:testers.com http://testers.com SIP/2.0

  Via: SIP/2.0/UDP my_ip:5070;branch=z9hG4bK7477f754;rport
  Max-Forwards: 70
  From: sip:771@my_ip;tag=as7a88c4c6
  To: sip:771@my_ip
  Call-ID: 3e946958322b1e2d6bfa564d46bf8...@testers.com
 mailto:3e946958322b1e2d6bfa564d46bf8...@testers.com

  CSeq: 121 REGISTER
  User-Agent: Asterisk PBX
  Expires: 120
  Contact: sip:771@91.221.66.61:5070
 http://sip:771@91.221.66.61:5070

  Content-Length: 0

 Is there any other reason - other than client settings - why this would
 happen?


 If Asterisk was configured to do so, yes. Do you have any register lines
 in sip.conf or do you have the callbackextension option set for any peers?


 --
 Joshua Colp
 Digium, Inc. | Senior Software Developer
 445 Jan Davis Drive NW - Huntsville, AL 35806 - US
 Check us out at: www.digium.com  www.asterisk.org

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Extra REGISTER messages sent by Asterisk when subscribe for MWI is defined in zoiper

2014-07-15 Thread Olli Heiskanen
Wow, thanks Joshua, it would've taken me forever to find the answer there.
It did the trick and the registrations look much better.

Merci beaucoup!

- Olli



2014-07-15 16:26 GMT+03:00 Joshua Colp jc...@digium.com:

 Olli Heiskanen wrote:


 Thanks, there are no register lines in my sip.conf, but I have defined
 callbackextension fields in the realtime table, to be the same value as
 the extension name. In this case, extension 771 has callbackextension
 value 771. I tried replacing those with null values but that had no
 effect on the outcome.


 The callbackextension is the reason this is happening.

 From sip.conf.sample:

 ; A similar effect can be achieved by adding a callbackextension option
 in a peer section.
 ; this is equivalent to having the following line in the general section:
 ;
 ;register = username:secret@host/callbackextension
 ;
 ; and more readable because you don't have to write the parameters in two
 places
 ; (note that the port is ignored - this is a bug that should be fixed).

 Remove that column from your table, restart Asterisk, and it should go
 away.


 --
 Joshua Colp
 Digium, Inc. | Senior Software Developer
 445 Jan Davis Drive NW - Huntsville, AL 35806 - US
 Check us out at: www.digium.com  www.asterisk.org

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Realtime integration: Unregistered clients showing as registered?

2014-05-15 Thread Olli Heiskanen
Hello,

Thank you for your response.

Actually, I managed to solve a part of the problem; as I use Kamailio to
handle authentication, problem was that even though authentication went ok
through Kamailio, Asterisk refused to accept messages from Kamailio. That's
why Asterisk sent the 401. I think I had incorrect values in the realtime
sippeers table rows, and also I had to add values to deny and permit
fields, which in fact were in the wrong order. So no wonder I was having
problems with authentication! (and yes, I do know how digest authentication
works ;))

I fixed the deny values to 0.0.0.0/0.0.0.0 and permit value to Kamailio ip.

Even after this I had problems having Asterisk accept the authentications.
Asterisk cli was saying:
ERROR[20605]: chan_sip.c:30790 build_peer: Bad ACL entry in configuration
line 0 : kamailioip:5060

... that was because I had tried to define kamailio ip with port, as
Kamailio and Asterisk are on the same machine, but removing the port solved
that (not sure but I guess it is good I use 5060 for Kamailio and 5070 for
Asterisk instead of vice versa, perhaps this solution wouldn't work then).
Then I found that I had to add values to fields: nat (to force_rport) and
defaultip (to 0.0.0.0), and only after that I got Asterisk to see the
registered peers. So now everything looks ok from both Asterisk and
Kamailio when it comes to authentication.

I still can't get calls going though, in the asterisk cli I get 'Everyone
is busy/congested at this time', so I'm going to continue investigating
that. If you guys have good advice for me at this time I'll be most happy
to take them.

cheers,
Olli



2014-05-15 17:17 GMT+03:00 Leandro Dardini ldard...@gmail.com:

 It is the way it works. First the phone sends a REGISTER without any
 password. Asterisk answers with a Unauthorized and provide a nonce to be
 used for the next registration attempt, using it to encrypt the password.

 Leandro


 2014-05-14 13:12 GMT+02:00 Olli Heiskanen ohjelmistoarkkite...@gmail.com
 :


 Hello,

 After a small break from working on this, I got the idea of tcpdumping
 the correct ports. What I see is REGISTER messages from Kamailio port to
 Asterisk, which are replied with 401 Unauthorized. Why is this happening?
 In my sippeers table the secret field has no value (tried both NULL and
 empty string) and the added field sippasswd has the correct password for
 the user.

 The above might be the cause of my problem, would anyone be able to
 advice me to get to correct behaviour? Now Kamailio sees the clients as
 registered, which would be wrong if Asterisk doesn't.

 cheers,
 Olli



 2014-04-24 11:27 GMT+03:00 Olli Heiskanen ohjelmistoarkkite...@gmail.com
 :


 Hello all,

 I've been testing a Kamailio Asterisk Realtime integration, and found a
 strange situation.

 My problem is that when using the integration, everything seems ok but
 Asterisk does not see the clients as registered. Kamailio and the clients
 report registered clients. Also calls fail.

 In Asterisk cli sip show peers shows nothing but for example realtime
 load sipusers name 660 shows the user data. Field regseconds has a value
 and fullcontact has value 'sip:660@127.0.0.1:5060' (kamailio ip:port as
 they are on the same machine).

 I have a very simple dialplan:

 [general]

 [default]
 exten = _XXX,1,NoOp(general : Dialed ${EXTEN})
  same = n,Dial(SIP/${EXTEN},3600,rt)
  same = n,Hangup


 Here's more on my problem and background to it, guys on the Kamailio
 list helped out but looks like I need to check my Asterisk configuration.
 https://www.mail-archive.com/sr-users@lists.sip-router.org/msg18555.html

 My goal is to have all clients in the asterisk database, asterisk (one
 at this point, several later) handling the calls and Kamailio as proxy. In
 Kamailio I have the WITH_MULTIDOMAIN directive on but I'm using only one
 domain 'testers.com'.

 I have Asterisk 11.8.1 and Kamailio 4.2.0-dev4 on CentOS 6.5, all are on
 the same rental virtual server. Clients are in my home network behind nat.
 In MySQL I have database asterisk with table sippeers, where I have
 clients added like this:
 INSERT INTO sippeers
 (name,defaultuser,host,sippasswd,fromuser,fromdomain,callbackextension,type)
 VALUES ('660', '660', 'dynamic', 'password', '660', 'testers.com
 ','660','friend');

 In this message there are some outputs and a sip trace of a register:
 https://www.mail-archive.com/sr-users@lists.sip-router.org/msg18558.html

 What I don't know is how to configure sip.conf, so far I've just been
 making guesses based on online examples and documentation.
 My current sip.conf looks like this:

 [general]
 bindport = 5070
 bindaddr = 127.0.0.1
 tcpbindaddr = 127.0.0.1:5070
 tcpenable = no
 limitonpeers = yes
 ;rtcachefriends = yes
 tos_sip=cs3
 tos_audio=ef
 realm = testers.com

 I've tried defining realm and domain values, but I lack proper
 understanding of those. Can you guys help me out? Are there any other
 configurations I need to check?

 Respectfully

Re: [asterisk-users] Realtime integration: Unregistered clients showing as registered?

2014-05-14 Thread Olli Heiskanen
Hello,

After a small break from working on this, I got the idea of tcpdumping the
correct ports. What I see is REGISTER messages from Kamailio port to
Asterisk, which are replied with 401 Unauthorized. Why is this happening?
In my sippeers table the secret field has no value (tried both NULL and
empty string) and the added field sippasswd has the correct password for
the user.

The above might be the cause of my problem, would anyone be able to advice
me to get to correct behaviour? Now Kamailio sees the clients as
registered, which would be wrong if Asterisk doesn't.

cheers,
Olli



2014-04-24 11:27 GMT+03:00 Olli Heiskanen ohjelmistoarkkite...@gmail.com:


 Hello all,

 I've been testing a Kamailio Asterisk Realtime integration, and found a
 strange situation.

 My problem is that when using the integration, everything seems ok but
 Asterisk does not see the clients as registered. Kamailio and the clients
 report registered clients. Also calls fail.

 In Asterisk cli sip show peers shows nothing but for example realtime load
 sipusers name 660 shows the user data. Field regseconds has a value and
 fullcontact has value 'sip:660@127.0.0.1:5060' (kamailio ip:port as they
 are on the same machine).

 I have a very simple dialplan:

 [general]

 [default]
 exten = _XXX,1,NoOp(general : Dialed ${EXTEN})
  same = n,Dial(SIP/${EXTEN},3600,rt)
  same = n,Hangup


 Here's more on my problem and background to it, guys on the Kamailio list
 helped out but looks like I need to check my Asterisk configuration.
 https://www.mail-archive.com/sr-users@lists.sip-router.org/msg18555.html

 My goal is to have all clients in the asterisk database, asterisk (one at
 this point, several later) handling the calls and Kamailio as proxy. In
 Kamailio I have the WITH_MULTIDOMAIN directive on but I'm using only one
 domain 'testers.com'.

 I have Asterisk 11.8.1 and Kamailio 4.2.0-dev4 on CentOS 6.5, all are on
 the same rental virtual server. Clients are in my home network behind nat.
 In MySQL I have database asterisk with table sippeers, where I have
 clients added like this:
 INSERT INTO sippeers
 (name,defaultuser,host,sippasswd,fromuser,fromdomain,callbackextension,type)
 VALUES ('660', '660', 'dynamic', 'password', '660', 'testers.com
 ','660','friend');

 In this message there are some outputs and a sip trace of a register:
 https://www.mail-archive.com/sr-users@lists.sip-router.org/msg18558.html

 What I don't know is how to configure sip.conf, so far I've just been
 making guesses based on online examples and documentation.
 My current sip.conf looks like this:

 [general]
 bindport = 5070
 bindaddr = 127.0.0.1
 tcpbindaddr = 127.0.0.1:5070
 tcpenable = no
 limitonpeers = yes
 ;rtcachefriends = yes
 tos_sip=cs3
 tos_audio=ef
 realm = testers.com

 I've tried defining realm and domain values, but I lack proper
 understanding of those. Can you guys help me out? Are there any other
 configurations I need to check?

 Respectfully,
 Olli



-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Asterisk 11.9 with webRTC demo integration

2014-05-14 Thread Olli Heiskanen
Hello,

I'm far from being an expert, but as far as I know when you use https in
your website the browser will ask to use the audio devices only once and
then remembers your decision. When using http it will ask every time.

Sorry I can't be of more help but hope this helps.

cheers,
Olli


2014-05-10 10:27 GMT+03:00 bhavik patel bhavikpatel14...@gmail.com:

 Hi All,

 I am trying to configure webRTC phone example for SIPml5 and i found this
 info from
 https://wiki.asterisk.org/wiki/display/AST/Asterisk+WebRTC+Support.

 I have asterisk 11.9.0 installed and downloaded source of SIPml5 from
 http://code.google.com/p/sipml5/source/checkout I copied sample code into
 web root directory and example loaded successfully and also able to
 register 2 extensions.

 I have tried both browser Google Chrome and Firefox with their latest
 versions.

 For asterisk, I made some configuration like below. Please check :
 http://pastebin.com/7KCvtcNf

 For Outbound calls : when i am dialling 8002 - 8001 every time Chrome
 Browser asking for allow microphone. Is there any way to disable asking
 permission and allowing it by default ? when i allow microphone then SIpml5
 phone showing like Not Allow.

 Here is the asterisk logs : http://pastebin.com/JZeDjyay

 For Incoming calls : When call come to browser,And allow microphone then
 Call rejected and asterisk showing like Got SIP response 603 Failed to
 get local SDP in asterisk CLI.

 But After some google i found new link
 https://code.google.com/p/sipml5/wiki/Downloads for SIPml-api.js and
 after replacing that JS File Calls are comming in browser even i am able to
 answer that calls,Also in browser it says In call but in asterisk CLI it
 keep showing ringing and other end showing like remote ringing .

 Here is the asterisk logs : http://pastebin.com/e8Ap3bhq

 Can anyone please let me know what am i doing wrong?


 --
 Thanks,
 Bhavik Patel


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Realtime integration: Unregistered clients showing as registered?

2014-04-24 Thread Olli Heiskanen
Hello all,

I've been testing a Kamailio Asterisk Realtime integration, and found a
strange situation.

My problem is that when using the integration, everything seems ok but
Asterisk does not see the clients as registered. Kamailio and the clients
report registered clients. Also calls fail.

In Asterisk cli sip show peers shows nothing but for example realtime load
sipusers name 660 shows the user data. Field regseconds has a value and
fullcontact has value 'sip:660@127.0.0.1:5060' (kamailio ip:port as they
are on the same machine).

I have a very simple dialplan:

[general]

[default]
exten = _XXX,1,NoOp(general : Dialed ${EXTEN})
 same = n,Dial(SIP/${EXTEN},3600,rt)
 same = n,Hangup


Here's more on my problem and background to it, guys on the Kamailio list
helped out but looks like I need to check my Asterisk configuration.
https://www.mail-archive.com/sr-users@lists.sip-router.org/msg18555.html

My goal is to have all clients in the asterisk database, asterisk (one at
this point, several later) handling the calls and Kamailio as proxy. In
Kamailio I have the WITH_MULTIDOMAIN directive on but I'm using only one
domain 'testers.com'.

I have Asterisk 11.8.1 and Kamailio 4.2.0-dev4 on CentOS 6.5, all are on
the same rental virtual server. Clients are in my home network behind nat.
In MySQL I have database asterisk with table sippeers, where I have clients
added like this:
INSERT INTO sippeers
(name,defaultuser,host,sippasswd,fromuser,fromdomain,callbackextension,type)
VALUES ('660', '660', 'dynamic', 'password', '660', 'testers.com
','660','friend');

In this message there are some outputs and a sip trace of a register:
https://www.mail-archive.com/sr-users@lists.sip-router.org/msg18558.html

What I don't know is how to configure sip.conf, so far I've just been
making guesses based on online examples and documentation.
My current sip.conf looks like this:

[general]
bindport = 5070
bindaddr = 127.0.0.1
tcpbindaddr = 127.0.0.1:5070
tcpenable = no
limitonpeers = yes
;rtcachefriends = yes
tos_sip=cs3
tos_audio=ef
realm = testers.com

I've tried defining realm and domain values, but I lack proper
understanding of those. Can you guys help me out? Are there any other
configurations I need to check?

Respectfully,
Olli
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users