Re: [asterisk-users] pjsip trunking configuration issue

2018-02-08 Thread Richard Mudgett
On Thu, Feb 8, 2018 at 1:53 AM, Kevin Long 
wrote:

>
>
> Greetings !
>
>
> My goal is to get Twilio trunking working, and with TLS/SRTP.
>
> I see this concerning message in my log:
>
> [Feb  7 16:50:26] ERROR[20596] res_sorcery_config.c: Could not create an
> object of type 'endpoint' with id ’twilio' from configuration file
> ‘pjsip.conf’
>
>
>
> Thus, ‘pjsip show endpoints’  does not show the endpoint for the Twilio
> trunk.
>
>
> Hoping for a sanity check of my pjsip.conf file, and what could be causing
> this.
>
> A test call form Twilio’s system hits the PBX (over TLS), but always says
> “No matching endpoint found” in the asterisk log.
>
>
>
> pjsip.conf
>
> [transport-tls]
> type = transport
> protocol = tls
> bind = 0.0.0.0:5061
> cert_file=cert_file
> priv_key_file=key_file
> method=tlsv1
> external_media_address=X.Y.Z.D
> external_signaling_address=X.Y.Z.D
> verify_client=no
> verify_server=no
> allow_reload=yes
>
> [twilio](!)
> type=endpoint
> transport=transport-tls
> context=from-twilio
> disallow=all
> allow=ulaw
> dtmf_mode=inband
> media_encryption=sdes
> rtp_symmetric=yes
> rewrite_contact=yes
> force_rport=yes
> canreinvite=no
>

canreinvite has been replaced by directmedia in chan_sip's config
file for at least a decade.  It has never existed for chan_pjsip.  For
chan_pjsip it is direct_media.


> tlsdontverifyserver=yes
>

>
> [auth-out](!)
> type=auth
> auth_type=userpass
>
> [twilio]
> aors=twilio-aors
>

This section looks like you are trying to actually create the twilo
endpoint but
you need to include the twilo template you defined earlier: [twilo](twilo).
It would
be better if you actually gave the twilo template a different name.


>
> [twilio-aors]
> type=aor
> contact=sips:trunkname.pstn.twilio.com:5061 ;tried with sip: also
>
> [twilio]
> type=identify
> endpoint=twilio
> match=54.172.60.0
> match=54.172.60.1
> match=54.172.60.2
> match=54.172.60.3
>
> [endpoint-basic](!)
> type=endpoint
> transport=transport-tls
> context=from-phones
> disallow=all
> allow=ulaw
>
> [auth-userpass](!)
> type=auth
> auth_type=userpass
>
> [aor-single-reg](!)
> type=aor
> max_contacts=20
>
> [1001](endpoint-basic)
> auth=auth1001
> aors=1001
>
> [auth1001](auth-userpass)
> password=password123
> username=1001
>
> [1001](aor-single-reg)
>
>
> Extensions.conf
>
> [from-twilio]
> exten => _+1NX,1,Dial(PJSIP/1001)
>
> [from-phones]
> exten => _NXXNXX,1,Set(CALLERID(all)="David" <78451234>)
> same => n,Dial(PJSIP/+1${EXTEN}@twilio)
>

You might want to look over config file common syntax [1] and template
usage [2].
You might also want to look over pjsip configuration [3].

Richard

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Configuration+Files
[2] https://wiki.asterisk.org/wiki/display/AST/Templates
[3]
https://wiki.asterisk.org/wiki/display/AST/PJSIP+Configuration+Sections+and+Relationships
-- 
_
-- 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] pjsip trunking configuration issue

2018-02-08 Thread Olivier
@Kevin:
Were such invalid endpoint parameters settings reported on Asterisk CLI ?

My system reported:
Could not find option suitable for category 'asterisk8' named 'foo' at line
15 of /etc/asterisk/pjsip.conf

