Re: [asterisk-users] Is there any way to pass caller id to cell phone?

2018-10-16 Thread Daniel Tryba
On Thu, Oct 11, 2018 at 05:18:24PM +, Ivan Demkovitch wrote:
> Where problem comes in - if person not at the desk - his cell phone shows 
> call from OFFICE number and there is no way to tell who is really calling.
> We use Callcentric as a trunk if it makes any difference.
> I'd like to add info about caller when passing to cell phone if possible. Is 
> there any way to do that?

Maybe you should ask them how to do this! Maybe you should add a
Diversion header, maybe they don't allow this kind of spoofing at all.
This is a common request from users of SIP trunks and your use case is
legit. If Callcentric does checks on callerid validity and there is a
call to a customer with callerid X, they should be able to use this
callerid X when forwarding to an external device/number.


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

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

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] Disabling a trunk at runtime

2018-10-16 Thread Daniel Tryba
On Fri, Oct 12, 2018 at 07:59:52AM -0400, Telium Support Group wrote:
> I have an Asterisk system with 2 trunks (as shown below).  I need to be able
> to disable a trunk at runtime. I may not change the dialplan but I can
> change sip.conf and reload.
> 
> Any attempt to dial in the dialplan uses trunk A and trunk B in that order.
> Normally calls will route through trunk A, but if I disable A I want calls
> to go to trunk B.
> 
> Is there a creative way to effectively disable a trunk at runtime given
> these parameters?  I don't think there is an "enabled" key-value pair for
> sip.conf stanzas.  If I change the host key value to 0.0.0.0 and reload will
> that effectively cause the dialplan to use trunk B?
[snip]

TIMTOWTDI:

- You can create a dialplan that checks a global variable whether to skip
  trunk A. You can manipulate this variable from the AMI.

- Use an AGI script to set variables or dial trunks directly.

- use a script to generate configuration (included files) and reload the
  channel driver on changes.

- Do (no)sql queries from the dialplan.

- And probably lots more of possibilities.

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

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

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] 401 unauthorized

2018-08-29 Thread Daniel Tryba
On Wed, Aug 29, 2018 at 11:37:34AM -0400, Jerry Geis wrote:
> I have a connection to a cisco all manager SIP trunk. The first call coming
> across CCM to the asterisk server works fine... Then when I do a second
> call from CCM to asterisk  I am getting a SIP 401 unauthorized.
> 
> My definition is simple.
> [CCM]
[no secret]
> 
> This is asterisk 13.19.0
> 
> What is wrong? Thanks

The reason why the CM is asking for authentication is outside the scope
of asterisk, debug the CM. Since you have no secret set for the user,
asterisk will never try to respond to a challenge. Asterisk and CM can
work together, asterisk is very forgiving, CM is not. The last time I
had to figure out what the fromuser and fromdomain should be (the CM admins
were clueless about providing those facts) and there was some
throtteling mechanism that when triggered would deny any SIP messages.

Good luck.

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

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

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 redirect_method=uri_core and header modifications

2018-08-06 Thread Daniel Tryba
On Fri, Aug 03, 2018 at 04:24:06PM +0200, Daniel Tryba wrote:
> redirect_method=uri_pjsip works as expected with regard to the header
> manipulation stuff.
> 
> Also I can't remember why, in the past, I decided to not use uri_pjsip
> other than having the redirected host in CDRs with uri_core and the
> original with uri_pjsip (which I don't really care about).

I found that out after going live with uri_pjsip:
the domain in the to header with uri_pjsip is the hostname/ip of the
redirector. With uri_core the domain will be the hostname/ip of the
contact header in the 302 response.

Reading the redirect_method description (version 13):
"If this option is set to uri_core the target URI is returned to the
dialing application which dials it using the PJSIP channel driver and
endpoint originally used. If this option is set to uri_pjsip the
redirect occurs within chan_pjsip itself and is not exposed to the core
at all."

The wording for uri_core is that the original endpoint context will be
used, that would make changing the to domain a bug IMHO. But since I
need this behavior it is a nice feature.



signature.asc
Description: PGP signature
-- 
_
-- 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 redirect_method=uri_core and header modifications

2018-08-03 Thread Daniel Tryba
On Thu, Aug 02, 2018 at 05:29:23PM +0200, Daniel Tryba wrote:
> With chan_sip there is the variable SIP_MAX_FORWARDS to set
> Max-Forwards. This counter is persistant after a redirect. I can't find
> the equivalent for PJSIP, so I went the way of header manipulation. Only
> to find out that any headers added to the outbound leg are lost after a
> redirect (with redirect_method=uri_core (didn't try any other since in
> the past they didn't work for me)).

redirect_method=uri_pjsip works as expected with regard to the header
manipulation stuff.

Also I can't remember why, in the past, I decided to not use uri_pjsip
other than having the redirected host in CDRs with uri_core and the
original with uri_pjsip (which I don't really care about).

I still think header manipulation should work with uri_core though.


signature.asc
Description: PGP signature
-- 
_
-- 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] 400 reply to INVITE not properly treated

2018-08-02 Thread Daniel Tryba
On Thu, Aug 02, 2018 at 02:40:48PM +1000, Patrick Wakano wrote:
> In my opinion, Asterisk should at fail the Dial and proceed with whatever
> was configured in the dialplan I tried some other 4XX SIP codes, but
> the only one I found not behaving properly is the 400 one

I think you are right, any 4xx is a final response. The call has failed at
this moment (unless there are other branches). You should file a bug report
IMHO.

https://tools.ietf.org/html/rfc3261#section-13.2.2.3
   A single non-2xx final response may be received for the INVITE.  4xx,
   5xx and 6xx responses may contain a Contact header field value
   indicating the location where additional information about the error
   can be found.  Subsequent final responses (which would only arrive
   under error conditions) MUST be ignored.

   All early dialogs are considered terminated upon reception of the
   non-2xx final response.

   After having received the non-2xx final response the UAC core
   considers the INVITE transaction completed.  The INVITE client
   transaction handles the generation of ACKs for the response (see
   Section 17).


signature.asc
Description: PGP signature
-- 
_
-- 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 redirect_method=uri_core and header modifications

2018-08-02 Thread Daniel Tryba
On Thu, Aug 02, 2018 at 05:29:23PM +0200, Daniel Tryba wrote:
> With chan_sip there is the variable SIP_MAX_FORWARDS to set
> Max-Forwards. This counter is persistant after a redirect. I can't find
> the equivalent for PJSIP, so I went the way of header manipulation. Only
> to find out that any headers added to the outbound leg are lost after a
> redirect (with redirect_method=uri_core (didn't try any other since in
> the past they didn't work for me)).
> 
> Am I missing something? Or is this a PJSIP feature?

Forgot to mention this is tested on Debian/stable its Asterisk:
13.14.1~dfsg-2+deb9u3 (so 13.14.x with some fixes).


signature.asc
Description: PGP signature
-- 
_
-- 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] PJSIP redirect_method=uri_core and header modifications

2018-08-02 Thread Daniel Tryba
With chan_sip there is the variable SIP_MAX_FORWARDS to set
Max-Forwards. This counter is persistant after a redirect. I can't find
the equivalent for PJSIP, so I went the way of header manipulation. Only
to find out that any headers added to the outbound leg are lost after a
redirect (with redirect_method=uri_core (didn't try any other since in
the past they didn't work for me)).

Am I missing something? Or is this a PJSIP feature?

chan_sip example:

[macro-maxforwards]
exten => s,1,NoOp()
exten => s,n,Set(mf=${SIP_HEADER(Max-Forwards)})
exten => s,n,Set(mf=$[ ${mf} - 1 ])
exten => s,n,ExecIf($[ ${mf} < 1 ]?Hangup(19))
exten => s,n,Set(__SIP_MAX_FORWARDS=${mf})
exten => s,n,SipAddHeader(X-Foo: bar)
exten => s,n,MacroExit()

[route]
...
exten => _+.,n,Macro(maxforwards)
exten => _+.,n,Dial(SIP/${EXTEN}@redirector)

An incomig INVITE will look like:

> INVITE sip:+number@asterisk;user=phone SIP/2.0
> Max-Forwards: 70

To the redirector:

> INVITE sip:+number@asterisk;user=phone SIP/2.0
> Max-Forwards: 69
> X-Foo: bar

< SIP/2.0 302 Redirect
< Contact: 

To somewhereelse:

> INVITE sip:+number@somewhereelse;user=phone SIP/2.0
> Max-Forwards: 69
> X-Foo: bar


PJSIP example (where the add strangely overrides the default
Max-Forwards: 70).

[setoutgoinglegvars]
exten => add,1,Set(PJSIP_HEADER(add,Max-Forwards)=60)
exten => add,1,Set(PJSIP_HEADER(add,X-Foo)=bar)
exten => add,n,Return()

[route]
...
exten => _+.,n,Macro(maxforwards)
exten => _+.,n,Dial(PJSIP/${EXTEN}@redirector,,b(setoutgoinglegvars,add,1))

> INVITE sip:+number@asterisk;user=phone SIP/2.0
> Max-Forwards: 70

To the redirector:

> INVITE sip:+number@asterisk;user=phone SIP/2.0
> Max-Forwards: 60
> X-Foo: bar

< SIP/2.0 302 Redirect
< Contact: 

To somewhereelse:

> INVITE sip:+number@somewhereelse;user=phone SIP/2.0
> Max-Forwards: 70



signature.asc
Description: PGP signature
-- 
_
-- 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] Do you set chan_sip's ignoresdpversion to true ?

2018-06-25 Thread Daniel Tryba
On Tue, Jun 19, 2018 at 07:38:12PM +0200, Olivier wrote:
> I've just discovered chan_sip's ignoresdpversion setting.
> Do you use it ?
> If positive which kinnd of issue could you solve with it ?

IIRC I used to enable this option when talking to some Ericsson SBC.  It
solved a problem concerning an on-hold scenario where the sess-version
wasn't getting incremented (by the Ericsson) even though SDP changed.
Asterisk would igore the re-INVITE without ignoresdpversion.

Today I use PJSIP with that SBC and I totally forgot this setting till
now, either the Ericsson was fixed/replaced or PJSIP handles the
scenario differently.


-- 
_
-- 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] How to ignore REFER entirely with chan_sip or PJSIP ?

2018-06-16 Thread Daniel Tryba
On Fri, Jun 15, 2018 at 05:32:30PM +0200, Olivier wrote:
> In my testing, I saw that Asterisk always included a REFER value in each
> INVITE's Allow header, no matter how allowtransfer/allow_tranfer was set.
> 
> Is there a way to remove this REFER value entirely either globally or
> specifically for a given peer/endpoint ?

No, not with asterisk itself.

> Which telephony feature would loose without REFER method ?

AFAIK none except the ability to REFER (obviously).

What you can do is:
-route calls via a proxy that gives you the ability to modify SIP on
the fly (e.g. kamailio)
-wihh chan_sip use disallowed_methods (= REFER)
-with pjsip reject a REFER in the dialplan:
 https://wiki.asterisk.org/wiki/display/AST/res_pjsip+Remote+Attended+Transfers

The last 2 options will make PBXs/endpoints that use REFERs, since
asterisk is advertising it, fail in certain scenarios. So cleanest is
the first option, which will take some work redesigning your setup but
might be a good thing on the long run.



-- 
_
-- 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] Questions about SIP From, P-Asserted-Id fields and Diversion headers ?

2018-06-05 Thread Daniel Tryba
On Tue, Jun 05, 2018 at 11:34:51AM +0200, Olivier wrote:
> 1.According SIP RFCs, is possible/recommended to have different values in
> From and P-Asserted-Id fields ?
> For instance, From field showing 123456789 and P-Asserted-Id showing
> 987654321 (beside privacy considerations) ?

Yes, most obviuos need for PAI is a call where anonimity is desired by
caller. Set the From to anonymous@anonymous.invalid and PAI to a real
user if the destination is trusted, any proxy that handles this message
that doesn't trust a destination will strip PAI thus ensuring privacy.
 
> 2. When Bob forwards to Cory a call coming from Alice, would expect
> Diversion/History-Info header to include Alice's number ?

No, diversion/history should contain Bob.

-- 
_
-- 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] Long extensions that contain dashes

2018-05-31 Thread Daniel Tryba
On Tue, May 29, 2018 at 08:32:39PM -0700, David P wrote:
> We would like to use 20-char extension values that use dashes and alphanums
> after the first four digits. In order to handle these via pattern-matching,
> how can I define a pattern that allows dashes? There seems to be no option
> at http://the-asterisk-book.com/1.6/einleitung-regex.html#re
> gular-expression-syntax However, when I try a period, it seems to match the
> long suffix including the dashes. I want to know whether to depend on this
> continuing to work.

You should read some more up to date documentation I guess.
https://wiki.asterisk.org/wiki/display/AST/Pattern+Matching
mentions the significance of - in a character class and the way to
escape. I'm to lazy to try this myself, but in any regexp parser I ever
used a litteral - in a charclass is defined by simply putting it as the
last character in the class (but above url leads me to think this
doesn't work in asterisk): 

[0-9] matches 0,1,2,3,4,5,6,7,8 and 9
[09-] matchers 0,9 and -
 
> Also, we're not sure whether our automated members can handle extensions
> longer than 4 digits. I'd like to pass a substring of our
> extension/destination_number in the call to Queue(). I couldn't find
> documention of any Queue() option like this. Is it possible to control the
> extension that the member receives?

You are looking to modify the callerid? e.g.:
Set(CALLERID(num)=${CALLERID(num):4})

-- 
_
-- 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] Decoding SIP register hack

2018-05-17 Thread Daniel Tryba
On Thu, May 17, 2018 at 12:27:17PM -0400, sean darcy wrote:
> > WARNING.* .*: fail2ban=''
> >
> ># Option:  ignoreregex
> ># Notes.:  regex to ignore. If this regex matches, the line is ignored.
> ># Values:  TEXT
> >#
> >ignoreregex =
> >
> >
> Thanks. Very useful as a tutorial for fail2ban.
> 
> But I don't think it covers this SIP hack. This guy isn't trying to
> register.

His filter doesn't only trigger on REGISTERs, see the last line of the
matches and the context for guests (which logs the pattern of the last
line of the filter on an INVITE).

>  That why I find it puzzling. What is he trying to do ?

There are sip servers publicly reachable that will relay INVITEs, make
sure yours aren't. And there are only 2 kinds of operators of sip
server:
-those that have been the victim of toll fraud
-those that will be the victim of toll fraud

You can do nothing to stop this kind of traffic. The only thing you can
do is block it, either using only a whitelist (cumbersome) or generate a
blacklist with for example fail2ban or a more elaborate honeypot setup.
Or setup a proxy that will filter patterns you discover from 

BTW this is not a person, this is an automated script, running most
likely on compromised machines and sending spoofed ips. These scripts
care about generating a ring on a phone (again most an abuseable/hacked
account (or purchased with CC fraud)). If they find a server that does,
it will be targetted for all kind of fraud.

-- 
_
-- 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] When should a Progress or Ringing be used in a today's telephony ?

2018-05-16 Thread Daniel Tryba
On Wed, May 16, 2018 at 04:51:49PM +0200, Olivier wrote:
> 1. When Asterisk receives a SIP call coming from PSTN, is there a time
> frame within which Asterisk must reply something to keep caller from
> canceling the call ? Where does this limit come from ? From SIP RFC ? From
> local regulation bodies ?
> 
> 2. Which SIP signal is required to stop call cancellation in the previous
> case ?

See RFC 3261, 17.1.1. A (provisional) response to an INVITE is required
within a timelimit. After a provisional response a non-provisional
response is required. Defaults are on page 264 of the RFC (first to
last).
 
> 3. When Asterisk receives a call, either from PSTN or from a SIP phone) it
> cannot process (unkown callee, whatever reason, ...), should you stop
> processing with Hangup or Congestion ?
> Hangup application allow for exit code customization, if I'm not mistaken,
> but  Congestion exists for a reason.

