Re: [asterisk-users] Is it possible to have two endpoints to the same IP address where one uses IP based authentication and the other requires asterisk to register to that system?

2018-01-04 Thread George Joseph
On Thu, Jan 4, 2018 at 11:07 AM, Dan Cropp  wrote:

> Thank you George.
>
>
>
> I will pass along the rfc information to those responsible for the other
> switch.
>
>
>
> I missed the match_header addition to Asterisk.
>
> Unfortunately, the only header field that seems appropriate is the To
> header.
>
>
>
> On a separate box I am now trying to configure the endpoint recognition.
> Planning on multiple endpoints to the same switch, so I am trying to use
> the match_header field.
>
>
>
> I tried programming the match_header with the To: header information.
> Unfortunately, it didn’t work.  Apparently the To header doesn’t work with
> the match_header field.
>
> The Asterisk debug shows the following…
>
>
>
> DEBUG[2778] res_pjsip_endpoint_identifier_ip.c: SIP message contains
> header 'To' but value '' does not match value ''
> for endpoint '286'
>

Rats.  Apparently the code assumes the header being searched for is a
"generic string" header but the To header is its own non-generic type.

I created an issue for that...
https://issues.asterisk.org/jira/browse/ASTERISK-27548



>
>
> *From:* asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-
> boun...@lists.digium.com] *On Behalf Of *George Joseph
> *Sent:* Tuesday, December 19, 2017 7:57 AM
>
> *To:* Asterisk Users Mailing List - Non-Commercial Discussion
> *Subject:* Re: [asterisk-users] Is it possible to have two endpoints to
> the same IP address where one uses IP based authentication and the other
> requires asterisk to register to that system?
>
>
>
>
>
>
>
> On Mon, Dec 18, 2017 at 9:04 AM, Dan Cropp  wrote:
>
> Thanks George
>
>
>
> I originally didn’t have the 1002@ for the identify.  Changed that when
> things were not working.  I changed it back.
>
>
>
> Unfortunately, the system I am connecting with doesn’t seem to support the
> line support.  Looking at the SIP packets, I see Asterisk send it.
> Unfortunately, they do not send the line information as part of the
> INVITE.  I checked with some developers of that system and they do not know
> anything about the line setting.
>
> Is there any rfcs I could refer them to?
>
>
>
> Yeah, I've found that some providers do and some providers don't.
>
>
>
>
>
> https://tools.ietf.org/html/rfc3261#section-19.1
>
> An implementation MUST include any provided transport, maddr, ttl, or
> user parameter in the Request-URI of the formed request. If the URI
> contains a method parameter, its value MUST be used as the method of
> the request. The method parameter MUST NOT be placed in the
> Request-URI.
>
> *​​*
>
>
> *Unknown URI parameters MUST be placed in the message'sRequest-URI*.
>
>
>
> The identify object also has the capability to match against a specific
> header and value but it looks like it only tries to match on header if it
> can't find a match by ip address.  Here's some info on it anyway.
>
>
>
> If you're provider puts something unique and constant in the headers, like
> a User-Agent string that doesn't change, you can also try using the
> "match_header" parameter to an identify object.
>
>
>
> [my_provider]
>
> type = identify
>
> match_header = User-Agent: Something Unique 1.0.0
>
> endpoint = provider
>
>
>
> It has to be an exact match though, no wildcards or regular expressions.
>
>
>
> I opened an issue[1] on separating ip matching from header matching so
> they can be re-ordered.
>
>
>
>
>
>
>
>
>
> [1] https://issues.asterisk.org/jira/browse/ASTERISK-27491
>
>
>
>
>
>
>
> *From:* asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-
> boun...@lists.digium.com] *On Behalf Of *George Joseph
> *Sent:* Thursday, December 14, 2017 10:59 AM
> *To:* Asterisk Users Mailing List - Non-Commercial Discussion
> *Subject:* Re: [asterisk-users] Is it possible to have two endpoints to
> the same IP address where one uses IP based authentication and the other
> requires asterisk to register to that system?
>
>
>
>
>
>
>
> On Wed, Dec 13, 2017 at 10:51 AM, Dan Cropp  wrote:
>
> Currently using PJSIP.  First, they want me to get this working with the
> existing PJSIP configuration, but then setup a second box using chan_sip
> performing similar work.
>
>
>
> For PJSIP…
>
> I currently have an endpoint configured to a system using IP based
> authentication.  It is configured with a match setting in the endpoint
> section.
>
> All channels coming from that IP address go to this endpoint.
>
>
>
> They want me to keep this endpoint, but add a new endpoint where we
> register with them.
>
>
>
> Existing…
>
> [transport1]
>
> type = transport
>
> bind = 0.0.0.0
>
> protocol = udp
>
>
>
> [1002]
>
> type = aor
>
> remove_existing = yes
>
> contact = sip:1...@xxx.xxx.xxx.xxx
>
>
>
> [1002]
>
> type = endpoint
>
> context = mycontext
>
> transport = transport1
>
> accountcode = 6
>
> dtmf_mode = inband
>
> device_state_busy_at = 48
>
> force_rport = no
>
> identify_by = username
>
> from_user = 1002
>
> disallow = all
>
> allow = ulaw
>
> acl = acl1
>
>
>
> [identify112]
>
> type = identify