when I added ( at line 15 of /etc/asterisk/pjsip.conf):
foo=bar

2018-02-08 14:48 GMT+01:00 George Joseph :

>
>
> On Thu, Feb 8, 2018 at 12:53 AM, Kevin Long 
> wrote:
>
>>
>>
>> Greetings !
>>
>>
>> My goal is to get Twilio trunking working, and with TLS/SRTP.
>>
>> I see this concerning message in my log:
>>
>> [Feb  7 16:50:26] ERROR[20596] res_sorcery_config.c: Could not create an
>> object of type 'endpoint' with id ’twilio' from configuration file
>> ‘pjsip.conf’
>>
>>
>>
>> Thus, ‘pjsip show endpoints’  does not show the endpoint for the Twilio
>> trunk.
>>
>>
>> Hoping for a sanity check of my pjsip.conf file, and what could be
>> causing this.
>>
>> A test call form Twilio’s system hits the PBX (over TLS), but always says
>> “No matching endpoint found” in the asterisk log.
>>
>>
>>
>> pjsip.conf
>>
>> [transport-tls]
>> type = transport
>> protocol = tls
>> bind = 0.0.0.0:5061
>> cert_file=cert_file
>> priv_key_file=key_file
>> method=tlsv1
>> external_media_address=X.Y.Z.D
>> external_signaling_address=X.Y.Z.D
>> verify_client=no
>> verify_server=no
>> allow_reload=yes
>>
>> [twilio](!)
>> type=endpoint
>> transport=transport-tls
>> context=from-twilio
>> disallow=all
>> allow=ulaw
>> dtmf_mode=inband
>>
>
> Are you sure you want "inband" and not "rfc4733"?
>
>
>
>> media_encryption=sdes
>> rtp_symmetric=yes
>> rewrite_contact=yes
>> force_rport=yes
>> canreinvite=no
>> tlsdontverifyserver=yes
>>
>
> "canreinvite" and "tlsdontverifyserver" aren't valid endpoint parameters
> which is why the endpoint is failing to load.
>
>
>>
>>
>> [auth-out](!)
>> type=auth
>> auth_type=userpass
>>
>> [twilio]
>> aors=twilio-aors
>>
>> [twilio-aors]
>> type=aor
>> contact=sips:trunkname.pstn.twilio.com:5061 ;tried with sip: also
>>
>> [twilio]
>> type=identify
>> endpoint=twilio
>> match=54.172.60.0
>> match=54.172.60.1
>> match=54.172.60.2
>> match=54.172.60.3
>>
>> [endpoint-basic](!)
>> type=endpoint
>> transport=transport-tls
>> context=from-phones
>> disallow=all
>> allow=ulaw
>>
>> [auth-userpass](!)
>> type=auth
>> auth_type=userpass
>>
>> [aor-single-reg](!)
>> type=aor
>> max_contacts=20
>>
>> [1001](endpoint-basic)
>> auth=auth1001
>> aors=1001
>>
>> [auth1001](auth-userpass)
>> password=password123
>> username=1001
>>
>> [1001](aor-single-reg)
>>
>>
>> Extensions.conf
>>
>> [from-twilio]
>> exten => _+1NX,1,Dial(PJSIP/1001)
>>
>> [from-phones]
>> exten => _NXXNXX,1,Set(CALLERID(all)="David" <78451234>)
>> same => n,Dial(PJSIP/+1${EXTEN}@twilio)
>> --
>> _
>> -- 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
>
>
>
>
> --
> George Joseph
> Digium, Inc. | 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 --
>
> 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
>
-- 
_
-- 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] pjsip trunking configuration issue

2018-02-08 Thread George Joseph
On Thu, Feb 8, 2018 at 12:53 AM, Kevin Long 
wrote:

>
>
> Greetings !
>
>
> My goal is to get Twilio trunking working, and with TLS/SRTP.
>
> I see this concerning message in my log:
>
> [Feb  7 16:50:26] ERROR[20596] res_sorcery_config.c: Could not create an
> object of type 'endpoint' with id ’twilio' from configuration file
> ‘pjsip.conf’
>
>
>
> Thus, ‘pjsip show endpoints’  does not show the endpoint for the Twilio
> trunk.
>
>
> Hoping for a sanity check of my pjsip.conf file, and what could be causing
> this.
>
> A test call form Twilio’s system hits the PBX (over TLS), but always says
> “No matching endpoint found” in the asterisk log.
>
>
>
> pjsip.conf
>
> [transport-tls]
> type = transport
> protocol = tls
> bind = 0.0.0.0:5061
> cert_file=cert_file
> priv_key_file=key_file
> method=tlsv1
> external_media_address=X.Y.Z.D
> external_signaling_address=X.Y.Z.D
> verify_client=no
> verify_server=no
> allow_reload=yes
>
> [twilio](!)
> type=endpoint
> transport=transport-tls
> context=from-twilio
> disallow=all
> allow=ulaw
> dtmf_mode=inband
>

Are you sure you want "inband" and not "rfc4733"?



> media_encryption=sdes
> rtp_symmetric=yes
> rewrite_contact=yes
> force_rport=yes
> canreinvite=no
> tlsdontverifyserver=yes
>

"canreinvite" and "tlsdontverifyserver" aren't valid endpoint parameters
which is why the endpoint is failing to load.


>
>
> [auth-out](!)
> type=auth
> auth_type=userpass
>
> [twilio]
> aors=twilio-aors
>
> [twilio-aors]
> type=aor
> contact=sips:trunkname.pstn.twilio.com:5061 ;tried with sip: also
>
> [twilio]
> type=identify
> endpoint=twilio
> match=54.172.60.0
> match=54.172.60.1
> match=54.172.60.2
> match=54.172.60.3
>
> [endpoint-basic](!)
> type=endpoint
> transport=transport-tls
> context=from-phones
> disallow=all
> allow=ulaw
>
> [auth-userpass](!)
> type=auth
> auth_type=userpass
>
> [aor-single-reg](!)
> type=aor
> max_contacts=20
>
> [1001](endpoint-basic)
> auth=auth1001
> aors=1001
>
> [auth1001](auth-userpass)
> password=password123
> username=1001
>
> [1001](aor-single-reg)
>
>
> Extensions.conf
>
> [from-twilio]
> exten => _+1NX,1,Dial(PJSIP/1001)
>
> [from-phones]
> exten => _NXXNXX,1,Set(CALLERID(all)="David" <78451234>)
> same => n,Dial(PJSIP/+1${EXTEN}@twilio)
> --
> _
> -- 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




-- 
George Joseph
Digium, Inc. | 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 --

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] Features.conf and variable length DTMF sequences

2018-02-08 Thread Olivier
Hello,

I have an Asterisk 13-enabled system.

1. Using features.conf application map (or something else), is it possible
to define a single map matching several DTMF sequences, such as in the
imaginary example bellow ?

features.conf:
foobar => _*123.,peer,Gosub,"foobar,s,1"

_*123. would match DTMF sequences *1234 or *12345 or anything starting with
*123



2. I used the mapping bellow:
foobar => *123,peer,Gosub,"foobar,s,1"

In my diaplan, I edited something like:

[foobar]
exten = s,1,Read(FOO,silence/1)
same = n,Noop(FOO is ${FOO})


When I originate a call (with "channel originate Local/1@test/n" or
"channel originate Local/1@test") to an other Asterisk box which sends a
*123ww456 DTMF sequence, I can see that:
- the DTMF is coming in,
- its *123 prefix is recognized and triggers my foobar routine (see above)
- application Read is executed,
- next DTMF digits are coming in but are not read by Read application as if
I was reading on one channel and digits were coming in an other channel.

Any help on this ?


Best regards
-- 
_
-- 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