With regard to PSTN calls the signalig is limited, but to a SIP device
you could signal usefull information, eg: unknown, temp. unavailable.
Why not give a usefull reason instead of Congestion

> 4. Is it a good practise to send a 180/183 when you don't get one ?

People will complain if there is no indication, so yes IMHO.

> 5. I observed I sometimes got  a 100 Trying then a 183 session Progress
> when outcalling some (mobile) phones while simpy getting 100 Trying when
> some other (mobile) phone through the same carrier (most probably, end
> devices were not managed by the same (mobile) telephony provider).
> What explains such difference ?

An explanation could be packet loss. But there are no requirements for
1xx responses to an INVITE. Maybe they just don't care about feedback to
callers.


-- 
_
-- 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] Streaming MoH from iHeart radio?

2018-05-16 Thread Daniel Tryba
On Wed, May 16, 2018 at 11:01:53AM -0400, Mike Diehl wrote:
> I have a user who would like to stream their favorite radio station from
> iHeart radio for their music on hold.
> 
> It this TECHNICALLY possible?

Yes.

> If so, any pointers would be appreciated.

https://www.voip-info.org/asterisk-config-musiconholdconf/#Exampleusingicecastampshoutcaststreams
 

-- 
_
-- 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] SIP Codec negotiation

2018-05-10 Thread Daniel Tryba
On Thu, May 10, 2018 at 11:44:14AM -0700, Steve Edwards wrote:
> I receive an INVITE/SDP containing:
> 
>   m=audio 11310 RTP/AVP 3 0 101
> 
> which I interpret as gsm, ulaw, rfc2833.
> 
> and I reply with an OK/SDP containing:
> 
>   m=audio 15884 RTP/AVP 0 3 101
> 
> which I interpret as ulaw, gsm, rfc2833.
> 
> How can I tell which codec was actually used for the call?

AFAIK this is undetermined. The callee can send either ulaw or gsm,
unless the caller wants to narrow it down to 1 codec, see
https://tools.ietf.org/html/rfc4317#section-2.2

Most of the time the callee will pick the first (so in this case ulaw).
But there are media gateways out there that choose g711[au] above "more
complex" codecs regardless order in SDP. My prefer PSTN provider will
always prefer alaw if offered since that will prevent transcoding on
their side if the call goes to ISDN/POTS, but AMR if the call goes to
VoLTE.


-- 
_
-- 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] multi step auth?

2018-05-09 Thread Daniel Tryba
On Tue, May 08, 2018 at 03:04:55PM -0500, Jeff LaCoursiere wrote:
> Thats till doesn't change the SIP header.?? Basically they want to send a RE
> INVITE and authenticate my DID number.?? But my DID number does not have a
> peer or user entry in sip.conf.?? Perhaps I am answering my own question,
> but is that the only way this is going to work?

Maybe you should post their requirments (instead of your rephrasing of
them). Do they actually want to have different from/to and contact(!) in
one SIP dialog? But AFAIK you don't have such control in Asterisk, you
can only influence the original INVITE and than have Asterisk respond
to a auth challenge, which you can influence with defaultuser according
to sip.conf.

So experiment with something like
[user]
fromuser=thenumber
defaultuser=theusername
remotesecret=thepassword

and see what the fromuser in request is and what the authentication user
in the Authorization header is in step 3, according to sip.conf remarks
it should be:

From: 
To:
Authorization: Digest username="defaultuser"


-- 
_
-- 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] Pass through registration / proxy

2018-04-11 Thread Daniel Tryba
On Wed, Apr 11, 2018 at 12:04:18PM -0400, Telium Technical Support wrote:
> Maybe proxy is the wrong word I chose.  Asterisk is something like a peer to
> the legacy PBX.  I thought about setting up individual SIP accounts on the
> Asterisk box to connect to the legacy PBX, or maybe a SIP trunk to the
> legacy PBX (assuming it can route calls through the SIP trunk to a peer to
> reach a phone).  The legacy PBX is a Nortel in case that matters.
> 
> I'm supposed to figure this out and present options but having trouble
> figuring out if Asterisk would be a peer, or pretend to be many sip agents
> registering on the legacy Sip pbx, etc.  I think I'm stuck at the conceptual
> level.  (Still a beginner in training - but having fun learning Asterisk)

One of my first integrations was similar but with a Siemens. Easiest
might be a SIP trunk (peer) between Asterisk/Nortel and have different
prefixes for the Norted (1xx) and Asterisk (2xx) and route these to the
other. The SIP endpoints simply register to Asterisk.


-- 
_
-- 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] Pass through registration / proxy

2018-04-11 Thread Daniel Tryba
On Tue, Apr 10, 2018 at 09:22:02PM -0400, Telium Technical Support wrote:
> I need to create a SIP proxy to be placed in front of a legacy PBX.  When a
> phone registers with the proxy, I would like Asterisk to register with the
> PBX behind it.  (To tell the PBX to send calls to the proxy and then to the
> SIP phone).
> 
> Can I use Asterisk to create a proxy like this?  Is there a way to cause the
> Asterisk to register with another host when it receives a successfully
> registration?

You can, but maybe you should use a sip proxy (like kamailio) for this
task instead of a back to back user agent like asterisk.

You can listen to events triggered on registration to asterisk and with
realtime intergration add the register to the PBX (or manipulate
sip.conf). This still might be easier to implement compared to (for
example) kamailio if you are new to that.

-- 
_
-- 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 CallerID Question

2018-04-07 Thread Daniel Tryba
On Fri, Apr 06, 2018 at 02:27:31PM -0500, Brent Davidson wrote:
> I have multiple Asterisk instances set up in different locations and would
> like to modify the callerID of inbound calls to identify which instance the
> call is coming from.  I knew how to do that with the old sip format, but
> can't seem to figure it out with PJSip.

So how did you do that?
 
> Currently Location A, extension 10 calls Location B, extension 20.  CallerID
> on Extension 20 displays "10" for the callerID.
> 
> The Desired configuration is for Extension 20 to show "Locati0n B - 10" on
> the caller ID.  I don't want to modify the caller ID for each individual
> extension as I want the intra-location caller IDs to show just the extension
> number.  (e.g. LocA/Ext. 10 calls LocA/Ext11 - LocA/Ext11's CallerID
> displays "10", but LocA/Ext10 calling LocB/Ext20 displays "Location A - 10"
> for caller ID.

You examples contradict.
 
> Rather than routing these to the "internal" context, should I create another
> context and somehow parse/manipulate the caller ID in there then route to
> "internal" ?

TIMTOWTDI, but I'd choose to set the CALLERID(name) on the sending side
dialplan (where it routes calls to external extensions).

-- 
_
-- 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] Setting outgoing CALLERID without changing CDR(src)

2018-03-29 Thread Daniel Tryba
On Wed, Mar 28, 2018 at 08:16:26PM -0600, Carlos Chavez wrote:
> ?? I thought I had found and answer to this question by using
> CALLERID(ani) but it seems that only works on versions prior to 12.?? On
> Asterisk 13 setting CALLERID(num) before dialing to an external trunk always
> changes CDR(src) to the number you set and the original extension number
> that dialed is lost.?? How are you handling this??? Am I forced to use a
> custom field to keep the original caller number??? My billing software uses
> the src field to get the extension that dialed the call.?? Any tips?

What does your external trunk use as sources for callerID? For example
if your provider supports PAI and sets this headers as callerID, your
problem is solved. Otherwise you could for example use the custom csv
output and set a custom CDR field (that stores the original src) in the
place of src.

-- 
_
-- 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 100 trying mandatory? Can asterisk answer with 180 without prior 100 trying?

2018-03-20 Thread Daniel Tryba
On Mon, Mar 19, 2018 at 12:59:47PM -0300, Joshua Colp wrote:
> > To try to reproduce the problem with our SBC, is there a way to tell
> > the asterisk, preferably PJSIP, to directly answer with 180 ringing
> > without prior 100 trying?
> 
> The PJSIP channel driver has no option or ability to do this. I do not recall 
> if chan_sip does.

A (very) dirty workaround would be to drop these packets with iptables
(assuming Linux as OS), something like:

iptables -t raw -I OUTPUT -p udp -d ipaddrofpbx -m string --algo bm  --from 0 
--to 32 --string "SIP/2.0 100 " -j DROP

Don't try it with TCP :)


-- 
_
-- 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] Avaya 9608G and DHCP and TFTP and HTTP oh my

2018-03-07 Thread Daniel Tryba
On Wed, Mar 07, 2018 at 10:08:52PM +, Thomas Peters wrote:
> You did indeed warn me. I've made progress, gotten the dhcp option 242 to 
> work, and finally gotten the phone to the point where it asks for a username 
> and password. I defined these on the Asterisk server. I entered them on the 
> phone. It says "Acquiring Service" and sits there.  At least it sets the 
> clock on the phone now. 
> 
> TCPDump shows traffic going back & forth every few seconds: 
> 10.1.138.245.13602 > ad-apbx.mcts.org.sip
> ad-apbx.mcts.org.sip > 10.1.138.245.60206
> 10.1.138.245.30360 > ad-apbx.mcts.org.sip:
> 
> But it sits at Acquiring Service eternally. 
> 
> The username and password I am entering are the Asterisk extension and 
> asterisk extension secret. Should these be entered somewhere in the craft 
> menu instead?

My 9608 has no password/secret in asterisk, could be due to some
problem like you are encountering. Also these phones only work with SIP
over TCP.

sip.conf for my 9608:

[a204]
type=friend
context=204
defaultuser=204
host=dynamic
qualify=yes
nat=yes
disallow=all
allow=alaw
dtmfmode=rfc2833
canreinvite=no
transport=tcp,udp


-- 
_
-- 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] Avaya 9608G and DHCP and TFTP and HTTP oh my

2018-03-07 Thread Daniel Tryba
On Tue, Mar 06, 2018 at 05:36:04PM +, Thomas Peters wrote:
> But please don't tell me the only way to program up each phone is via
> the craft interface?
> 
> Every other phone I've ever used requires a configuration file, which
> has the MAC address of the phone as its name. The Avaya phones must
> have some other method. Unless I have to embed the mac address and
> particulars for all the phones into the 46xxsettings.txt file??

I tried to warn you, didn't I? :)