[asterisk-users] AUTO: Kevin Larsen is out of the office (returning Mon 01/08/2018)

2018-01-04 Thread kevin . larsen

I am out of the office from Thu 01/04/2018 until Mon 01/08/2018.

I am out of the office and will have limited contact. For all
emergencies/issues, please contact the helpdesk at
helpd...@pioneerballoon.com or 316-688-8777.


Note: This is an automated response to your message  "[asterisk-users]
Duplicate CDR's in mysql" sent on 1/4/2018 12:44:33 PM.

This is the only notification you will receive while this person is away.


__
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
__

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


[asterisk-users] Duplicate CDR's in mysql

2018-01-04 Thread Mike Diehl
Hi all,

I have a problem I've not seen before.  My Asterisk server stores CDR's via 
mysql, and I'm getting duplicate records.

For example:

mysql> select uniqueid,count(*) from cdr  group by uniqueid having count(*)>1;
+--+--+
| uniqueid | count(*) |
+--+--+
| server12-1515090905.2182 |5 |
| server12-1515091190.2215 |3 |
+--+--+
2 rows in set (0.68 sec)


If I query for each uniqueid, I see that the records are identical.  I have a 
Perl script that goes through and removes the duplicates.  Otherwise, EVERY CDR 
would be duplicated.

Now, my Asterisk server was configured with multiple CDR backends, but I 
unloaded those modules.  Here is what I have configured during run-time:

*CLI> cdr show status

Call Detail Record (CDR) settings
--
  Logging:Enabled
  Mode:   Simple
  Log unanswered calls:   No
  Log congestion: No

* Registered Backends
  ---
cdr-custom
Adaptive ODBC

Any ideas would be appreciated.



-- 
Mike Diehl
Diehlnet Communications, LLC. 
Sales: (800) 254-6105   
Support: (505) 903-5700 
Fax: (505) 903-5701  

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Is it possible to have two endpoints to the same IP address where one uses IP based authentication and the other requires asterisk to register to that system?

2018-01-04 Thread Dan Cropp
Thank you George.

I will pass along the rfc information to those responsible for the other switch.

I missed the match_header addition to Asterisk.
Unfortunately, the only header field that seems appropriate is the To header.

On a separate box I am now trying to configure the endpoint recognition.  
Planning on multiple endpoints to the same switch, so I am trying to use the 
match_header field.

I tried programming the match_header with the To: header information.  
Unfortunately, it didn’t work.  Apparently the To header doesn’t work with the 
match_header field.
The Asterisk debug shows the following…

DEBUG[2778] res_pjsip_endpoint_identifier_ip.c: SIP message contains header 
'To' but value '' does not match value '' for 
endpoint '286'

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of George Joseph
Sent: Tuesday, December 19, 2017 7:57 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Is it possible to have two endpoints to the same 
IP address where one uses IP based authentication and the other requires 
asterisk to register to that system?