The phones themselves are nice, when used with an Avaya PBX. What I have
seen is that these phones are really dumb themselves and need a decent
PBX that does the smartstuff via proprietary interfaces (H.232
gatekeeper like IPOffice or whatever they use with the SIP based
Communication Manager)

There is some intelligence in parsing the 46xxsettings file, but AFAIK
you need the CRAFT menu to do this (apart from MAC adresses).

My advise: sell these phones, any SIP device you can buy with the
proceeds is more intelligent when used with Asterisk.

-- 
_
-- 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] Half Off Topic Questions

2018-03-06 Thread Daniel Tryba
On Tue, Mar 06, 2018 at 09:05:25AM +0100, Markus Weiler wrote:
> we're just wondering, in German we call the different types of phone-numbers 
> (Geographic,mobile,national,VoIP...)
> Rufnummerngassen (phone number alleys ;-) )  
> Is there an english word for this? 

I'd call it something like "breakout type", but a more literal
"extension (type) path" might also convey the idea.

-- 
_
-- 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] Avaya 9608G and DHCP and TFTP and HTTP oh my

2018-03-01 Thread Daniel Tryba
On Thu, Mar 01, 2018 at 02:46:31PM +, Thomas Peters wrote:
> Right-- I've seen the Avaya document you cite below. It says "To
> administer DHCP option 242, make a copy of an existing option 176" but
> I don't have any example of option 176 or 242 to copy, and don't know
> what to do to /etc/dhcpd.conf to make it offer option 242. 
> 
> Then there's this long table of parameters to use with (presumably)
> option 242.
> 
> I was hoping someone had a working minimal example of a dhcp option
> 242 config I could copy and modify.

Example for our old IP Office (192.168.250.1)  setup:

option option-242 code 242 = string;

subnet 10.0.0.0 netmask 255.255.0.0 {
   #option option-242 "L2Q=1,L2QVLAN=4";
   #option option-242 "HTTPSRVR=10.1.2.3/files";
   option option-242 "MCIPADD=192.168.250.1,MCPORT=1719,HTTPSRVR=192.168.250.1";
}


My guess is you only need HTTPSRVR=hostname/path 
This should point to a dir where a 46xxsettings.txt exists.
Must contain something like:


SET SIPPROXYSRVR 172.16.0.2
SET SIPPORT  5060
SET SIPDOMAIN 172.16.0.2
SET SIPREGISTRAR 172.16.0.2
SET SIP_CONTROLLER_LIST 172.16.0.2:5060;transport=tcp 
SET ENABLE_AVAYA_ENVIRONMENT 0 
SET CONFIG_SERVER_SECURE_MODE 0
SET SIPSIGNAL 0
SET REGISTERWAIT 900

SET CLDISPCONTENT 0
SET DISPLAY_NAME_NUMBER 3

SET DIALPLAN 2xx|0[1-7]|08[458]xxx
SET PHNNUMOFSA 2
SET GMTOFFSET 1:00
SET DSTOFFSET 1
SET DSTSTART LSunMar2L
SET DSTSTOP LSunOct2L

SET BRANDING_VOLUME 1
SET AGCHAND 0
SET AGCHEAD 0
SET AGCSPKR 0
SET DATETIMEFORMAT 2
SET TIMEFORMAT 1
SET SNTPSRVR 109.235.32.103,109.235.32.119
SET ENTRYNAME 0

SET PHNOL


 
> They only have minimal function? No speed dials, BLFs, etc? 

Not as fas as I know. I configured this in 2013 and at that time only
call/transfer and conference worked.


-- 
_
-- 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] Avaya 9608G and DHCP and TFTP and HTTP oh my

2018-03-01 Thread Daniel Tryba
On Wed, Feb 28, 2018 at 08:48:38PM +, Thomas Peters wrote:
> I'd like to start configuring my Avaya 9608G phones for use on
> Asterisk / FreePBX / PBX-In-a-Flash. I'm using a variety of other
> phones on my system without major issues.
> 
> I've read the discussion back in March, May and August of 2016, but
> unfortunately, my difficulty is much more basic. I think it has to do
> with DHCP, specifically, what options I'm offering the phone via DHCP.

So you might want to start without configurations from DHCP. Enter the
file/http server in the phone manually and point it to a http server
containing the needed firmware files and a correct 46xxsettings.txt for
you asterisk.

Avaya uses other dhcp options for these phone (242):
https://downloads.avaya.com/elmodocs2/one-X_Deskphone_Edition/R1.5/output/16_300698_4/admn054.html

BTW these phones are a terrible waste when used with Asterisk. They only
provided minimal functionality (calls and transfer).

-- 
_
-- 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] asterisk mysql contacts

2018-01-17 Thread Daniel Tryba
On Wed, Jan 17, 2018 at 03:16:04PM +0200, Atux Atux wrote:
[asterisk dialplan mysql]
> I would like to ask if there is a way to implement this easily in my
> dialplan, please.

The answer is: yes

If you'd search for "asterisk dialplan mysql", you'get something like
https://www.voip-info.org/wiki/view/Asterisk+cmd+MYSQL

You might want to look into AGI plus your favorite scriptinglanguage
though.

-- 
_
-- 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] remote Asterisk console

2018-01-17 Thread Daniel Tryba
On Tue, Jan 16, 2018 at 06:19:30PM +0100, Paul Neuwirth wrote:
> Thank you both. That was (most likely) what I was looking for - but
> still some worries about sending plaintext passwords...

The AMI interface can use a Challenge-Response mechanisme for logins,
if you are this concerned you should use this even over TLS/SSL/SSH.


-- 
_
-- 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] Digium G100 and CID Dropping First Digit.

2018-01-15 Thread Daniel Tryba
On Mon, Jan 15, 2018 at 10:41:27PM +, David Klaverstyn wrote:
> port1 < Calling Number (len=12) [ Ext: 0  TON: National Number (2)  NPI: 
> ISDN/Telephony Numbering Plan (E.164/E.163) (1)
> port1 <   Presentation: Presentation allowed of 
> network provided number (3)  '21xx' ]
> port1 < [70 0a c1 30 34 39 31 34 31 32 31 34]
> port1 < Called Number (len=12) [ Ext: 1  TON: Subscriber Number (4)  NPI: 
> ISDN/Telephony Numbering Plan (E.164/E.163) (1)  '049xx' ]
> 
> -- Accepting call from '21xx' to '049xx' on channel 0/5, span 1

Don't know anything about the card you are using, but seeing ISDN
signaling that the type of number (TON) is national and that means
overhere that leading zeros are stripped, I see nothing wrong with it.
Looking at my old chan_dadhi configs there are options to prefix
something based on TON. So over here I have configured:
nationalprefix = 0
to prefix the leading 0 for national numbers that callees expect.
The G100 manual contains the phrase "national prefix", but no info about
it, so look into those prefix options.

-- 
_
-- 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] Can't install package asterisk-dbgsym on Stretch

2017-12-10 Thread Daniel Tryba
On Fri, Dec 08, 2017 at 06:11:47PM +0100, Olivier wrote:
> 1. Is this a bug in debian-debug repo ? If positive, should I file a bug
> report ?
> 
> 2. Is correct to understand that to get DONT_OPTIMZE, BETTER_BACKTRACE and
> so on options compiled in, I must recompile anyway ?

As far as I know the deb debug package just contains debugging symbols
(before these are stripped), you still need the normal asterisk packages
with the binaries. The last time I tried to debug with these packages it
was a waste of time since your not running a version with debugging
options. These debug packages show some extra info in gdb traces, but
lots of important stuff is still optimized away. 

If you need to debug install the source package and compile from there.
You might want to figure out how to manipulate the deb build rules to
include wanted flags, shouldn't be to hard but it has been a few years
for myself.


-- 
_
-- 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] Gerrit usage?

2017-10-02 Thread Daniel Tryba
On Fri, Sep 29, 2017 at 12:27:53PM -0300, Joshua Colp wrote:
> > "git checkout -b 13" appears to fix this.
> 
> This did not create a branch from 13. This created a branch named "13"
> from the branch you were on, which was most likely master. That is why
> your "git review" is not working as you expect, because you are telling
> it that you did the work against "13" but it really was against master.
> 
> git checkout -b 13 origin/13
> 
> Would create a local branch "13" which is from the remote branch "13".
> You'll need to do this, or do your "git review" against master and then
> cherry pick from inside Gerrit to the appropriate branches.

Thank you for your near instant feedback, this fixed my problem and I
was able to submit code for a review.



-- 
_
-- 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] Gerrit usage?

2017-09-29 Thread Daniel Tryba
I'm trying to figure out how to commit some code for review. Following:
https://wiki.asterisk.org/wiki/display/AST/Gerrit+Usage

Created a ssh alias.
Cloned using: "git clone ssh://asterisk/asterisk"
Set name and email.
Installed the gerrit commit hook: "git review -s"
Try to change to asterisk 13 for creating a patch: "git checkout 13"
This fails with:
error: pathspec '13' did not match any file(s) known to git.


"git checkout -b 13" appears to fix this.

Created a new branch:
git checkout -b ASTERISK-27284

Did some work, added and commited this work. So far so good.

Now trying to submit this: "git review 13"
Fails with:

>Errors running git rebase -p -i remotes/gerrit/13
>error: could not apply 5760526... Update UPGRADE.txt for 13 branch
>
>When you have resolved this problem, run "git rebase --continue".
>If you prefer to skip this patch, run "git rebase --skip" instead.
>To check out the original branch and stop rebasing, run "git rebase
>--abort".
>Could not pick 5760526f69ad02189c8e385e2e974be4cba11b6e
>It is likely that your change has a merge conflict. You may resolve it
>in the working tree now as described above and then run 'git review'
>again, or if you do not want to resolve it yet (note that the change can
>not merge until the conflict is resolved) you may run 'git rebase
>--abort' then 'git review -R' to upload the change without rebasing.


Somehow some way, UPGRADE.txt and UPGRADE-13.txt are changed and I can't
find any way to discard/ignore/remove/skip these changes. Clearly I
don't understand git and the way it handles conflicts it created by
itself.

What is going wrong? What is the magical git command to just commit the
2 files I added/commited for review?

-- 
_
-- 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] ERROR during high volume MoH dialplan

2017-08-31 Thread Daniel Tryba
On Thu, Aug 31, 2017 at 05:54:43PM +, Joseph Smith wrote:
> 
> So I am looking for a better way to allow several thousand callers to listen 
> to this IVR menu at the same time.
> 

An alternative that comes to mind is to have 1 conference with 1 channel
playing MoH in it and then add callers in a muted state to it. Never
tried this, don't know if it fits your case.


-- 
_
-- 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] Pass CallerId/Privacy info from A Leg to B Leg

2017-08-17 Thread Daniel Tryba
On Thu, Aug 17, 2017 at 07:28:00AM +, Grant Bagdasarian wrote:
> Is there an option to give to the Dial command, or another variable to set, 
> to make Asterisk copy such information to the B Leg?
> Or do I have to program this out myself?

In chan_sip there are the trustrpid and sendrpid option:

;trustrpid = no ; If Remote-Party-ID should be trusted
;sendrpid = pai ; Use the "P-Asserted-Identity" header
; to send the identity of the remote party 

In pjsip:
;trust_id_inbound=no; Accept identification information received from this
; endpoint (default: "no")
;trust_id_outbound=no   ; Send private identification details to the endpoint
; (default: "no")
;send_pai=no; Send the P Asserted Identity header (default: "no")


-- 
_
-- 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] Change OS from CentOS 6 to 7

2017-08-04 Thread Daniel Tryba
On Fri, Aug 04, 2017 at 03:27:40PM -0400, Jerry Geis wrote:
> Audio packets are running...
> 
> 961 16.150421076 192.168.5.150 -> 192.168.5.25 RTP 214 PT=ITU-T G.711 PCMU,
> SSRC=0x6A3E0AF1, Seq=28402, Time=73280
> 962 16.170411284 192.168.5.150 -> 192.168.5.25 RTP 214 PT=ITU-T G.711 PCMU,
> SSRC=0x6A3E0AF1, Seq=28403, Time=73440
> 963 16.190381989 192.168.5.150 -> 192.168.5.25 RTP 214 PT=ITU-T G.711 PCMU,
> SSRC=0x6A3E0AF1, Seq=28404, Time=73600
...

Which is only one way!

Your info is lacking any useful information, that makes helping you
extremly difficult. Enable debugging in asterisk (core set verbose 3,
sip set debug on and rtp set debug on) and compare what asterisk is
seeing to packet captures. Tell us what ip adress is what device, try
telling us what you are trying to accomplish (eg are you calling an echo
test).

Have you tried turning of selinux? If that solves the issue, take a look
at how to actually set ip up correctly for asterisk.


-- 
_
-- 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] Support for inbound UPDATE request

2017-07-08 Thread Daniel Tryba
On Fri, Jul 07, 2017 at 07:44:26PM +0530, Rahul MathuR wrote:
> Could you please let me know whether the latest Asterisk has a support for
> inbound UPDATE ?
> 
> In my case, the carrier is sending an UPDATE to change the codec which is
> replied by 5xx from Asterisk 11.17.1.

Asterisk 13/PJSIP supports inbound UPDATEs, I see them all the time as
inbound Session-Timer mechanism.
https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Configuration_res_pjsip#Asterisk13Configuration_res_pjsip-endpoint_direct_media_method
mentions support for SDP renegotiation via UPDATE if supported by the
endpoints being preferred above re-INVITEs.


-- 
_
-- 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 equivalent for SIPDtmfMode?

2017-06-29 Thread Daniel Tryba
> > Can't find a way to control the dtmf mode on a per session basis with
> > pjsip, used to use SIPDtmfMode from the dialplan with chan_sip. Any
> > hints on how to do this?
> 
> There is no current way, but a community member has recently posted a
> change[1] for review which implements this.
> 
> [1] https://gerrit.asterisk.org/#/c/5909/

Just what I wished for. I'd love to see this added.

But I see later versions (>13.14.1) have an dtmfmode auto_info option,
might also fit my needs.

Thanks for your feedback to my question(s).


-- 
_
-- 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] DMTF payload bug in 13.14.1 with pjsip and direct_media?

2017-06-29 Thread Daniel Tryba
On Thu, Jun 29, 2017 at 11:55:51AM -0500, Richard Mudgett wrote:
> > To me this looks like a bug in asterisk. Either asterisk should use the
> > same rtp payloads for telephone-events on both call legs during inital
> > callsetup or asterisk should come to the conclusion there is an
> > incompatible "codec" on both legs so it shouldn't switch to direct
> > media.
> >
> > Has anyone else seen this issue?
> >
> 
> This is an old issue.  One of the latest issues is:
> 
> https://issues.asterisk.org/jira/browse/ASTERISK-25166

I was looking DTMF related problems and found none. Looks like it is a
more general issue related to all capabilities. Thank you for pointing
this out. 

Seeing the history of the bugs the problem and the full fix is larger
than I initially thought. Maybe a quick stopgap is to just not try to
setup direct media if there are numeric differences between call legs
(this would help me since most call would be direct media, I'll try to
look into this is I have the time to look into this and find out if I
have enough knowlegde to try something).


-- 
_
-- 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] PJSIP equivalent for SIPDtmfMode?

2017-06-29 Thread Daniel Tryba
Can't find a way to control the dtmf mode on a per session basis with
pjsip, used to use SIPDtmfMode from the dialplan with chan_sip. Any
hints on how to do this?


-- 
_
-- 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] DMTF payload bug in 13.14.1 with pjsip and direct_media?

2017-06-29 Thread Daniel Tryba
While trying to use direct_media I'm seeing RTP payload mismatches after
succesful reinvites.

Initial INVITE from endpoint A to asterisk has rfc4733 DMTF
m=audio 35648 RTP/AVP 9 8 111 96
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16

>From asterisk to upstream U:
m=audio 14338 RTP/AVP 9 8 111 18 0 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16

So the payload types in the RTP streams from A and to U differ. This
works fine when asterisk is relaying media.

With direct_media=yes there are reinvites sent from asterisk to both A
and U. The invite to A contains:
c=IN IP4 ipaddrofU
m=audio 33142 RTP/AVP 8 96
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16

And the invite to U contains:
c=IN IP4 ipaddrofA
m=audio 35648 RTP/AVP 9 8 111 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16

Both sides respond with a 200 OK and asterisk is not
relaying/transcoding the media anymore. At this moment DTMF send from A
isn't getting recognized by U, which IMHO is totally understandable
since U doesn't know about payload 96. 

To me this looks like a bug in asterisk. Either asterisk should use the
same rtp payloads for telephone-events on both call legs during inital
callsetup or asterisk should come to the conclusion there is an
incompatible "codec" on both legs so it shouldn't switch to direct
media.

Has anyone else seen this issue?

-- 
_
-- 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] Writing CDR's to two database servers

2017-06-19 Thread Daniel Tryba
On Mon, Jun 19, 2017 at 11:47:04AM -0400, Tech Support wrote:
> I know that there are probably several solutions to this problem, but
> what I am trying to do is provide some redundancy for my customers CDR data.
> I know that doing simple backups of MySQL is probably the easiest way to go,
> but I'm thinking that there may be some benefit to simultaneously writing
> the CDR data to multiple servers at once. However, I'm drawing a blank on
> this one. Has anyone else done this before? Any insight at all would be
> greatly appreciated.

Beside the already mentioned solutions, you could take a look at a
multi-master setup like a Galera Mysql cluster. Works perfectly for
short queries without locks like CDRs.


-- 
_
-- 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] OT: Explain where mailing list bouncing comes from ?

2017-06-16 Thread Daniel Tryba
On Fri, Jun 16, 2017 at 08:38:59AM +0100, J Montoya or A J Stiles wrote:
> > Whatever has been done, if anything, isn't working effectively.  At this
> > point I'd like to see some response from the mailing list admin about any
> > root-cause efforts, AFAIC this is starting to smear the Digium/Asterisk
> > brand's ability to handle IT related issues...  No response = no confidence
> > vote.
> 
> It's hardly Digium's fault,

Actually it is. They are pretending to send email from our/your/my
emailadresses without taking the proper steps how to do this in a modern
age.

[snip google rant]

DMARC reports inform me that most rejections come from Google (500+),
Microsoft has far far less rejection (less than 10 IIRC), then comcast
and some other mail providers. It is just that most people (choose) use
Google, get over it.

What Google (and many many others) is doing is for the benifit of reducing
email spoofing and spam. Proper SPF/DKIM/DMARC are a must if you want to
send mail to the big parties. The time you could simply run your own
smtpd without any cares are long since gone, you need to comply to
current SMTP related RFCs to get mail accepted.

I'm still maintaining the idea that simply enabling DKIM signing on this
list solves the problem. It is supported by the MTAs I can see in the
headers and I linked to a howto in the past.

But Digium doesn't need to have this kind of knowledge, their business
is not SMTP based but SIP based (and I think they are great at that
business). But since the mailinglists are supplemental support services
it would be in their best interest to fix this mess in some way.


-- 
_
-- 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 this the future of telephony?

2017-06-16 Thread Daniel Tryba
On Thu, Jun 15, 2017 at 08:56:29PM -0400, Christopher van de Sande wrote:
> I just setup an anonymous endpoint in pjsip.conf and a context that
> forwards to $EXTEN and when I setup the correct SRV records, it seems
> that any SIP client that's smart enough can just dial my SIP/email
> address.  Is this what the future looks like?

Look forward to a lot of SPIT (SPAM over Internet Telephony).

BTW how to you expect to get the data on your mobile device? That is a
"traditional" telephone company its bussiness, providing network
capabilities to endusers.

-- 
_
-- 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] Asterisk 1.6.2 how to debug T.38 udptl problems

2017-06-15 Thread Daniel Tryba
On Thu, Jun 15, 2017 at 12:11:36PM +0200, Benoit Panizzon wrote:
> Or does anyone have an idea over what the asterisk is stumbling?

What if you set the maxdata in asterisk to a value lower than the other
side? e.g. sip.conf: 
t38pt_udptl = yes,fec,maxdatagram=400

-- 
_
-- 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] CallerId presence issue

2017-06-14 Thread Daniel Tryba
On Wed, Jun 14, 2017 at 10:18:19AM -0400, Mike wrote:
> I have a PRI coming in PBX_A and PBX_A is connected to PBX_B via SIP.
> PBX_A gets PRI calls on a 4 port Digium card, and each call naturally has
> its own callerid values and presence.  I pass on those calls to PBX_B via
> SI, and I'm trying to pass on this CALLERID info to PBX_B as well. 
> 
> My relevant dialplan snippet on PBX_A is:
> exten =>
> 1,1,Dial(SIP/pbx_b/55,,f(${CALLERID(all)})u(${CALLERID(pres)})))
...
> I'm clearly missing something to pass on the callerid presence state via
> the SIP link, but I can't figure out what.

Never heard of this method, are you sure this works for SIP, sound more
like for ISDN (look at packet captures).

But the/a standardized method is to use the P-Asserted-Identity and
Privacy headers (rfc3325). This should work if you set in the peer configs 
in sip.conf on both sides:
sendrpid=pai
trustrpid=yes

Or you can do header manipulation/getting/setting manualy if desired.

-- 
_
-- 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] German sip dial rules

2017-06-12 Thread Daniel Tryba
On Mon, Jun 12, 2017 at 05:00:31PM +0200, Hans-Peter Jansen wrote:
> is somebody attending, that wants to share his outgoing dial rules of 
> extension.conf, like used in typical(?) german pbx setups?
> 
>  * zero prefix for outside calls
>  * zero zero or plus prefix for international calls
>  * handle emergency calls
> 
> With ISDN, one was able to just forward the called number, but with sip, one 
> has to normalize the dialed pattern in order to match SIP (provider) 
> expectations... As always, the devil is in the details.

Shouldn't you just ask the provider?

But not being German, the only problem I know of is the ISDN 
sub addressing feature widely in use.

Looking at https://en.wikipedia.org/wiki/Telephone_numbers_in_Germany
I'd guess a dialplan would be (assuming the operator wants e164+):

exten => _1.,1,Dial(SIP/${EXTEN}@provider)
exten => _[2-9].,1,Goto(+49xyz${EXTEN:1},1)
exten => _0[1-9].,1,Goto(+49${EXTEN:1},1)
exten => _00[1-9].,1,Goto(+${EXTEN:2},1)

exten => _+.,1,Dial(SIP/${EXTEN}@provider)


-- 
_
-- 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] OT: Explain where mailing list bouncing comes from ?

2017-06-12 Thread Daniel Tryba
On Mon, Jun 12, 2017 at 09:07:31AM +0200, Olivier wrote:
> Lately, I'm receiving emails asking me to re-enable my list subscription
> due to "excessive bouncing".
> 
> What does this exactly mean and why am I receiving this ?
> Beside re-enabling my subscription, what can I do to improve things ?

See my DMARC thread message:
http://lists.digium.com/pipermail/asterisk-users/2017-June/291545.html

Any DMARCed domain used for sending will cause bounces for recipients on
platforms that check and honor the DMARC configuration.

There may ofcourse be other causes.

-- 
_
-- 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] asterisk 13.16 / pjsip / t.38: res_pjsip_t38.c:207 t38_automatic_reject: Automatically rejecting T.38 request on channel 'PJSIP/91-00000007'

2017-06-11 Thread Daniel Tryba
On Sun, Jun 11, 2017 at 01:16:10PM +0200, Michael Maier wrote:
> Let's go into details:
> I'm starting at the point where asterisk / fax client receives the T.38
> reininvite from the server from the provider 195.185.37.60:5060 for the
> fax client (extension 91):

I'm running Asterisk 11 on my faxserver so not using pjsip but chan_sip.
But IIRC I had problems with asterisk-11/t38modem-2.0.0/hylafax if the
upstream side started the t38 reINVITE on sending a fax. My hylafax
config.ttyT38* contains the AT F command to initiale t38 on the t38modem
side for outgoing calls. For incoming t38modem also starts the reINVITE
but there is no parameter to influence this in my configs.

No idea if this is in anyway related nor what the default is of the
options below and neither if it depends on the t38modem version.

# T.38 dial modifiers
#
# F - enable T.38 mode request after dialing
# V - disable T.38 mode request after dialing (remote host should do it)
#
# calling/called number dial modifiers
#
# L - reset and begin of calling number
# D - continue of called number
#
ModemDialCmd:   ATDF%s  # user can override F by dial V
#ModemDialCmd:  ATDV%s  # user can override V by dial F
#ModemDialCmd:  ATD%sF  # user can't override F
#ModemDialCmd:  ATD%sV  # user can't override V
#ModemDialCmd:  ATD%sVL # user can't override V or calling 
number


-- 
_
-- 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 user_eq_phone adds user=phone to anonymous user bug?

2017-06-09 Thread Daniel Tryba
On Fri, Jun 09, 2017 at 11:40:01AM -0300, Joshua Colp wrote:
> What seems to be happening is that the session is being set up and the
> user=phone parameter added. It's only after that the values are updated
> to be Anonymous and the user=phone parameter is left there. Please file
> an issue[1] with the description above.

Issue created:
https://issues.asterisk.org/jira/browse/ASTERISK-27047


-- 
_
-- 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] pjsip user_eq_phone adds user=phone to anonymous user bug?

2017-06-09 Thread Daniel Tryba
With pjsip (asterisk 13.14.1) I see the problem that an anonymous from
header gets user=phone appendend to the URI if user_eq_phone=yes is
specified:

On the incoming leg:
From: anonymous 
;tag=Q5zBj7BMnvI6Fe6O2866fox3ZHmn-smt
Get transformed to 
From: "Anonymous" 
;tag=fa3cb748-6af9-485f-8a70-a2b9ad40b13a
on the outgoing leg.

Setting user_eq_phone = no will result in user=phone not being added.
The upstream provide demands user=phone in URIs if the username
resembles a phonenumber, but declines the INVITE if user=phone is
present on an anonymous username.

Looking at the code,res/res_pjsip.c function ast_sip_add_usereqphone is
the only place I see that might add user=phone:

=
int i = 0;
//.
if (pj_strbuf(_uri->user)[0] == '+') {
i = 1;
}

/* Test URI user against allowed characters in AST_DIGIT_ANY */
for (; i < pj_strlen(_uri->user); i++) {
if (!strchr(AST_DIGIT_ANYNUM, pj_strbuf(_uri->user)[i])) {
break;
}
}

if (i < pj_strlen(_uri->user)) {
return;
}

  //add user=phone if we get to the code below
=

sip_uri->user should be "anonymous"
AST_DIGIT_ANY is: #define AST_DIGIT_ANYNUM "0123456789"

So in the for loop the first char of sip_uri->user should result in a
NULL from strchr. Leaving i at the value 0, which is smaller than the
length of sip_uri->user. And thus the function should return before
adding the user=phone. So why is user=phone being added?

-- 
_
-- 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] asterisk server - no sound

2017-06-06 Thread Daniel Tryba
On Tue, Jun 06, 2017 at 03:18:32PM +0200, andre castro wrote:
> extensions.conf:
> [home]
> exten = 102,1,Answer()
> same =  n,Wait(1)

If this is copy and paste, then your dialplan is broken (= should be =>)

But to debug, enable logging (core set verbose 5), when needed debugging
(core set debug 5) and sip logging (sip set debug on / pjsip set logger
on).

-- 
_
-- 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] OT: DMARC enabled domains on this list

2017-06-06 Thread Daniel Tryba
On Tue, Jun 06, 2017 at 08:23:33AM -0400, James B. Byrne wrote:
> > The reports are there to tell you something isn't right (like on this
> > mailing list). Disabling them is only hiding the problem, people might
> > be replying with the correct answer to a problem, but the OP might
> > never gets that message.
> >
> 
> What DMARC reports is that somebody other than yourself is sending
> email claiming to be you.  And there is absolutely nothing that you
> can do about it.  So the question arises: What is the value in these
> reports?

To tell those others (in the case of legitimate mail via mailinglists)
they are doing something wrong and mail redirected by said mailinglists
isn't getting delivered (or like with gmail "marked as phishing and put
into quarantine").

Also with increased use of DMARC (which I don't personally care for but
the BIG mail operators are kind of forcing it) there will be more
bounces from DMARCed senders to subscribed users which may result in the
mailinglist software to incorrectly unsubcribe those recipients.

-- 
_
-- 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] Extensions of sip trunk

2017-06-06 Thread Daniel Tryba
On Tue, Jun 06, 2017 at 12:40:21AM +0200, Hans-Peter Jansen wrote:
> > Yes, something like if they can't fix the R-URI:
> > exten => X_.,n,Set(TO=${CUT(SIP_HEADER(To),@,1)})
> > exten => X_.,n,Set(TO=${CUT(TO,:,2)})
> > exten => X_.,n,Goto(somewhereelsetopreventloops${TO},1)
> 
> Sorry for the silly question, but how do I feed the TO variable back to the 
> usual pattern matching? Assign to $EXTEN?

The goto does that (with fixed typo):
exten => X_.,n,Goto(somewhereelsetopreventloops,${TO},1)
 
The reason to send to another context  where you handle specific DIDs is
to prevent loops. _X. is kind of a wildcard, if there is no DID for the
TO this will loop in _X.


-- 
_
-- 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] Extensions of sip trunk

2017-06-05 Thread Daniel Tryba
On Mon, Jun 05, 2017 at 06:10:50PM +0200, Hans-Peter Jansen wrote:
> ; matches 12345678099, too
> exten => _1234567800,1,Dial(SIP/int)
> 
> Except from SIP invite with tcpdump:
> 
> INVITE sip:12345678@provider:5060 SIP/2.0
> From: ;tag=as6bc7cbbc
> To: 

12345678099 doesn't match _1234567800. The problem is the other side is
setting the R-URI to sip:12345678@provider for any number, so the
EXTEN matched in the dialplan is 12345678. Ask them to fix this
problem.

> I wonder, if I really need to grab the extension with 
> Set(DN=${SIP_HEADER(TO):5}) or something similar?

Yes, something like if they can't fix the R-URI:
exten => X_.,n,Set(TO=${CUT(SIP_HEADER(To),@,1)})
exten => X_.,n,Set(TO=${CUT(TO,:,2)})
exten => X_.,n,Goto(somewhereelsetopreventloops${TO},1)

> Another issue is, that I don't like asterisk to decline foreign INVITE 
> requests. Any best practices from within asterisk on how to ignore SIP 
> invitations, that don't match certain criteria (neither local nor from sip 
> provider)?

Don't enable guest access, or send any unknown/guest to a context that
will just hangup.

-- 
_
-- 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] OT: DMARC enabled domains on this list

2017-06-05 Thread Daniel Tryba
On Mon, Jun 05, 2017 at 01:08:17PM -0400, James B. Byrne wrote:
> This is likely the issue surrounding mailing lists rewriting headers
> and/or modifying messages bodies or simply re-transmitting messages as
> the original sender from an unapproved domain. This was discussed at
> length on the ITEF mailing list.  Without seeing your headers and
> those of a recipient it is impossible to be sure but my spidy sense
> tells me this is so.

Subjects (atleast) are being rewritten, a recipient can't verify the
original (signed) hash to match the received message (replay
protection).  Only thing that is needed is a valid DKIM signature after
the subject (and maybe others) has "[asterisk-users]" prepended.

It appears exim 4.76 is being used, that version is recent enough to add
DKIM on sending via smtp.

begin transports

remote_smtp:
driver  = smtp
dkim_domain = lists.digium.com
dkim_selector   = auniqueid
dkim_private_key= /etc/exim4/dkim/list.digium.com-private.pem
dkim_canon  = relaxed

More info for example from:
https://debian-administration.org/article/718/DKIM-signing_outgoing_mail_with_exim4
The hints to do this for only 1 domain if the smtpd is used for others
are all there.
 
> You can manage this in your DNS forward zone by turning off the DMARC
> reporting request. No, I no longer recall the details.  Or you can
> simply direct the incoming reports to /dev/null.

The reports are there to tell you something isn't right (like on this
mailing list). Disabling them is only hiding the problem, people might
be replying with the correct answer to a problem, but the OP might never
gets that message.


-- 
_
-- 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] OT: DMARC enabled domains on this list

2017-06-02 Thread Daniel Tryba
Having enabled a strict DMARC setup I noticed everytime I send a message
here I get all these reports of messages which fail DMARC. Since I don't
want people to miss my wise thoughts maybe the maintainers of this list
could look into DKIM signing (or any of the other ways to work around
spf and dmarc breaking forwards)


-- 
_
-- 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] Let's encrypt privkey : Specified certificate file could not be used

2017-06-02 Thread Daniel Tryba
On Fri, Jun 02, 2017 at 02:36:38PM +0200, Jonas Kellens wrote:
> [Jun  2 14:29:28]   == DTLS ECDH initialized (secp256r1), faster PFS enabled
> [Jun  2 14:29:28] ERROR[27360][C-0ae5]: res_rtp_asterisk.c:1441
> ast_rtp_dtls_set_configuration: Specified certificate file
> '/etc/letsencrypt/live/ws.mydomain.tld/privkey.pem' for RTP instance
> '0x7f920c538a78' could not be used

What size is the privatekey? There is a script to create cert for
asterisk:
https://github.com/asterisk/asterisk/blob/master/contrib/scripts/ast_tls_cert
It create a 1024b keypair, maybe for a good reason. Certbot its size is
2048 by default. Try adding --rsa-key-size 1024 (our signing a
"handcrafted" key)


-- 
_
-- 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] Forward error code beetwen legs

2017-06-01 Thread Daniel Tryba
On Thu, Jun 01, 2017 at 09:06:25PM +0200, Loic Chabert wrote:
> [gotoexternal]
> exten => _X.,1,Dial(SIP/${EXTEN}@provider)
> 
> When my SIP provider return to asterisk a 404 SIP error code, asterisk
> return to phone a 503 error code.
> 
> Why 503 error code has been returned, and not the original error = 404
> error ?
> 
> Asterisk's cli said: == Everyone is busy/congested at this time (1:0/0/1)
> 
> How can i return the 404 error ? Forward this 404 error to the original leg
> ?

To lazy to look it up exactly, but add something like:
exten => _X.,n,Hangup(${HANGUPCAUSE})


-- 
_
-- 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] OT: Want to capture all SIP messages

2017-05-31 Thread Daniel Tryba
On Wed, May 31, 2017 at 01:39:25PM -0700, Steve Edwards wrote:
> >What bugs you about the output format?
> 
> It's been a while, but as I recollect, it included the date/timestamp in the
> file name of the 'ring buffer' which meant that each time the host was
> rebooted, dumpcap didn't know the files from the previous run should be
> deleted when they 'aged out.'

Solvable by by writing a cleanup script that deletes files over a
specific age, just a basic find in the daily crontab:
find /path/to/captures -type f -name 'pattern*' -mtime +X -exec rm {} \;


-- 
_
-- 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] OT: Want to capture all SIP messages

2017-05-31 Thread Daniel Tryba
On Wed, May 31, 2017 at 12:36:47PM -0700, Steve Edwards wrote:
> I want to capture all SIP messages.
> 
> I have about 30 hosts in about 6 colos.
> 
> My first thought was dumpcap, but the output file name format bugs me.
> 
> What do you use for long term SIP capture?

What bugs you about the output format? There are multiple ways to
display stored information, wireshark can be extremely usefull (and
unstable) or just dump plain text by replaying the pcap with ngrep.

Ways I used so far:

-tshark to produce pcap file (-b duration:x to split up files into time
 intervals
-"sip set log on" to store it plain text in asterisk log files (or pjsip
 set logger on)
-ngrep -W byline to store it in 

Will look into in the near future:
-Homer via res_hep_pjsip
-voipmonitor (didn't know about till just now thanks to Marks reply)

-- 
_
-- 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 direct_media=yes and "unknown" endpoints

2017-05-10 Thread Daniel Tryba
On Wed, Apr 26, 2017 at 06:25:43PM +0200, Daniel Tryba wrote:
> Whoever when a terminating call comes in from the uplink provider, a
> sip request is send to a redirector. The redirector has
> redirect_method=uri_core configured (the only method that works for
> me).

[...]

> The request now gets routed based on a fully qualified domainname
> (with NAPTR/SRV records), which ultimately resolves to an ip that is
> matched in the endpoint SBC used above to originate a call.  But now
> the asterisk stays in the loop regarding RTP, a simple bridge is
> created but never switches to direct media.

This is not an asterisk problem, after fiddling with the config and
using templates to make sure the config for all (configured) endpoints
was the same, a reINVITE renegotiated RTP between the endpoints. 

However what happens is that after the renegotiation the DTMF
payloadtype (rfc4733) changed from 101 in the initial setup to 96. The
uplink provider doesn't support this thus DTMF breaks making
direct_media not an option right now. Something I have to figure out
later.

-- 
_
-- 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 direct_media=yes and "unknown" endpoints

2017-04-26 Thread Daniel Tryba
> > Anybody got an idea why the last scenario fails to work?
> 
> If you turn up core debug (core set debug 2) and ensure it is going to
> the CLI then the bridge_native_rtp module will tell you why exactly it
> can't native bridge. You might also want to do a core show channel on
> both channels to see what the codecs are.

Thanks for the hint, I wasn't seeing any debug since it wasn't getting
send to console. I'll take a better look and report back.


-- 
_
-- 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] pjsip direct_media=yes and "unknown" endpoints

2017-04-26 Thread Daniel Tryba
I'm trying to implement direct_media between multiple peers and an
uplink provider, all of whom have direct_media=yes configures.

For originating calls to the uplink provider direct_media=yes works like
expected. SIP flows through asterisk, rtp doesn't

SIP: enduser <-> SBC <-> asterisk 13 <-> uplink
RTP: enduser <-> SBC <-> uplink

SBC matches an endpoint based on ip and dials the uplink:

-- Executing [+31x@outgoingrr:9] Dial("PJSIP/sbcs-0092", 
"PJSIP/+31x@uplink") in new stack
-- Called PJSIP/+31x@uplink
-- PJSIP/uplink-0093 is making progress passing it to PJSIP/sbcs-0092

-- PJSIP/uplink-0093 answered PJSIP/sbcs-0092
-- Channel PJSIP/uplink-0093 joined 'simple_bridge' basic-bridge 
<3b25c543-13a3-4d74-b2fe-7122a1cfe4a4>
-- Channel PJSIP/sbcs-0092 joined 'simple_bridge' basic-bridge 
<3b25c543-13a3-4d74-b2fe-7122a1cfe4a4>
   > Bridge 3b25c543-13a3-4d74-b2fe-7122a1cfe4a4: switching from simple_bridge 
technology to native_rtp
   > Remotely bridged 'PJSIP/sbcs-0092' and 'PJSIP/uplink-0093' - media 
will flow directly between them
   > Remotely bridged 'PJSIP/sbcs-0092' and 'PJSIP/uplink-0093' - media 
will flow directly between them

Whoever when a terminating call comes in from the uplink provider, a sip
request is send to a redirector. The redirector has redirect_method=uri_core
configured (the only method that works for me).

-- Executing [+31x@incoming:11] Dial("PJSIP/uplink-0094", 
"PJSIP/+31x@pathfinder") in new stack
-- Called PJSIP/+31x@pathfinder
-- Now forwarding PJSIP/uplink-0094 to 
'PJSIP/pathfinder/sip:+31xx...@sip.xx.nl' (thanks to 
PJSIP/pathfinder-0095)
...
-- PJSIP/pathfinder-0096 answered PJSIP/uplink-0094
-- Channel PJSIP/pathfinder-0096 joined 'simple_bridge' basic-bridge 
<1bf02059-ea8f-4f9c-bc33-8ae99ba45c9a>
-- Channel PJSIP/uplink-0094 joined 'simple_bridge' basic-bridge 
<1bf02059-ea8f-4f9c-bc33-8ae99ba45c9a>
...
-- Channel PJSIP/pathfinder-0096 left 'simple_bridge' basic-bridge 
<1bf02059-ea8f-4f9c-bc33-8ae99ba45c9a>
-- Channel PJSIP/uplink-0094 left 'simple_bridge' basic-bridge 
<1bf02059-ea8f-4f9c-bc33-8ae99ba45c9a>

The request now gets routed based on a fully qualified domainname (with
NAPTR/SRV records), which ultimately resolves to an ip that is matched in the
endpoint SBC used above to originate a call.  But now the asterisk stays in the
loop regarding RTP, a simple bridge is created but never switches to direct
media.

SIP: enduser <-> uplink <-> asterisk 13 <-> pathfinder (302 redirect)

SIP: enduser <-> uplink <-> asterisk 13 <-> sip.xx.nl
RTP: enduser <-> uplink <-> asterisk 13 <-> sip.xx.nl

Anybody got an idea why the last scenario fails to work?


-- 
_
-- 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] PJSIP with registratrion to DNS SRV records fail with PJLIB_UTIL_EDNSNOANSWERREC