On Mon, Dec 18, 2017 at 9:04 AM, Dan Cropp 
mailto:d...@amtelco.com>> wrote:

Thanks George



I originally didn’t have the 1002@ for the identify.  Changed that when things 
were not working.  I changed it back.



Unfortunately, the system I am connecting with doesn’t seem to support the line 
support.  Looking at the SIP packets, I see Asterisk send it.  Unfortunately, 
they do not send the line information as part of the INVITE.  I checked with 
some developers of that system and they do not know anything about the line 
setting.

Is there any rfcs I could refer them to?

Yeah, I've found that some providers do and some providers don't.


https://tools.ietf.org/html/rfc3261#section-19.1

An implementation MUST include any provided transport, maddr, ttl, or
user parameter in the Request-URI of the formed request. If the URI
contains a method parameter, its value MUST be used as the method of
the request. The method parameter MUST NOT be placed in the
Request-URI.
​​
Unknown URI parameters MUST be placed in the message's
Request-URI.

The identify object also has the capability to match against a specific header 
and value but it looks like it only tries to match on header if it can't find a 
match by ip address.  Here's some info on it anyway.

If you're provider puts something unique and constant in the headers, like a 
User-Agent string that doesn't change, you can also try using the 
"match_header" parameter to an identify object.

[my_provider]
type = identify
match_header = User-Agent: Something Unique 1.0.0
endpoint = provider

It has to be an exact match though, no wildcards or regular expressions.

I opened an issue[1] on separating ip matching from header matching so they can 
be re-ordered.




[1] https://issues.asterisk.org/jira/browse/ASTERISK-27491






From: 
asterisk-users-boun...@lists.digium.com
 
[mailto:asterisk-users-boun...@lists.digium.com]
 On Behalf Of George Joseph
Sent: Thursday, December 14, 2017 10:59 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Is it possible to have two endpoints to the same 
IP address where one uses IP based authentication and the other requires 
asterisk to register to that system?







On Wed, Dec 13, 2017 at 10:51 AM, Dan Cropp 
mailto:d...@amtelco.com>> wrote:

Currently using PJSIP.  First, they want me to get this working with the 
existing PJSIP configuration, but then setup a second box using chan_sip 
performing similar work.



For PJSIP…

I currently have an endpoint configured to a system using IP based 
authentication.  It is configured with a match setting in the endpoint section.

All channels coming from that IP address go to this endpoint.



They want me to keep this endpoint, but add a new endpoint where we register 
with them.



Existing…

[transport1]

type = transport

bind = 0.0.0.0

protocol = udp



[1002]

type = aor

remove_existing = yes

contact = sip:1...@xxx.xxx.xxx.xxx



[1002]

type = endpoint

context = mycontext

transport = transport1

accountcode = 6

dtmf_mode = inband

device_state_busy_at = 48

force_rport = no

identify_by = username

from_user = 1002

disallow = all

allow = ulaw

acl = acl1



[identify112]

type = identify

endpoint = 1002

match = 1...@xxx.xxx.xxx.xxx





Check this first...  identify112 probably failed to load because the match 
parameter can only take an ip address

plus an optional netmask, or a hostname.  The '1002@' is invalid.









I setup the registration and the endpoint.



[286]

type = aor

remove_existing = yes

contact = sip:2...@xxx.xxx.xxx.xxx

qualify_frequency = 60



[auth8]

type = auth

username = 286

password = yyy



[286]

type 

Re: [asterisk-users] sip trunk with social media

2018-01-04 Thread Antony Stone
On Thursday 04 January 2018 at 01:27:59, bilal ghayyad wrote:

> Hello
> It will be amazing if possible to do sip trunk with any of social media
> providers like: whatsapp, facebook, imo, viber, ... etc

To the best of my knowledge none of the services you mention either operate 
over SIP or provide SIP connectivity to their systems.

Therefore I agree with you; it would be amazing if this were possible.


Antony.

-- 
This space intentionally has nothing but text explaining why this space has 
nothing but text explaining that this space would otherwise have been left 
blank, and would otherwise have been left blank.

   Please reply to the list;
 please *don't* CC me.

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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