2015-11-04 Thread Daniel Tryba

I finally thought it might be a good time to start looking at the pjsip
implementation in Asterisk 13. But trying to register to a sip cluster
that uses SRV records fails randomly with:

[Nov  4 15:50:59] WARNING[31330]: pjsip:0 :  tsx0x7f075c006 Failed to
send Request msg REGISTER/cseq=17800 (tdta0x7f075c0058f0)! err=320047
(No answer record in the DNS response (PJLIB_UTIL_EDNSNOANSWERREC))
[Nov  4 15:50:59] WARNING[31330]: res_pjsip_outbound_registration.c:735
schedule_retry: No response received from 'sip:sip.itco.nl' on
registration attempt to 'sip:tr...@sip.itco.nl', retrying in '60'

[Nov  4 15:51:59] WARNING[31330]: pjsip:0 :  tsx0x7f075c006 Failed to
send Request msg REGISTER/cseq=17801 (tdta0x7f075c0058f0)! err=320047
(No answer record in the DNS response (PJLIB_UTIL_EDNSNOANSWERREC))
[Nov  4 15:51:59] WARNING[31330]: res_pjsip_outbound_registration.c:735
schedule_retry: No response received from 'sip:sip.itco.nl' on
registration attempt to 'sip:tr...@sip.itco.nl', retrying in '60'

At 15:52:59 the register succeeds somehow.

Attached is a pcap of the DNS request and the responses (capture filter:
port 53 or port 5060 or port 5061). Unlike the warning says the
responses are there.

Does anybody have a hint of what is going on/what I do wrong?

pjsip.conf:
[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0

[transport-tcp]
type=transport
protocol=tcp
bind=0.0.0.0

[tryba]
type=endpoint
transport=transport-udp
context=tryba
disallow=all
allow=alaw
outbound_auth=tryba_auth
force_rport=yes
direct_media=no
ice_support=yes
auth=tryba_auth

[tryba_auth]
type=auth
auth_type=userpass
password=**
username=tryba

[tryba_register]
transport=transport-udp
type=registration
server_uri=sip:sip.itco.nl
client_uri=sip:tr...@sip.itco.nl
contact_user=tryba
outbound_auth=tryba_auth
expiration=180



dnsrsrv.pcapng.gz
Description: application/gzip
-- 
_
-- 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] Getting source ip adress of incoming INVITE

2014-07-07 Thread Daniel Tryba
On Fri, Jul 04, 2014 at 10:04:45AM -0400, Richard Kenner wrote:
 I'm interested in finding out what the source ip is of an invite in the
 dialplan (Asterisk 11).
 
 ${CHANNEL(recvip)}

Doh! That is an obviouls place to look. I'm wondering why I didn't
think about this or couldn't find any hints. Thank you for your prompt
answer.


-- 
_
-- 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] Getting source ip adress of incoming INVITE

2014-07-04 Thread Daniel Tryba
I'm interested in finding out what the source ip is of an invite in the
dialplan (Asterisk 11). As far as I can see this information isn't
accessible. The only solution I can think of is parsing either
Record-Route or Via headers. This is for recognizing guests in the
default context for sip.


-- 
_
-- 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] Issue dialing out

2013-06-16 Thread Daniel Tryba
On Sat, Jun 15, 2013 at 04:24:21PM -0400, Andre Goree wrote:
 Thanks so much for your suggestions.
 
 I'm running 1.0.x (yes, archaic, and in fact my actual task is
 migrating this system to asterisk11+Freepbx -- very fun in and of
 itself without regards to this issue...but I digress), and so I needed
 to run pri debug span span, which I've now done.  I attempted the
 call again have pasted the debug output here:
 http://pastebin.com/cHHnMfh6

You mentioned the telco receiving a DISCONNECT almost immediatly. Your
debug is only up to a PROGRESS.

I only have experience with euroisdn but callflow would be:
-SETUP
-CALLPROCEDING
-PROGRESS
-CONNECT
-CONNECT ACK
-DISCONNECT (eg from caller)
-RELEASE 
-RELEASE COMPLETE

But PROGRESS means the recipient is generating some audio (your
unreachable message?). If this is an error message you would expect a
RELASE from the telco after the recording if the caller doesn't hangup
first.

You should study the difference of zap-zap and sip-zap callsetup.


--
_
-- 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] Issue dialing out

2013-06-15 Thread Daniel Tryba
 Jun 15 13:06:05 VERBOSE[30232]: -- Executing Dial(Zap/1-1,
 zap/g1/1XX|20|tT) in new stack
 Jun 15 13:06:05 VERBOSE[30232]: -- Called g1/1XX
 Jun 15 13:06:08 VERBOSE[30232]: -- Zap/2-1 answered Zap/1-1
 Jun 15 13:06:08 VERBOSE[30232]: -- Attempting native bridge of Zap/1-1
 and Zap/2-1
 Jun 15 13:06:31 VERBOSE[30232]: -- Hungup 'Zap/2-1'
 Jun 15 13:06:31 VERBOSE[30232]: == Spawn extension (menu-v2, 4832, 1)
 exited non-zero on 'Zap/1-1'
 Jun 15 13:06:31 VERBOSE[30232]: -- Hungup 'Zap/1-1'
 
 
 I've contacted our PRI provider, however, they say that they do not
 see the call reach their system. To me, it would seem like the call is
 coming into our Asterisk system through our Zap interface on one
 channel, then attempting to leave the system through the Zap interface
 on another channel, and is failing to do so. 

They are either incompetant or lying to you. Call appears to succeed (it
is answered) and gets disconnected after 23s. You are not generating the
message, so the calls gets back to you telco.

Most likely someone is filtering on callerID (which is a good thing IMHO).
Set the callerid to one of your numbers before sending it back to Zap
and try again.


--
_
-- 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] I need a second opinion on a new phone system deployment

2013-06-15 Thread Daniel Tryba
On Sat, Jun 15, 2013 at 10:28:50AM -0600, Nunya Biznatch wrote:
 Answer - There's a couple reasons I'm thinking this way, which may be
 misguided so thanks for making me think about it. First is redundancy.
 Offloading the PRIs and analog phones from the primary PBX means if
 there's an issue, I can take one of those PRI boxes down and not
 affect the PBX, and the other PRI box will continue to provide
 trunking services. Only the analog lines on that specific PRI box
 would be impacted. Second, I know I'll be transcoding G.711 to G.722
 on those machines, 46 PRI channels, and 48 analog lines. I've been
 unable to find anything solid that gives me a definitive idea as to
 how much horsepower I need. 

If you do it correctly (g722 as primary codec and fallback to g711) and
only accept g711 on the pri machines it costs you next to nothing. You
can't buy a new machine to slow for the job of filling those channels by
just bridging. But like others noted, you should really look into some
device to handle that for you. My choice of hardware is Patton
SmartNodes. They aren't cheap but in the past 8 years I have only seen 1
die (bad PSU).

You didn't mention it yet, but will there be recordings of calls?
Monitoring calls will keep the PBX in the loop. And I have been stung by
bad controllers resulting in bad performance (HP cciss comes to mind
with Debian/squeeze).


--
_
-- 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] Issue dialing out

2013-06-15 Thread Daniel Tryba
On Sat, Jun 15, 2013 at 03:02:41PM -0400, Andre Goree wrote:
 Setting the CID did not work, unfortunately :(
[...]
 I'm going to try another number that we have through them in hopes
 that it'll complete and I'll let you know if that works.  Do you have
 any other suggestions on what you think they might be filtering by?
 
 In the trap given to me by the company, they show our system issuing a
 disconnect from our end, rather than their end dropping the call.

Do a pri set debug (or whatever it is called in 1.4 (zap?)) Zap/Zap
bridging should work, it did on my PRIs and still does with DAHDI. Only
thing I can think of is the TON/NPI might be a problem (but doubt it
since SIP/Zap works).


--
_
-- 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] I need a second opinion on a new phone system deployment

2013-06-14 Thread Daniel Tryba
On Fri, Jun 14, 2013 at 09:43:29AM -0600, Nunya Biznatch wrote:
 System will use G.722 for VoIP Phones.
[...]
 2-servers acting as gateways. Each handling 2 PRIs for outside
 trunks.

So why use g722? Just use your local g711 law and thus avoid the
transcoding impact to/from the PSTN and calls between the voip and analog
users.

And why would you seperate the PBX and PRI machines? Those few extra
channels don't really matter.


--
_
-- 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] Extenxions Optimization

2013-06-09 Thread Daniel Tryba
On Sun, Jun 09, 2013 at 10:30:45AM +0200, Olivier CALVANO wrote:
 We want optimize my extensions file conf on asterisk 11.4.0 :
 
 ; Destination: Gambia Type: Fixe
 exten = _00220X.,1,Set(CDR(CodeCom)=BUS-GMB)
[5 lines]
 
 ; Destination: Libya Type: Fixe
 exten = _00218X.,1,Set(CDR(CodeCom)=BUS-LBY)
[the same 5 lines]
 
 and into my Extensions.agi, i sent the other line. Do you think's that it's
 a good idea ?

AGI is perfect for this. Create a list of destinations and relate your
variables to it. Your free to use your favorite database and your
favorite script/language to replace those 8 with 1.

There is a drawback ofcourse, there is atleast one more program to fail
at calling time.

You may be in a position where you can do the magic later based on cdrs,
that way there is only asterisk to fail during the call.

--
_
-- 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] Emulate and script emulation of users calling in/receiving calls, transferring calls etc

2011-10-15 Thread Daniel Tryba
On Sat, Oct 15, 2011 at 08:12:33PM +1100, Alec Taylor wrote:
 If asterisk or freeswitch would be taught in a classroom environment,
 is there someway to emulate and script emulation of users calling
 in/receiving calls, transferring calls etc?

The Asterisk Manager Interface (AMI) and callfiles to/from Echo(),
voicemail or IVRs! But much easier is to have multiple (soft)phones
available to 1 student.

-- 

   Daniel Tryba

--
_
-- 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] CallerID inconsistently presented through ISDN/cellular networks

2011-10-14 Thread Daniel Tryba
On Thu, Oct 13, 2011 at 12:37:28AM +0200, Andreas Sikkema wrote:
 So normally calls to these destinations have nice caller id as if A was
 calling C (at least that's what C sees in their display) but every now
 and then I flow over to the alternative route and the information is
 lost, C doesn't see A, but B.
 
 Nothing I can do about it, been fighting over it for ages but I just
 doesn't seem to be able to make it work.

Suddenly I feel very lucky. It only took me a couple of weeks of sending
10 test calls per day of resulting callerids mishaps with Verizon to get
them to finaly trace the problem and correct a misconfigured switch. It
also helps to be able to route all mobile traffic through an other
provider, if they start to lose lots of minutes providers will act.

-- 

   Daniel Tryba

--
_
-- 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] Maybe slightly OT but..

2011-10-11 Thread Daniel Tryba
On Tue, Oct 11, 2011 at 08:26:22AM -0400, john Millican wrote:
 Thanks to all for the responses.  Boss calls overseas a lot and has an 
 unlimited data plan, so this coupled with the rates that we get for 
 our VoIP calls it is much cheaper than what Verizon charges.

My own experience with my 3G provider and VOIP provider is that creating
a callback or originator setup is still cheaper then using the GSM
carrier (esp. long distance), has better quality (lower latency) and
still works if data is not available.

-- 

   Daniel Tryba

--
_
-- 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 in the Cloud with Diamonds

2011-10-02 Thread Daniel Tryba
On Sun, Oct 02, 2011 at 12:05:54PM -0400, Nick Khamis wrote:
 I was hoping to get some your experiences regarding putting asterisk
 on a cloud. A first
 obvious limitation is the number of ports used by asterisk to transfer
 voice packets. 

So what obvious limitation am I missing? I always thought that cloud is
the new buzzword for hosted, I might be a little out of behind the times
it appears. Can you elaborate.

--
_
-- 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] [asterik-users] Installing PRI card

2011-10-01 Thread Daniel Tryba
On Sat, Oct 01, 2011 at 05:15:32AM +0530, NaJIm wrote:
 *wcte12xp: Setting up global serial parameters for T1*
 *wcte12xp: Found a Wildcard TE122*
 *wcte12xp: Span configured for ESF/B8ZS*
 *wcte12xp: Setting yellow alarm*
 
 Does the highlighted part mean that the card is setup in T1 mode. ??
 ( I do not have physical access to the server. But my support in the remote
 office says that card is in E1 mode itself.. )

Sit back, take a breath and relax, stop trying things at random.

First you have to figure out what signalling has to used on your PRI.
What country are you in? Who is the provider? Find out the switchtype
and siganalling used in zapata.conf and the spantype for zaptel.conf.
Also the B channels must match and offcourse the D channel must be set
correctly.

At the moment you are using typical T1 settings (24 channels, ESF/B8ZS)
but also say the thing is an E1 (30 channels (wheter or not you actually
get the max number of voicechannel), CCS,HDB3(,CRC4)).  T1 is the
default on Digium cards, so you might had to set the jumper differently,
but since you don't have physical access you need to use the correct
module option (t1e1override on dahdi, might differ on zaptel (see
modinfo)).

-- 

   Daniel Tryba

--
_
-- 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] DID and how the caller id will appear

2011-09-27 Thread Daniel Tryba
On Sun, Sep 25, 2011 at 10:59:29AM -0700, bilal ghayyad wrote:
 Yes I tried Set(CALLERID(num)=5631040) as shown in the below dialing,
 and no success. Also I tried Set(CALLERID(num)=1040) and I tried
 Set(CALLERID(num)=065631040) as the city code is 06 and when we call
 any mobile, it is appearing 065631040, but all of this did not work.
 
 The E1 is located in Jordan and it is PRI with 30 channels. Is there
 any thing need to be set other than Set(CALLERID(num)? I am afraid
 that I have to set a specific value for SetCallerPress !

I always thought the approriate format to set for callerid on PRIs is
your whole number excluding the national prefix. In your case
Set(CALLERID(num)=65631040)
You might try prefixing national TON and e164 format options:
Set(CALLERID(num)=Ne65631040)

-- 

   Daniel Tryba

--
_
-- 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] Digium ISDN card

2011-09-23 Thread Daniel Tryba
On Fri, Sep 23, 2011 at 06:31:16PM +0530, michael k wrote:
 Can anybody tell me which pci or pci express digium card can be used
 to connect my asterisk server and the ISDN pri line with 30 channels ?

You need to search for an E1 card (32 channels total, 30 voice):
http://www.digium.com/en/products/digital/single-span/
Exact model depends on type of PCI interface.

Don't forget to set the jumper from T1 to E1 :)

-- 

   Daniel Tryba

--
_
-- 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] DTMF problem

2011-09-23 Thread Daniel Tryba
On Sun, Sep 18, 2011 at 07:51:43PM -0400, Zeeshan A Zakaria wrote:
 This DTMF problem has always been there and there is no real solution
 for it, other than using those expensive PBX systems like that from
 Avaya, Cisco, etc. This problem happens when you are sending inband
 DTMF tones. Via softphone you are sending out-of-band DTMF which is
 basically SIP messages.

You can emulate this feature from the Expensive PBX system by setting:
relaxdtmf=yes
in the case of SIP, option may vary with Techology.

-- 

   Daniel Tryba

--
_
-- 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] Overlap SIP dialing

2011-09-08 Thread Daniel Tryba
On Thu, Sep 08, 2011 at 08:38:39AM -0500, Kevin P. Fleming wrote:
 The following just works for any SIP client (without
 overlap dialing):
 exten =  _X.,1,Answer()
 exten =  _X.,n,Dial(${TRUNK})
 
 Unless I'm mis-remembering, this was the point of adding the '!' 
 dialplan match character. If you use _X!, and you have your SIP 
 endpoints configured to send an INVITE as soon as the user has entered 
 two digits (and you have no other patterns in the context that could 
 match), then the dialplan will match against that and initiate a Dial() 
 on your ISDN PRI. Since the number is not yet complete, the SETUP 
 message on the PRI won't result in the call proceeding, and as the user 
 of the phone presses additional digits they'll be sent to Asterisk as 
 DTMF, bridged over to chan_dahdi, and it will send them as INFORMATION 
 messages rather than as DTMF digits, because it knows the outbound call 
 is still in 'dialing' state.

That is what I read, but I can't find any working examples. With the
following context:
[overlap]
exten = _X!,1,Dial(${TRUNK)

This happens:

Caller hits a number, which is immediatly send with an INVITE.  SIP
endpoint receives a TRYING. A DAHDI channel is opened.
SIP endpoint locks up, no further input iws accepted.
Nothing happens for 10s.
SIP endpoint received a TRYING.
Nothing happens for 40s.
DAHDI fails, SIP endpoint received a 503 Service Unavailable:
X-Asterisk-HangupCause: Mandatory information element is missing
X-Asterisk-HangupCauseCode: 96

SIP  = SIP/SDP Request: INVITE sip:0...@ouzo.pocos.nl, with session description
SIP  = SIP Status: 100 Trying
DAHDI= Message Type: SETUP (5)
DAHDI= Calling Number 
DAHDI=   Presentation: Presentation permitted, user number not screened (0)  
'' ]
DAHDI= Called Number 
DAHDI= Message Type: STATUS (125)
DAHDI= Cause 
DAHDI=   Ext: 1  Cause: Invalid information element contents (100), class = 
Protocol Error (e.g. unknown message) (6) ]
DAHDI= Call State (len= 3) [ Ext: 0  Coding: CCITT (ITU) standard (0)  Call 
state: Call Initiated (1)
DAHDI= Message Type: SETUP ACKNOWLEDGE (13)
DAHDI= Channel ID 
DAHDI=   ChanSel: As indicated in following octets
DAHDI=   Ext: 1  Coding: 0  Number Specified  Channel Type: 3
DAHDI=   Ext: 1  Channel: 1 Type: CPE]
DAHDI= Progress Indicator 
DAHDI=   Ext: 1  Progress Description: Inband information or appropriate 
pattern now available. (8) ]
q931.c:7194 post_handle_q931_message: Call 32806 enters state 2 (Overlap 
Sending).  Hold state: Idle
DAHDI= Message Type: CALL PROCEEDING (2)
SIP  = SIP Status: 100 Trying
DAHDI= Message Type: DISCONNECT (69)
DAHDI= Message Type: RELEASE (77)
DAHDI= Cause 
DAHDI=   Ext: 1  Cause: Mandatory information element is missing (96), class = 
Protocol Error (e.g. unknown message) (6) ]
DAHDI= Message Type: RELEASE COMPLETE (90)
DAHDI= Cause 
DAHDI=   Ext: 1  Cause: Mandatory information element is missing (96), class = 
Protocol Error (e.g. unknown message) (6) ]
SIP  = SIP Status: 503 Service Unavailable
SIP  = SIP Request: ACK sip:0...@ouzo.pocos.nl

Notice the Call 32806 enters state 2 (Overlap Sending). This is not
propagated to the SIP endpoint.

 However, this is still going to 'mess with CDRs' as you put it, because 
 the only switch in the network that knows the complete number that was 
 dialed is the PSTN switch that your PRI is connected to. It seems 
 possible that chan_dahdi could 'update' the EXTEN on the current channel 
 as the additional digits are dialed so that the CDR contains the 
 complete number, but I have no idea whether it does or not.

Didn't think about this CDR problem (was only concerned about billsec).
As far as I can see this doesn't happen in 1.6.2.x. The lack of
destination in CDR makes overlap dialing useless since I can't bill my
customers.

-- 

   Daniel Tryba

--
_
-- 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] Overlap SIP dialing

2011-09-08 Thread Daniel Tryba
On Thu, Sep 08, 2011 at 11:26:45AM -0400, Andrew Latham wrote:
 I want a t-shirt   SIP phones aren't 'dumb' :-)
 Overlap dialing has very limited use, however I found it helpful when
 testing integration with other PBX/VM/PSTN connections.

My quest for overlap dialing started with the request to create a
transparant SIP connection to a ISDN BRI PBX without adding unnecessary
waiting for timeouts on the side of the SIP gateway to get all digits to
send them en-block to Asterisk. My feedback for this request to the
customer will be:
-just use en-block dialing
or
-terminate the dialed number with # when not using en-block dialing
And make sure to strip # from en-block numbers :)

But I'm willing to give up now I see that this will not work with
billing anyway.

Thanks for the feedback and hopefully other people wanting to do overlap
dialing will find this thread and may take it into account.

-- 

   Daniel Tryba

--
_
-- 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] Overlap SIP dialing

2011-09-07 Thread Daniel Tryba
Looking at the history of the list I don't expect any answer but lets
try anyway:

Does anybody use overlap dialing from SIP devices to asterisk? Does
anybody have a working example?

-- 

   Daniel Tryba

--
_
-- 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] Overlap SIP dialing

2011-09-07 Thread Daniel Tryba
On Wed, Sep 07, 2011 at 10:20:40AM -0400, Andrew Latham wrote:
  To add to your question: Does anyone have a phone that supports this
  properly?
 
 
 Yup, I have a few...  http://wiki.snom.com/Settings/overlap_dialing
 

I'm using a Grandstream (GXP2000) to test.

What I got so far:
Overlap works IF you know *ALL* patterns available. Which is ofcourse
impossible to get into a dialplan.

Example (partial Dutch dialplan):

exten = _11X,1,Dial(${TRUNK}/${EXTEN})
exten = _1[46]XXX,1,Dial(${TRUNK}/${EXTEN})
exten = _1[46],1,Dial(${TRUNK}/${EXTEN})
exten = _0[1-8],1,Dial(${TRUNK}/${EXTEN})
exten = _0[89]0X,1,Dial(${TRUNK}/${EXTEN})
exten = _0[89]0,1,Dial(${TRUNK}/${EXTEN})

Dialing a normal 10 digit number works with overlap. When the 10th
digit is touched the destination rings immediate.

But calling service numbers is impossible, these numbers exists in 8 and
11 digit lengths, eg. 08001234 08001234567. Calling the 11 digit variant
is impossible since as soon as the 8th digit is entered the Asterisk
dials the 8 digit number.

= SIP Request: ACK sip:080...@ouzo.pocos.nl
= SIP/SDP Request: INVITE sip:0800...@ouzo.pocos.nl, with session description
= SIP Status: 484 Address Incomplete
= SIP Request: ACK sip:0800...@ouzo.pocos.nl
= SIP/SDP Request: INVITE sip:08000...@ouzo.pocos.nl, with session description
= SIP Status: 100 Trying
= SIP Status: 100 Trying
= SIP Status: 180 Ringing
= SIP/SDP Status: 200 OK, with session description

For internation calls this gets worse. For example Germany uses variable
length domestic numbers.

The possible (but hopefully avoidable) workarounds are:
-DISA
-Answering the call, Dial(${TRUNK}) and let the user enter the destination 
 by DTMF

The aim of the quest for overlap dialing is to let the user enter a
number at their own pace but immediatly dial when all digits are
received (just like plain old ISDN does). My trunk is a bunch of E1 PRIs
in overlap mode. The following just works for any SIP client (without
overlap dialing):
exten = _X.,1,Answer()
exten = _X.,n,Dial(${TRUNK})

But this affects CDRs.

-- 

   Daniel Tryba

--
_
-- 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] ISDN2 PCIe Card for Asterisk

2011-09-06 Thread Daniel Tryba
On Tue, Sep 06, 2011 at 01:05:02PM +0200, Patrick Lists wrote:
 Both Sangoma and Digium have PCIe ISDN cards although a single BRI port 
 might be a bit of a challenge:
[snip]
 You could also find an Intel (formerly Eicon) Diva Server card and use 
 it with chan_capi (must be a Server card, regular Diva cards don't 
 work). I use that in one Asterisk box and it's very reliable.

I personally decided against using PCI(e) ISDN BRI cards. Eicon and
various AVM cards all had problems with echo cancelling. I'd suggest
using external SIP gateways like Vegastream or SmartNodes. Easy to
configure (once you figure out how with a SmartNode), good quality and
much easier in failover (though might be a single point of failure by
itself).

-- 

   Daniel Tryba

--
_
-- 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] How does AMI work with events ?

2011-09-06 Thread Daniel Tryba
On Mon, Sep 05, 2011 at 02:41:50PM +0200, Jonas Kellens wrote:
 I read some information and examples on the net, but they all show how 
 you login to the AMI, give an action and receive a response. The end.
 I guess you just re-run the script every time you want the action to be 
 executed.
 
 How then does this work when you use events ? If I want to use 
 PeerStatus to monitor the state of a SIP peer, how can I run a script 
 on change of peer status ?
[snip]
 That's it. I'm logged in and I have been subscribed to receive peer 
 status changes. Where do these peer changes appear ? I really don't get 
 that.

This is fairly basic stuff:
1-connect to AMI
2-authenticate
3-subscribe to events
4-listen for events
5-check if wanted event and do something with it, else
6-go back to listening

So in your script you are connected, just start listening (fgets()) and
check if the appropriate event arrived (keep reading lines till first
empty line). Parse the event and do something (mail in your case) when
required.

Examples of PeerStats Events:
http://www.voip-info.org/wiki/view/asterisk+manager+events#PeerStatusEvent

Creating a prototype daemon in PHP should be easy, but I experienced
weird hangups in PHP with longlived sockets.

Personally I monitor SIP/IAX peers by parsing:
asterisk -nrx sip show peers 
with Nagios/NRPE scripts.

-- 

   Daniel Tryba

--
_
-- 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] pick up code

2011-09-06 Thread Daniel Tryba
On Tue, Sep 06, 2011 at 04:43:39PM +, salaheddine elharit wrote:

[asterisk 1.4]
 [agents]
 exten = _2XX,1,Dial(SIP/${EXTEN})
 exten = _*8XXX,1,PickupChan(SIP/${EXTEN:2})

SIP/222 is not a channel but an extension. See:
http://www.voip-info.org/wiki/view/Asterisk+cmd+Pickup

-- 

   Daniel Tryba

--
_
-- 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] how to add-edit-delete entery into asterisk conf files

2011-09-03 Thread Daniel Tryba
On Fri, Sep 02, 2011 at 04:58:52PM +0530, virendra bhati wrote:
 Please guide me how to configure all these files from from AMI connection. I
 am able to login into AMI from Login action but I want to do more task in to
 it.
[lots of fputs]
 After doing all no success :((

Have you actually tried reading from the socket to see what the results
are for your commands (hint: turn off events)?

This is what I get:
Response: Success
ActionID: 9873497149817

Looking at
http://www.voip-info.org/wiki/view/Asterisk+Manager+API+Action+UpdateConfig
it is clear that adding values to a category works different than you
expected.

First you need to create the new category (your scripts does that
already), then you need to append lines to is in the form of appends to
the category like in the example on voip-info.org:

action:updateconfig
reload:yes
srcfilename:manager.conf
dstfilename:manager.conf
Action-00:append
Cat-00:newuser
Var-00:secret
Value-00:nottelling

-- 

   Daniel Tryba

--
_
-- 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] Beggining asterisk

2011-09-03 Thread Daniel Tryba
On Sat, Sep 03, 2011 at 01:41:39AM -0400, Esteban Cacavelos wrote:
 Hi all, i am beggining on asterisk and i would like to run my asterisk on
 Ubuntu server 10.04 + asterisk 1.8.6.0 + dahdi
[snip]
 I was looking for documentation and i found the official book, but it
 doesn't explain anything about Dahdi.

Replace zap(tel) with dahdi.

But I suggest starting with the Ubuntu bundeled packages
(asterisk/dahdi/libpri).

-- 

   Daniel Tryba

--
_
-- 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 on Android?

2011-09-03 Thread Daniel Tryba
On Sat, Sep 03, 2011 at 01:53:54PM +0200, Gilles wrote:
 Do you want to run the entire PBX on the Android client or are you just
 looking for a IAX programm to be installed for receiving calls?!
 
 The entire PBX so I can have an IVR in the phone.

I don't think you can access the radio of the phone (RIL) at this
moment. So if you want to use the GSM itself you are out of luck. 

-- 

   Daniel Tryba

--
_
-- 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] pickup for extension in asterisk 1.4?

2011-09-03 Thread Daniel Tryba
On Sat, Sep 03, 2011 at 11:19:12AM -0700, Eduardo Leones wrote:
 I'm not able?to create?a?dial plan?to pull?links?extension.?I am 
 using?asterisk?1.4.18with the following?dial plan:
 
 exten =?_?*?7XXX,?1,?Pickup ($ {EXTEN:?2}?@?PICKUPMARK)
 exten =?_?*?7XXX, n,?Hangup?()
 
 But?is not working,?the following error appears?in the CLI:

Where are you *setting* the PICKUPMARK?

See the examples on
http://www.voip-info.org/wiki/view/Asterisk+cmd+Pickup

-- 

   Daniel Tryba

--
_
-- 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] QSIG-SIP overlap dialing and Asterisk (RFC4497)

2011-09-02 Thread Daniel Tryba
  Protocol Discriminator: Q.931 (8)  len=10
DAHDI  TEI=0 Call Ref: len= 2 (reference 7/0x7) (Sent to originator)
DAHDI  Message Type: CALL PROCEEDING (2)
DAHDI  [18 03 a9 83 81]
DAHDI  Channel ID (len= 5) [ Ext: 1  IntID: Implicit  Other(PRI)  Spare: 0  
Exclusive  Dchan: 0
DAHDIChanSel: As indicated in following octets
DAHDIExt: 1  Coding: 0  Number Specified  Channel 
Type: 3
DAHDIExt: 1  Channel: 1 Type: CPE]
DAHDI  Protocol Discriminator: Q.931 (8)  len=9
DAHDI  TEI=0 Call Ref: len= 2 (reference 7/0x7) (Sent to originator)
DAHDI  Message Type: ALERTING (1)
DAHDI  [1e 02 80 88]
DAHDI  Progress Indicator (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard (0)  
0: 0  Location: User (0)
DAHDIExt: 1  Progress Description: Inband 
information or appropriate pattern now available. (8) ]

So the Asterisk - DAHDI - PRI part works. The problem is in the fact
Asterisk responds with a TRYING to the empty INVITE. It should respond
with a SIP 484 (Address Incomplete) the let the IAD know more input is
required.

The reason for me asking is
http://svnview.digium.com/svn/asterisk/team/oej/sip-compliance/asterisk-sip.txt
which mentions:

3. PSTN Internetworking
---
...
- RFC 4497: Interworking between the Session Initiation Protocol and QSIG
Supported

I can't seem to find any other references to rfc 4497 and Asterisk.

Is this setup possible or should I just emulate it with DISA or simply
configure the IAD to collect the digits and just bear with the
numbercomplete timeout (which is always either to short or to long and
users don't seem to remember terminating with a # will speedup dialing).

The IAD used to test is a Patton SmartNode 4638 (running the older
SmartWare 5.2) and an old fashioned ISDN telephone. The Patton should be
able to work like requested.

-- 

   Daniel Tryba

--
_
-- 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] Prompt for PIN After dialing

2011-09-02 Thread Daniel Tryba
On Fri, Sep 02, 2011 at 11:14:57AM -0400, Brandon Phelps wrote:
 We would like to change our dialplan a bit so that after a user dials a 
 number (any number, including domestic, international, internal) Asterisk 
 firsts prompts the user for a PIN before actually allowing the call to go 
 through.
 
 I know I could setup an IVR that would accomplish this but I'd prefer not 
 to have the users first call an internal extension before they dial out.  I 
 want them to be able to dial the destination number directly, have asterisk 
 intercept and prompt for password, then either allow the call or play a 
 .gsm file and hangup if the PIN is incorrect.
 
 We are using AELs, and not the exten,x,x format.

Never used AEL myself but with the old format it should not be very
hard:

exten = _X.,n,Set(CDR(accountcode)=)
exten = _X.,n,Authenticate(something,a)
exten = _X.,n,GotoIf($[${CDR(accountcode)}  ]?dial:fail)
exten = _X.,n(dial),Dial(SIP/${EXTEN}@trunk)
exten = _X.,n,Hangup()
exten = _X.,n(fail),Playback(notauthorized)
exten = _X.,n,Congestion()

Add prompts and maybe Answer where needed.

-- 

   Daniel Tryba

--
_
-- 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] Good, inexpensive wireless VOIP handsets ?

2011-09-02 Thread Daniel Tryba
On Sat, Aug 27, 2011 at 01:11:00PM +0100, David Woodhouse wrote:
http://www.voipsupply.com/siemens-gigaset-a580-ip 
 
 I bought a Siemens Gigaset C475IP at the beginning of this year.

Strange, I haven't been able to buy this phone for a about 2 years. It
was replaced with the A580.
 
 RFC2833 dialling is broken, because it has broken handling of RTP
[snip]
 I won't be buying another Gigaset, and wouldn't recommend them either.

And now I know why. The A580 supports INFO, can't remember is the C475IP
did. 

IMHO the Gigasets are good enough for home use (crappy interface, no
G726 support, reasonable voice quality), but an ATA has a better price
point (Linksys PAP2T with 2 cheap handsets). So far all SIP DECT
solutions I tried suck on some level. 

-- 

   Daniel Tryba

--
_
-- 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] Using voice modem as poor man's FXO in Asterisk 1.8

2011-03-02 Thread Daniel Tryba
On Wed, Mar 02, 2011 at 10:05:35AM +1000, Stuart Longland wrote:
 There's also regulatory requirements: here in Australia since I'm
 plugging into the PSTN, it needs to carry the ACMA's regulatory
 compliance mark.  So buying something from overseas isn't an option.
 It's less of an option for me as I do not possess a credit card, and so
 many companies out there seem to think we're born with them.  Thus
 ideally, I'm looking for where I can source one in my local area.

Take a look at something like a Linksys SPA3102. Some people told me
they managed to set this up as a SIP/PSTN gateway.
 
-- 

   Daniel Tryba

--
_
-- 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] Using voice modem as poor man's FXO in Asterisk 1.8

2011-03-01 Thread Daniel Tryba
On Mon, Feb 28, 2011 at 09:41:38PM +1000, Stuart Longland wrote:
 Indeed, most motherboards do come with Ethernet on board.  This one came
 with one gigabit Ethernet interface.  However, we needed another for a
 connection to an ADSL router (acting in bridged mode so we do the PPPoE
 directly).  Thus, a 10/100Mbps Ethernet card was installed to provide
 the second port needed.

You can free the PCI slot if you use VLANs on the internal interface
to seperate the internal and external traffic. This requires a switch
with vlan support, shouldn't could much more than $80.

-- 

   Daniel Tryba

--
_
-- 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] Two Asterisk machines for redundancy

2011-02-28 Thread Daniel Tryba
On Mon, Feb 28, 2011 at 02:24:23AM -0800, bilal ghayyad wrote:
 1) If I did modification on the configuration, how this will be
 applied to the other machine?

My solution was to create a rsync script to copy the configuration of
the primary server to the standby (every 15m).
 
 2) I am going to use E1s, so what is the method to be able to let the
 calls go for other Asterisk machine if first one is down (due to
 maintenance or upgrade)? Is there a switch or something can help in
 this?

Yes, there are E1 switches. I use this one:
http://www.oriontelecom.com/pro_switch/e1_switch/e1_failover_switch.html
I disabled the automatic failover detection though, a script that is run
when the standby becomes active switches the circuits from A to B or the
otherway around. 

An other way is to use an external E1 to SIP gateway. Cons are that they
are more expensive then Digium hardware and you still need more than 1
if you want to avoid this being a single point of failure. But they can
be more flexible in some setups (multiple active asterisk machines
connecting simulataniously)

-- 

   Daniel Tryba

--
_
-- 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] Carrying context from one server to another?

2011-02-24 Thread Daniel Tryba
On Thu, Feb 24, 2011 at 11:38:17AM +, Roger Burton West wrote:
 The relevant part of my setup is something like:
 
 SIP phones - local server - remote server - SIP-to-PSTN provider
 
 I want _some_ of the SIP phones on the local server to be able to get
 access to SIP-to-PSTN, but not all of them. The local-to-remote
 connection is IAX2 over VPN.

The way I would to this is by blocking them on the localserver (with
different contexts). An other solution would be to set prefixes on the
extension when dialing from local to remote and use these to filter, not
very elegant but works over any transport. I use this to do multitenant
billing on the remote server in places where I only want 1 IAX trunk.
Whether this is effective depends on your control of the local server.

-- 

   Daniel Tryba

--
_
-- 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] Dial command

2011-02-15 Thread Daniel Tryba
On Tue, Feb 15, 2011 at 01:06:16PM +, ayodele abejide wrote:
 I want to trunk outbound calls through a sip provider to PSTN, and i
 want to write a script to parse the PSTN numbers, so when say
 extension 100 is dialled it just starts to dial PSTN numbers through
 the SIP provider, so it justs an automated dialer.

It seems your are looking for the AGI command. Where you can write a
script to build a multi device dial (eg Dial(SIP/123@fooSIP/234@bar))
depending on the dialed number. Take a look at
http://www.voip-info.org/wiki/view/Asterisk+AGI and get an AGI class for
your favorite scripting language.

-- 

   Daniel Tryba

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


  1   2   >