Re: [asterisk-users] Problem with OPTIONS requests.

2020-07-17 Thread Tony Mountifield
In article ,
John Kiniston  wrote:
> 
> I'm implementing a SBC with my Asterisk PBX but the keeps disabling the
> trunk group I've configured and I think it may be because Asterisk is
> returning a 4r04 to the OPTIONS.
> 
> I've created a test context and have put in a wildcard pattern match to try
> and catch those options but it doesn't seem to work.
> 
> Is there a way to have asterisk respond with an 200 OK instead of a 404?

I think I found in the past that your dialplan needs an 's' extension in the
default context for the sip entry, for OPTIONS to return a 200 instead of 404.

It doesn't matter what the 's' extension does, so it can just call Hangup.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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

Re: [asterisk-users] problem with logger: syslog vs. file

2020-06-03 Thread Tony Mountifield
In article <88f96e46-e6bb-a7ef-bebb-5588ef6cd...@gmx.ch>,
Fourhundred Thecat <400the...@gmx.ch> wrote:
>  > On 2020-06-02 17:48, Tony Mountifield wrote:
> > In article <94191802-6c9c-bdab-615b-001786a2a...@gmx.ch>,
> > Fourhundred Thecat <400the...@gmx.ch> wrote:
> >>   > On 2019-11-16 03:29, Fourhundred Thecat wrote:
> 
> >>
> >> case LOGTYPE_SYSLOG:
> >>   snprintf(buf, size, "%s[%d]%s: %s:%d in %s: %s",
> >>levels[msg->level], msg->lwp, call_identifier_str,
> >> msg->file, msg->line, msg->function, msg->message);
> >>   term_strip(buf, buf, size);
> >>   break;
> >>
> >> case LOGTYPE_FILE:
> >>   snprintf(buf, size, "[%s] %s[%d]%s %s: %s",
> >> msg->date, msg->level_name, msg->lwp,
> >> call_identifier_str, msg->file, msg->message);
> >>   term_strip(buf, buf, size);
> >>   break;
> >>
> >>
> >> so basically, it is hardcoded that logging to syslog adds extra
> >> msg->line and msg->function.
> >>
> >> why would anybody do that ?
> >>
> >> This seems to me like a very unfortunate decision.
> >> Is there a reason for this ?
> >> Am I missing something?
> >
> > But someone with a different opinion than yours might well say "Why did
> > they decide to omit the line number and function from the file logging?
> > It's very useful information!"
> >
> > The beauty of open source is of course that if you feel strongly enough,
> > you can modify the source file before you build it, so it shows just
> > what you want.
> 
> I know I can patch asterisk and compile myself. I did it in the past,
> and it is tedious to keep own patches and manage own packages. Its last
> resort for me.
> 
> Anyway, I am asking weather there is a reason why this particular
> decision was taken. To me perosnally it seems like idiocy, but I am not
> developer and maybe I am missing something.

I have no idea, I'm not part of Asterisk development. I suspect that each
logging type was added separately by different people, and it just happened.

> If I am right, and this is a bug, then I would like to suggest this
> should be fixed.

I would agree that the fact the two logging types show different information
is a bug, and you could report it at https://issues.asterisk.org/

However, the conversation would then be: should both logging types include
line number and function? should both logging types omit them? should
it be a configuration option in logger.conf whether they include or omit?
if so, what should the default be, if not specified in logger.conf?

> I am grateful for asterisk, and I want to help improve, even if in a
> small way.

Indeed!

Cheers
Tony

-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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

Re: [asterisk-users] problem with logger: syslog vs. file

2020-06-02 Thread Tony Mountifield
In article <94191802-6c9c-bdab-615b-001786a2a...@gmx.ch>,
Fourhundred Thecat <400the...@gmx.ch> wrote:
>  > On 2019-11-16 03:29, Fourhundred Thecat wrote:
> > Hello,
> >
> > I am logging directly into file and also to syslog.
> > Here is snippet from my /etc/asterisk/logger.conf:
> >
> >   messages => notice,warning,error,verbose
> > syslog.local0 => notice,warning,error,verbose
> >
> > But the logs look different:
> >
> >VERBOSE[7609][C-0013]  pbx.c:
> >NOTICE[3042] chan_sip.c: Peer '' is now UNREACHABLE!
> >
> > vs.
> >
> >VERBOSE[7609][C-0013]: pbx.c:2925 in pbx_extension_helper:
> >NOTICE[3042]: chan_sip.c:30421 in sip_poke_noanswer: Peer '8884' is
> > now UNREACHABLE!
> >
> > specifically, the messages coming from syslog have extra debugging
> > information (which I am not interested in):
> >
> >pbx.c:
> >chan_sip.c:
> >
> > vs .
> >
> >pbx.c:2925 in pbx_extension_helper:
> >chan_sip.c:30421 in sip_poke_noanswer:
> >
> > Why are same log level settings producing different logs?
> >
> > This is just making the log lines longer and less readable. It is just
> > bombarding me with useless information. I don't have debug set, so why
> > am I getting debug information? Who cares on which line in the .c file
> > the function is defined ?
> 
> I have reported the above problem twice, but unfortunately did not
> receive any feedback at all.
> 
> I believe I have now finally pinpointed the exact place in source code,
> where this is coming from. main/logger.c:
>   break;
> 
> 
> case LOGTYPE_SYSLOG:
>  snprintf(buf, size, "%s[%d]%s: %s:%d in %s: %s",
>   levels[msg->level], msg->lwp, call_identifier_str,
> msg->file, msg->line, msg->function, msg->message);
>  term_strip(buf, buf, size);
>  break;
> 
> case LOGTYPE_FILE:
>  snprintf(buf, size, "[%s] %s[%d]%s %s: %s",
>msg->date, msg->level_name, msg->lwp,
> call_identifier_str, msg->file, msg->message);
>  term_strip(buf, buf, size);
>  break;
> 
> 
> so basically, it is hardcoded that logging to syslog adds extra
> msg->line and msg->function.
> 
> why would anybody do that ?
> 
> This seems to me like a very unfortunate decision.
> Is there a reason for this ?
> Am I missing something?

I agree with you that it is strange the two logging types are different.

But someone with a different opinion than yours might well say "Why did
they decide to omit the line number and function from the file logging?
It's very useful information!"

The beauty of open source is of course that if you feel strongly enough,
you can modify the source file before you build it, so it shows just
what you want.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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

Re: [asterisk-users] Perl AGI: read variable with quotes

2020-01-24 Thread Tony Mountifield
In article <20200124154749.46da5...@go.imp.ch>,
Benoit Panizzon  wrote:
> Hi Gang
> 
> I have stumbled of this problem.
> 
> I need the P-Asserted-Identity header in an AGI scrip.
> 
> In the Dial-Plan I do:
> 
> same => n,Set(PAI=${PJSIP_HEADER(read,P-Asserted-Identity)})
> 
> In the AGI I do:
> 
> my $pai = $AGI->get_variable(PAI);
> 
> This works fine, unless the PAI contains quotes:
> 
> P-Asserted-Identity: 
> 
> I get "" in the variable $pai.
> 
> P-Asserted-Identity: "John Doe" 
> 
> Is getting me $pai containing just "John".
> 
> Anyone a clue how I could get the whole header?

First you need to identify whether the problem is in the Set()
or in the $AGI->get_variable(PAI) (shouldn't that be ("PAI")?)

Add a line to your dialplan just after the line you quoted:

same => n,NoOp(PAI=${PAI})

Then turn on verbose logging and try the call. Look at the logged
NoOp line and see if it contains just the 'John' or the whole value
'"John Doe" '

If it contains the whole value, then the problem is in the AGI library
reading the variable. If it just contains John, the problem is in the
Set() operation in the dialplan.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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

Re: [asterisk-users] pre-dial handler, how to access variables from calling channel?

2019-11-15 Thread Tony Mountifield
In article <20191115150532.53eb1...@go.imp.ch>,
Benoit Panizzon  wrote:
> Hi List
> 
> Implementing screening and routing I have stumbled over this issue:
> 
> [pbx-router]
> exten => s,1,NoOp(ROUTER FROM: ${CALLERID(Number)}  TO: ${DESTINATION})
> same => n,Set(SOURCE=${CHANNEL(name)})
> same => n,Set(PAI=${PJSIP_HEADER(read,P-Asserted-Identity)})
> 
> 
> But I have not yet found any 'easy' way to pass the corrected ${PAI}
> Variable to the callee channel.

Try changing PAI to __PAI when setting:

same => n,Set(__PAI=${PJSIP_HEADER(read,P-Asserted-Identity)})

When setting a variable, if you prepend a single underscore, e.g. "_PAI",
the variable will be inherited by any channels created by the current
channel (child channels), but will not be inherited further (it is
effectively created as "PAI", which is then non-inheritable).

If you prepend two underscores, e.g. "__PAI", the variable will be inherited
by child channels, and will then be further inherited by grandchild channels
and so on (it is effectively created as "__PAI" each time).

You don't need to speficy the __ when reading the variable, just use ${PAI}
as before.

See https://wiki.asterisk.org/wiki/display/AST/Variable+Inheritance

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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

Re: [asterisk-users] possible bug in Asterisk 16

2019-11-06 Thread Tony Mountifield
In article <4fb12839-c24c-bd27-51f9-2d85a4bff...@gmx.ch>,
Fourhundred Thecat <400the...@gmx.ch> wrote:
> Hello,
> 
> I am experiencing weird problem in Asterisk 16.2, possibly a bug. Same
> thing works fine in Asterisk 11. Here is the situation:
> 
> I have 2 extensions on 2 phones. 4 extensions in total.
> 
> phone 1:
>  8882
>  8382
> 
> phone 2:
>  8884
>  8384
> 
> And I have 2 SIP trunks for outgoing calls. I want to call via SIP1 when
> called via 8882 or 8884, and SIP2 when called via 8382 or 8384.
> 
> And one last detail. SIP1 has caller ID spoofing enabled (used for call
> forwarding), so for outgoing calls, I have to explicitly set caller ID,
> otherwise 8882/8884 would be shown.
> 
> Here is my config:
> 
>   exten => _0./_888[24],1,Verbose(0,EXTERNAL CALL)
>   same => n,Macro(record)
>   same => n,Set(CALLERID(num)=044111)
>   same => n,DIAL(SIP/044111/${EXTEN})
>   same => n,Hangup()
> 
>   exten => _0./_838[24],1,Verbose(0,EXTERNAL CALL)
>   same => n,Macro(record)
>   same => n,DIAL(SIP/044222/${EXTEN})
>   same => n,Hangup()
> 
> Now here the problem. The combination of /_888[24] and
> Set(CALLERID(num)=044111) causes problems:
> 
> sent to invalid extension but no invalid handler:
> context,exten,priority=fullaccess,079333,4
> 
> When I comment the line Set(CALLERID, everything works.
> Or when i change the first line to:
> 
>   exten => _0.,1,Verbose(0,EXTERNAL CALL)
> 
> Everything works as well. Only the combination of both
> /_888[24] and Set(CALLERID(num)=044111) causes problems:
> 
> can anybody understand what is happening here ?

Yes, I think so. Let's rewrite your first section as it is stored internally,
without the "same" and "n" shortcuts:

exten => _0./_888[24],1,Verbose(0,EXTERNAL CALL)
exten => _0./_888[24],2,Macro(record)
exten => _0./_888[24],3,Set(CALLERID(num)=044111)
exten => _0./_888[24],4,DIAL(SIP/044111/${EXTEN})
exten => _0./_888[24],5,Hangup()

Notice that all steps match both destination number and source caller-ID.
When you get to step 4, you have just changed the source caller-ID to
044111, which no longer matches _888[24]

If you did this instead, it should work:

exten => _0./_888[24],1,Verbose(0,EXTERNAL CALL)
same => n,Macro(record)
same => n,Set(CALLERID(num)=044111)
exten => _0./044111,n,DIAL(SIP/044111/${EXTEN})
same => n,Hangup()

I've just done the above on my Asterisk 16 box, and the loaded dialplan
looks like this:

hp3*CLI> dialplan show testing
[ Context 'testing' created by 'pbx_config' ]
  '_0.' (CID match '044111') =>  4. DIAL(SIP/044111/${EXTEN})   
   [extensions.conf:883]
5. Hangup()   
[extensions.conf:884]
  '_0.' (CID match '_888[24]') =>  1. Verbose(0,EXTERNAL CALL)  
 [extensions.conf:880]
2. Macro(record)  
[extensions.conf:881]
3. Set(CALLERID(num)=044111)  
[extensions.conf:882]

-= 2 extensions (5 priorities) in 1 context. =-

Notice that the "n" converted to "4" correctly even though the extension 
changed.
I wasn't aware it would until I tried it.

Why your original version works fine in Asterisk 11 I don't know. Maybe the
handling of caller-ID changed.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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

Re: [asterisk-users] Delays on conferences

2019-10-17 Thread Tony Mountifield
In article ,
Marcelo Terres  wrote:
> 
> We are having a weird issue with conferences.
> 
> Let me explain:
> 
> A enters conference room.
> B enters conference room.
> 
> When B talks, A can listen it immediately. When A talks, took almost a
> second to B receives the audio.
> 
> Scenario:
> Asterisk 11 with meetme.
> CentOS 6/7, Dahdi 2.9/2.11
> 
> I know it is an old version, but we can't change it now. We are moving to
> Asterisk 16 next year, but currently that is our reality.
> 
> Any ideas of what could be causing this? Or any ideas of how to debug it?

What kind of channels are they? SIP? IAX? DAHDI?

What happens if you have 3 calls in the conference? In that case, when you
have a delay from one speaking, do both the others hear the delay, or just
one of them? That would determine whether the delay is on audio going to
Asterisk or from Asterisk.

Do you have internal_timing set in asterisk.conf?

What timing module are you using?

Does it always happen, or just sometimes?

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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

Re: [asterisk-users] Load issues using AGI

2019-09-24 Thread Tony Mountifield
In article ,
Jöran Vinzens  wrote:
> 
> @john, we using Perl. To see if it is a problem with the perl i had put an
> "exit 0" just at the first lines  so there is no logic done at the AGI.
> It's only the start up and return from AGI what produces the most of the
> load. Nevertheless, we will try what you just posted.

Even if you put "exit 0" at the top of the script, the perl interpreter will
still need to compile the whole script (and any modules it uses) before it
executes the "exit 0".

Try commenting out or removing the rest of the script.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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

Re: [asterisk-users] asterisk-users Digest, Vol 181, Issue 3

2019-09-05 Thread Tony Mountifield
In article <874506323.2924334.1567645810...@mail.yahoo.com>,
bilal ghayyad  wrote:
> 
>  Thank you a lot for your kindly help and reply. Actually it helped me a 
> lot.I was using _X. in the extensions.conf at
> the trunkinbound context.Can you advise me what is the difference between _X. 
> and s? In other words, when it is better
> to use s and when it is better to use _X.?
> Again, I am fully thanks for you.RegardsBilal

They do different things.

_X. will match any extension number beginning with a digit. This is what
you would normally use to match incoming calls that specify a number,
and is presumably what you have already.

s will only match is no extension number is given. This would be the case
for an analogue line, for example, or a SIP connection that didn't give
a destination number. It is also matched for OPTIONS requests used to
handle "qualify".

So in your [trunkinbound] context, just add a line like this:

exten => s,1,Hangup

And leave everything else in that context unchanged.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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

[asterisk-users] Who speaks the en_GB sounds?

2019-08-14 Thread Tony Mountifield
Who is the male voice artist who recorded the en_GB sounds for Asterisk?

Would be useful to know in case of the need to get additional matching
sounds recorded.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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

Re: [asterisk-users] ARI libraries?

2019-07-21 Thread Tony Mountifield
In article ,
Jean-Denis Girard  wrote:
> Le 20/07/2019 à 12:21, Tony Mountifield a écrit :
> > What is the bug with channel variables? Do you have a fix for it?
> 
> Channels variables caused an error, my fix is in aioswagger11/client.py
> (line 80) :
> elif param['paramType'] == 'body':
> <if not data:
> <data = {}
> <data[pname] = value
> >if isinstance(value, dict):
> >if data:
> >data.update(value)
> >else:
> >data = value
> >else:
> >raise TypeError("Parameters of type 'body'
> require dict input")
> 
> I know, I should fork and make a pull request...

Great, thanks!

Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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

Re: [asterisk-users] ARI libraries?

2019-07-20 Thread Tony Mountifield
In article <301a2e78-d490-3805-e30f-41b668aac...@sysnux.pf>,
Jean-Denis Girard  wrote:
> 
> Hi Tony,
> 
> Le 20/07/2019 à 06:29, Tony Mountifield a écrit :
> > Are there any other languages/libraries I should be considering?
> 
> Same here, after years of AGI / AMI, I recently made my first project
> using ARI on Asterisk-16. I love Python, and was disappointed to find
> that Python ARI looks abandoned. Then I found aioari
> (https://github.com/M-o-a-T/aioari), an asyncio version of Python ARI,
> which looked newer, and supported modern Python. Apart from a bug with
> channel variables, aioari works for me. Hope that helps.

Ah, cool, thank you! I see that project started off as a fork from ari-py.

What is the bug with channel variables? Do you have a fix for it?

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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

[asterisk-users] ARI libraries?

2019-07-20 Thread Tony Mountifield
Up till now, I have only used Asterisk versions 1.2, 10 and 11, on CentOS
4, 5 and 6, and have made extensive use of AMI and FastAGI connections to a
multi-threaded backend written in C.

For a new project, I am looking at trying Asterisk 16 with ARI, on CentOS 7.

I was looking at the various ARI libraries available, particularly the
ones for Python and Node.js in github.

I noticed that the files in the Python ARI project at 
https://github.com/asterisk/ari-py
are all over 5 years old and the version number is 0.1.3. Does that mean it
is abandoned, or that it is so stable it has not needed any updates during
that time?  Is it a good choice to use? Does it support all the ARI
features in Asterisk 16?

In contrast, https://github.com/asterisk/node-ari-client, the Node.js
client for ARI, saw its last commit only 7 months ago. Is this the
preferred solution nowadays?

Are there any other languages/libraries I should be considering?

Thanks for any advice!

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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

Re: [asterisk-users] Cannot originate to extension unless /etc/hosts is edited constantly?

2019-01-15 Thread Tony Mountifield
In article <018201d4acef$898a4b10$9c9ee130$@verishare.co.za>,
Stefan Viljoen  wrote:
> Hi Guys
> 
> I've run into a weird problem on Asterisk 13. Again something that worked 
> fine on 1.8 but is now broken on Asterisk 13.
> 
> I have an extension 3015. I'm trying to originate a recording playback call 
> on it via AMI by sending
> 
> Action: Originate
> ActionID: test
> Channel: SIP/3015
> Exten: 
> Context: local
> Priority: 1
> CallerID: 3015
> Account: recordinglisten
> ChannelID: abc
> OtherChannelID: def
> Variable: 
> CallLimit=3600,recfile=/var/spool/asterisk/monitor/1807/25/2507180836591192526,altfile=/var/spool/asterisk/monitor/archive/1807/25/2507180836591192526
> Async: true
> 
> My dialplan code:
> 
> exten=>,1,Answer()
> exten=>,n,NoOp(Requesting File ${recfile})
> exten=>,n,Set(${__recfile}=${recfile})
> exten=>,n,Set(${__altfile}=${altfile})
> exten=>,n,NoOp(Rec file set to ${recfile})
> exten=>,n,NoOp(Alt file set to ${altfile})
> exten=>,n,NoOp(Requesting Alt File ${altfile})
> exten=>,n,Set(__numbertarget=)
> exten=>,n(play),ControlPlayback(${recfile},2,6,4,8,5,9)
> exten=>,n(play2),ControlPlayback(${altfile},2,6,4,8,5,9)
> exten=>,n,hangup()
> 
> However, on sending the above to the AMI I get in the console of Asterisk 13:
> 
> [Jan 15 18:19:23] ERROR[10519]: netsock2.c:305 ast_sockaddr_resolve: 
> getaddrinfo("local", "(null)", ...): Name or service not known
> [Jan 15 18:19:23] WARNING[10519]: chan_sip.c:6316 create_addr: No such host: 
> local
> 
> and no recording playback takes place.
> 
> I've found that by editing /etc/hosts and adding
> 
> 172.56.4.11  local
> 
> where 172.56.4.11 is the phone SIP/3015's IP address, it works perfectly and 
> the recording starts playing once 3015 is answered.

What does your sip.conf look like? (without comments, e.g. grep -v '^;' 
sip.conf | grep -v '^$')

Particularly, do you have a separate section for each phone, e.g. [3015] ?

> On Asterisk 1.8 the above worked without having to constantly edit /etc/hosts 
> and having to constantly map and remap the one phone that is then capable of 
> playing back a recording.
> 
> This appears to be some kind of DNS / name resolution issue exclusive to 
> Asterisk 13 (for me) - how can I fix this, e. g. NOT get
> 
> [Jan 15 18:19:23] ERROR[10519]: netsock2.c:305 ast_sockaddr_resolve: 
> getaddrinfo("local", "(null)", ...): Name or service not known
> [Jan 15 18:19:23] WARNING[10519]: chan_sip.c:6316 create_addr: No such host: 
> local
> 
> and constantly having to edit /etc/hosts to get one of my phones (the one 
> tied to "local") to be able to play back a recording on Asterisk 13?
> 
> (This obviously is fatal anyway as I got lots of phones on which I want to 
> playback recordings and editing /etc/hosts for each phone is impossible if 
> two phones want to listen to different recordings at the same time- 
> /etc/hosts can only contain one "local").
> 
> How can I fix this?

I don't understand why it should be trying to look up the address of "local".
If you change your dialplan context to another name and refer to that name in
Context in your original request, does it try looking up this new name, or
still "local"?

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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

Re: [asterisk-users] Switched from Asterisk 1.8 to 13 - CDR ringtime now always zero (Joshua C. Colp)

2019-01-09 Thread Tony Mountifield
In article <009d01d4a7e0$af2e0a50$0d8a1ef0$@verishare.co.za>,
Stefan Viljoen  wrote:
> Regarding this I've read the specs linked to in detail, but I can find no 
> mention anywhere of any change that implies or
> states that no ring time will be recorded anymore in Asterisk 13 and that all 
> times in start and answer columns will now
> be equal for all calls.
> 
> Can this be because I nowhere use the Answer() application in my dialplan 
> when dialing out?

You shouldn't Answer() the originating channel before calling Dial() on it.
You should allow Dial() to propagate the answer, busy or other failure from
the destination channel back to the originating channel.

Is it possible that the setup part of the call (between initiation and answer)
is recorded in a separate CDR?

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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

Re: [asterisk-users] Recompiling Ast results in a binary with differing SHA256 sums?

2018-07-20 Thread Tony Mountifield
In article <007401d41e7a$edc7e190$c957a4b0$@verishare.co.za>,
Stefan Viljoen  wrote:
> Hi Guys
> 
> If I recompile Asterisk (on a Centos 7 test box, Asterisk 1.8.32.3) multiple
> times in a row, e. g. 
> 
> make clean;configure;make menuselect;make
> 
> I note that the asterisk binary in the /main folder in the source tree, has
> a different SHA256 hash each time I recompile Asterisk using the above
> commands.
> 
> I do not change anything on the system or in the menuselect configs for each
> run.
> 
> But each time the checksum for the "asterisk" binary is different.
> 
> Why is that? Shouldn't a freshly compiled binary off the same source, with
> no changes in the Asterisk menuselect, with nothing changed on the rest of
> the system, result each time in an IDENTICAL binary, down to the last byte?
> 
> Why am I getting a completely different "asterisk" ELF binary each time I
> recompile asterisk, according to checksum?
> 
> Can someone shed light...

Most likely there is a text string in there somewhere indicating the date or
time of compilation.

Why don't you save the binary, recompile, then compare the first binary with
the recompiled one? At the simplest level use "cmp -l". Or maybe convert
each binary to a hexdump with "hexdump -C", and then use diff or vimdiff
to compare them.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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

Re: [asterisk-users] AMI manager logins - omitting from logging output?

2018-06-07 Thread Tony Mountifield
In article <201806070119.51560.antony.st...@asterisk.open.source.it>,
Antony Stone  wrote:
> Hi.
> 
> Is there any way to eliminate AMI manager logins from the logging output 
> (without just turning the log level down and thereby losing lots of other 
> stuff 
> as well)?
> 
> I'm running Asterisk 13.14.1 as a backend service to LVS/IPVS, and using the 
> AMI login as the "service alive" check to see which backend servers are 
> available to take new commands.
> 
> This results in lots of
> 
> [Jun  7 00:15:19]   == Manager 'ServiceCheck' logged on from 10.100.42.254
> [Jun  7 00:15:19]   == Manager 'ServiceCheck' logged off from 10.100.42.254
> 
> entries appearing in the console whenever I'm doing something else on the 
> machine, which is pretty distracting.
> 
> Is there any way to tell AMI that I don't want it to log login attempts - or, 
> to put it another way, is there any way to tell the logger module to ignore 
> AMI?

Look in /etc/asterisk/manager.conf for the option "displayconnects = yes/no".

It can be set globally in [general] or individually in [ServiceCheck] (for 
example).

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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

Re: [asterisk-users] Dial to FastAGI application appears as 1-second CDR - how do I fix?

2018-06-02 Thread Tony Mountifield
In article <7d8dc02f-0fce-4d47-72d9-604994c33...@palosanto.com>,
Alex Villací­s Lasso  wrote:
> El 29/05/18 a las 05:24, Tony Mountifield escribió:
> > In article <3a005ff6-19a4-215b-4751-bee616ec7...@palosanto.com>,
> > Alex Villací­s Lasso  wrote:
> >> In my application, I am using AMI to run an Originate command between a 
> >> channel and a dialplan application (NOT a
> >> context). In my case, the application I want to invoke is FastAGI. The 
> >> Originate AMI command works correctly, but
> >> Asterisk generates a very
> >> short (0-1s) duration for the CDR that results from this call, regardless 
> >> of the time spent running the FastAGI
> >> application. I want the CDR duration to reflect the time spent in the 
> >> entirety of the call, as is normal for ordinary
> >> calls. What should I do? I
> >> am running Asterisk 11.25.3 .
> >
> > Are you using Local channels as the target channel?
>
> Yes, this is the standard way my application works.

OK, so it is likely to be the same problem as I encountered.

> > I found what I believe is an issue with CDR handling when masquerading 
> > Local channels, when I ported
> > one of my old applications from Asterisk 1.2.32 to 11.25.3. It was 
> > recording an incorrect CDR
> > for the setup part of the call, and none for the answered part. In 1.2.32 I 
> > was getting two CDRs,
> > one for the setup part and another for the answered part.
> >
> > I eventually tracked it down to ast_do_masquerade() in channel.c, and made 
> > the following change,
> > which corrected the CDR behaviour back to the same as what Asterisk 1.2 had 
> > done:
> > [...]
> I will try doing this change and recompiling to see what happens.

Cool, please let us know if it helps!

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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

Re: [asterisk-users] Dial to FastAGI application appears as 1-second CDR - how do I fix?

2018-05-29 Thread Tony Mountifield
In article <3a005ff6-19a4-215b-4751-bee616ec7...@palosanto.com>,
Alex Villací­s Lasso  wrote:
> In my application, I am using AMI to run an Originate command between a 
> channel and a dialplan application (NOT a
> context). In my case, the application I want to invoke is FastAGI. The 
> Originate AMI command works correctly, but
> Asterisk generates a very 
> short (0-1s) duration for the CDR that results from this call, regardless of 
> the time spent running the FastAGI
> application. I want the CDR duration to reflect the time spent in the 
> entirety of the call, as is normal for ordinary
> calls. What should I do? I 
> am running Asterisk 11.25.3 .

Are you using Local channels as the target channel?

I found what I believe is an issue with CDR handling when masquerading Local 
channels, when I ported
one of my old applications from Asterisk 1.2.32 to 11.25.3. It was recording an 
incorrect CDR
for the setup part of the call, and none for the answered part. In 1.2.32 I was 
getting two CDRs,
one for the setup part and another for the answered part.

I eventually tracked it down to ast_do_masquerade() in channel.c, and made the 
following change,
which corrected the CDR behaviour back to the same as what Asterisk 1.2 had 
done:

$ diff -u --show-c-function channel.c.orig channel.c
--- channel.c.orig  2017-09-19 17:03:38.0 +0100
+++ channel.c   2018-05-29 11:13:41.0 +0100
@@ -6864,7 +6864,9 @@ int ast_do_masquerade(struct ast_channel
} exchange;
struct ast_channel *clonechan, *chans[2];
struct ast_channel *bridged;
+#ifdef I_THINK_THIS_IS_WRONG /* Tony Mountifield, 2018-03-29. Removing this 
code fixes lost CDRs with masquerade */
struct ast_cdr *cdr;
+#endif
struct ast_datastore *xfer_ds;
struct xfer_masquerade_ds *xfer_colp;
struct ast_format rformat;
@@ -7035,10 +7037,12 @@ int ast_do_masquerade(struct ast_channel
ast_channel_tech_pvt_set(original, ast_channel_tech_pvt(clonechan));
ast_channel_tech_pvt_set(clonechan, t_pvt);

+#ifdef I_THINK_THIS_IS_WRONG /* Tony Mountifield, 2018-03-29. Removing this 
code fixes lost CDRs with masquerade */
/* Swap the cdrs */
cdr = ast_channel_cdr(original);
ast_channel_cdr_set(original, ast_channel_cdr(clonechan));
ast_channel_cdr_set(clonechan, cdr);
+#endif

/* Swap the alertpipes */
ast_channel_internal_alertpipe_swap(original, clonechan);
$

I didn't research what version this change appeared in, nor whether it has been 
subsequently fixed in
later versions of Asterisk. There was no point reporting it in Asterisk 11, as 
that was out of LTS
by the time I discovered it.

So you could try making the above changes to channel.c and see if it improves 
the CDRs for you.

Cheers
Tony

-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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

Re: [asterisk-users] Strange problem with PRI on 64-bit?

2018-04-04 Thread Tony Mountifield
In article <20180404133024.kpidrkuiyjoqd...@xorcom.com>,
Tzafrir Cohen  wrote:
> On Wed, Apr 04, 2018 at 11:28:33AM +0000, Tony Mountifield wrote:
> > In article 
> > ,
> > Richard Mudgett  wrote:
> > > 
> > > The libpri makefile doesn't install things for 64 bit systems in the right
> > > place [1] without your help.  You'll need to specify where to install the
> > > library on the command line for your system:
> > > 
> > > sudo make install libdir=/usr/lib64
> > > 
> > > 
> > > Richard
> > > 
> > > [1] https://issues.asterisk.org/jira/browse/PRI-100
> > 
> > Ah, thanks. I did in fact discover the following 64-bit libraries were
> > installed into /usr/lib instead of /usr/lib64:
> > 
> > 1. From DAHDI, libtonezone.so
> 
> dahdi-tools 2.11 now uses autoconf. It still installs to /usr/lib or is
> it an older version?

I compiled dahdi-linux-complete-2.11.1+2.11.1, by doing:

make
make install
make config
make -C tools install-config

In fact I did all the above with a DESTDIR=$DESTDIR appended to each line,
as I was building a binary bundle for system building.

Before doing so I also did:

mkdir -p $DESTDIR/etc/udev/rules.d $DESTDIR/etc/rc.d/init.d 
$DESTDIR/etc/sysconfig/network-scripts

Maybe that defeated autoconf, and made it default to /usr/lib?
If I had also done a mkdir $DESTDIR/usr/lib64 before building, maybe
autoconf would have found it?

But in any case, running ldconfig made everything get found:

[root@bridge05 ~]# ldconfig -p | fgrep -v lib64
552 libs found in cache `/etc/ld.so.cache'
libtonezone.so.2 (libc6,x86-64) => /usr/lib/libtonezone.so.2
libtonezone.so (libc6,x86-64) => /usr/lib/libtonezone.so
libpri.so.1.4 (libc6,x86-64) => /usr/lib/libpri.so.1.4
libpri.so (libc6,x86-64) => /usr/lib/libpri.so
    libasteriskssl.so.1 (libc6,x86-64) => /usr/lib/libasteriskssl.so.1
libasteriskssl.so (libc6,x86-64) => /usr/lib/libasteriskssl.so
[root@bridge05 ~]#

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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


Re: [asterisk-users] Strange problem with PRI on 64-bit?

2018-04-04 Thread Tony Mountifield
In article ,
Tony Mountifield  wrote:
> In article 
> ,
> Matt Fredrickson  wrote:
> > On Tue, Apr 3, 2018 at 4:38 PM, Tony Mountifield  wrote:
> > > In article 
> > > ,
> > > Matt Fredrickson  wrote:
> > >> That does seem quite odd.  If I remember right, those messages would
> > >> come up if it looked like the other end hadn't received a message when
> > >> it thought it should have.  I can't think of anything that would
> > >> particularly impact 64 bit systems versus 32 bit systems in that
> > >> domain (ISDN real time message timing, etc).  Are you sure there's
> > >> nothing else different (kernel version or something else like that)?
> > >> Maybe also run a patlooptest on the spans in question to make sure
> > >> that they're running cleanly.
> > >
> > > Hi Matt, thanks for the reply.
> > >
> > > Both the 32-bit and 64-bit were fresh installs of the latest CentOS 6.9 
> > > from
> > > online repositories using a kickstart build. I'm going to try installing 
> > > the
> > > 64-bit version again tomorrow to see if the problem re-appears, just to be
> > > certain it wasn't anything transient. I don't think there is anything 
> > > unclean
> > > about the spans, because they were running fine on CentOS 4 with the 
> > > versions
> > > I mentioned, and are now running well again with 32-bit CentOS 6.
> > 
> > Hey Tony,
> > 
> > The paylooptest recommendation wasn't necessarily about screening
> > hardware problems but weeding out that there weren't any potential
> > driver issues on the 64bit install.
> 
> Ok, sure. I assumed that DAHDI would have had a lot of use on 64-bit by now,
> especially since RHEL 7 is 64-bit only (although I believe CentOS 7 has been
> made available also in 32-bit).
> 
> I've just done a 64-bit rebuild again, so will do some tests.

... And this time, I am not getting the MDL errors that I was getting last time.
So it looks like 64-bit is ok (which is what I would expect!), the trunks must
have got into an unexpected state, and I didn't try hard enough to get them to
reset. I have now made several test calls in and out without problems.

So apologies for the false alarm, and I appreciate the feedback!

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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


Re: [asterisk-users] Strange problem with PRI on 64-bit?

2018-04-04 Thread Tony Mountifield
In article ,
Richard Mudgett  wrote:
> 
> The libpri makefile doesn't install things for 64 bit systems in the right
> place [1] without your help.  You'll need to specify where to install the
> library on the command line for your system:
> 
> sudo make install libdir=/usr/lib64
> 
> 
> Richard
> 
> [1] https://issues.asterisk.org/jira/browse/PRI-100

Ah, thanks. I did in fact discover the following 64-bit libraries were
installed into /usr/lib instead of /usr/lib64:

1. From DAHDI, libtonezone.so

2. From LibPRI, libpri.so

3. From Asterisk, libasteriskssl.so

I found that running "ldconfig" caused them all to be discovered:

[root@bridge05 ~]# ldd /usr/sbin/asterisk
linux-vdso.so.1 =>  (0x7ffc77ff9000)
libasteriskssl.so.1 => /usr/lib/libasteriskssl.so.1 (0x7efeae1d4000)
libc.so.6 => /lib64/libc.so.6 (0x7efeade4)
libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x7efeadaed000)
libz.so.1 => /lib64/libz.so.1 (0x7efead8d7000)
libm.so.6 => /lib64/libm.so.6 (0x7efead653000)
libsqlite3.so.0 => /usr/lib64/libsqlite3.so.0 (0x7efead3c4000)
libssl.so.10 => /usr/lib64/libssl.so.10 (0x7efead158000)
libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x7efeacd73000)
libdl.so.2 => /lib64/libdl.so.2 (0x7efeacb6f000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x7efeac952000)
libtinfo.so.5 => /lib64/libtinfo.so.5 (0x7efeac731000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x7efeac517000)
/lib64/ld-linux-x86-64.so.2 (0x7efeae3d6000)
libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x7efeac2d3000)
libkrb5.so.3 => /lib64/libkrb5.so.3 (0x7efeabfec000)
libcom_err.so.2 => /lib64/libcom_err.so.2 (0x7efeabde8000)
libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x7efeabbbc000)
libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x7efeab9b1000)
libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x7efeab7ae000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x7efeab58f000)
[root@bridge05 ~]# ldd /usr/sbin/dahdi_cfg
linux-vdso.so.1 =>  (0x7fff6cbaa000)
libtonezone.so.2 => /usr/lib/libtonezone.so.2 (0x7f862f74a000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x7f862f52d000)
libm.so.6 => /lib64/libm.so.6 (0x7f862f2a9000)
libc.so.6 => /lib64/libc.so.6 (0x7f862ef15000)
/lib64/ld-linux-x86-64.so.2 (0x7f862f97e000)
[root@bridge05 ~]# ldd /usr/lib/asterisk/modules/chan_dahdi.so
linux-vdso.so.1 =>  (0x7ffe8b1df000)
libtonezone.so.2 => /usr/lib/libtonezone.so.2 (0x7f54adde4000)
libpri.so.1.4 => /usr/lib/libpri.so.1.4 (0x7f54adb68000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x7f54ad94b000)
libc.so.6 => /lib64/libc.so.6 (0x7f54ad5b7000)
libm.so.6 => /lib64/libm.so.6 (0x7f54ad333000)
/lib64/ld-linux-x86-64.so.2 (0x7f54ae2d3000)
[root@bridge05 ~]#

So I assumed that all should be ok, otherwise the executables would fail to run
(I initially discovered this when dahdi_cfg couldn't find libtonezone).

Would there be any subtle issues with the 64-bit libraries being loaded
from /usr/lib instead of /usr/lib64?

Should Asterisk and DAHDI builds also be updated to use /usr/lib64 when
building on a 64-bit OS? Or the build instructions?

Regards
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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


Re: [asterisk-users] Strange problem with PRI on 64-bit?

2018-04-04 Thread Tony Mountifield
In article ,
Matt Fredrickson  wrote:
> On Tue, Apr 3, 2018 at 4:38 PM, Tony Mountifield  wrote:
> > In article 
> > ,
> > Matt Fredrickson  wrote:
> >> That does seem quite odd.  If I remember right, those messages would
> >> come up if it looked like the other end hadn't received a message when
> >> it thought it should have.  I can't think of anything that would
> >> particularly impact 64 bit systems versus 32 bit systems in that
> >> domain (ISDN real time message timing, etc).  Are you sure there's
> >> nothing else different (kernel version or something else like that)?
> >> Maybe also run a patlooptest on the spans in question to make sure
> >> that they're running cleanly.
> >
> > Hi Matt, thanks for the reply.
> >
> > Both the 32-bit and 64-bit were fresh installs of the latest CentOS 6.9 from
> > online repositories using a kickstart build. I'm going to try installing the
> > 64-bit version again tomorrow to see if the problem re-appears, just to be
> > certain it wasn't anything transient. I don't think there is anything 
> > unclean
> > about the spans, because they were running fine on CentOS 4 with the 
> > versions
> > I mentioned, and are now running well again with 32-bit CentOS 6.
> 
> Hey Tony,
> 
> The paylooptest recommendation wasn't necessarily about screening
> hardware problems but weeding out that there weren't any potential
> driver issues on the 64bit install.

Ok, sure. I assumed that DAHDI would have had a lot of use on 64-bit by now,
especially since RHEL 7 is 64-bit only (although I believe CentOS 7 has been
made available also in 32-bit).

I've just done a 64-bit rebuild again, so will do some tests.

Thanks
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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


Re: [asterisk-users] Audio Dropouts During Call

2018-04-03 Thread Tony Mountifield
In article <0ed7d81c-4507-0355-3dd7-cebd7b9a8...@texascountrytitle.com>,
Brent Davidson  wrote:
> 
> Well, I now have another office complaining of the audio drop-outs. Logs 
> are showing the same issues.  RTP just stops for awhile then resumes.
> 
> At the original problem office, I replaced all the network cables, 
> replaced two network hubs, and made sure the phones are all connected 
> correctly.  The problem still exists.
> 
> One thing I did notice during testing is that the audio is perfectly 
> fine as long as there is no internet traffic, but once there is internet 
> traffic, the audio quality drops drastically, then cuts out completely.  
> Once the internet traffic stops, there is about a 2 second lag, then the 
> audio resumes.
> 
> I find that incredibly odd as we don't use VOIP outside lines, and none 
> of the voice traffic should be passing through our firewall, router, or 
> DSL modem.
> 
> Internal network traffic, such as moving a file between shared folders 
> on 2 computers on the internal office network does not impact the audio 
> at all.  However, if I try to send a file across the VPN, refresh a web 
> page in the browser, or run a bandwidth test from either computer, the 
> audio goes glitchy then drops out until the traffic returns to normal.
> 
> Attached is a network diagram to show how both offices are set up. There 
> shouldn't be any reason for traffic that goes straight to the internet 
> to affect the internal VOIP traffic.  The Asterisk server only runs 
> Asterisk, Hylafax, and a Samba share for the workgroup copier/scanner to 
> save scanned files to.  It isn't doing DNS, or anything that would tax 
> it's resources.  The servers both have quad-core CPUs and 16 GB of ram.
> 
> I've tried switching codes between ulaw, alaw, and g.729 and the problem 
> persists at both offices.
> 
> 
> Any ideas?

I looked at your network diagram. Try checking the configuration of the
Ethernet ports on the firewall and the Asterisk box. Make sure they are
set to auto-negotiate and not set to a fixed speed and fixed duplex.
I have found in the past that if one end of a link is expecting auto-
negotiation (as the switches probably are) and the other end is expecting
a fixed configuration, things can degrade to half-duplex trying to talk
to full-duplex, resulting in lots of collisions and packet loss when there
is any kind of significant traffic.

Your description would be consistent with the firewall introducing lots of
LAN collisions when busy, in the central gigabit switch, even if the VoIP
traffic isn't passing through the firewall.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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

Re: [asterisk-users] Strange problem with PRI on 64-bit?

2018-04-03 Thread Tony Mountifield
In article ,
Matt Fredrickson  wrote:
> On Tue, Apr 3, 2018 at 5:44 AM, Tony Mountifield  wrote:
> > I have some more investigation to do on this, but I wanted to see if anyone
> > here had any insight into the issue I've run into.
> >
> > The hardware is a HP DL360 G6 with a TE420 gen 5 4-port T1 PRI card. It is 
> > one
> > of several systems that have been running without issue since 2010/2011. 
> > They
> > have all been running CentOS 4 32-bit with Zaptel 1.4.12.1 (with patch for 
> > gen
> > 5 card), libpri 1.2.8 and asterisk 1.2.32.
> >
> > Having taken this particular system out of production, I updated it to 
> > CentOS
> > 6.9 32-bit, with DAHDI 2.11.1, LibPRI 1.6.0 and Asterisk 11.25.3 (this 
> > version
> > of Asterisk is required at the moment due to custom modifications).
> > This appears to work fine.
> >
> > In order to reduce the number of different versions we support, I 
> > reinstalled
> > the OS using the 64-bit version of CentOS 6.9 instead, and rebuilt, using
> > the same versions as above.
> >
> > However, for reasons I don't understand, the 64-bit version was logging
> > frequent PRI errors every few minutes:
> >
> > [Apr  1 03:40:52] VERBOSE[8989] chan_dahdi.c: PRI Span: 2 TEI=0 MDL-ERROR 
> > (A): Got supervisory frame with F=1 in state 7(Multi-frame established)
> > [Apr  1 03:40:58] VERBOSE[8988] chan_dahdi.c: PRI Span: 1 TEI=0 MDL-ERROR 
> > (A): Got supervisory frame with F=1 in state 7(Multi-frame established)
> > [Apr  1 03:44:06] VERBOSE[8990] chan_dahdi.c: PRI Span: 3 TEI=0 MDL-ERROR 
> > (A): Got supervisory frame with F=1 in state 7(Multi-frame established)
> > [Apr  1 03:46:38] VERBOSE[8990] chan_dahdi.c: PRI Span: 3 TEI=0 MDL-ERROR 
> > (A): Got supervisory frame with F=1 in state 7(Multi-frame established)
> > [Apr  1 03:47:20] VERBOSE[8988] chan_dahdi.c: PRI Span: 1 TEI=0 MDL-ERROR 
> > (A): Got supervisory frame with F=1 in state 7(Multi-frame established)
> > [Apr  1 03:47:24] VERBOSE[8989] chan_dahdi.c: PRI Span: 2 TEI=0 MDL-ERROR 
> > (A): Got supervisory frame with F=1 in state 7(Multi-frame established)
> >
> > This left the PRIs in strange states - trying to make a call failed with 
> > cause 101.
> >
> > So I re-installed the 32-bit OS again, and rebuilt, and the above MDL-ERRORs
> > were no longer present, and the system operated normally again.
> >
> > So my question is: does anyone have any clues why there would be a 
> > difference
> > in PRI behaviour between 32-bit and 64-bit builds? Has anyone else run into
> > anything similar?
> 
> 
> That does seem quite odd.  If I remember right, those messages would
> come up if it looked like the other end hadn't received a message when
> it thought it should have.  I can't think of anything that would
> particularly impact 64 bit systems versus 32 bit systems in that
> domain (ISDN real time message timing, etc).  Are you sure there's
> nothing else different (kernel version or something else like that)?
> Maybe also run a patlooptest on the spans in question to make sure
> that they're running cleanly.

Hi Matt, thanks for the reply.

Both the 32-bit and 64-bit were fresh installs of the latest CentOS 6.9 from
online repositories using a kickstart build. I'm going to try installing the
64-bit version again tomorrow to see if the problem re-appears, just to be
certain it wasn't anything transient. I don't think there is anything unclean
about the spans, because they were running fine on CentOS 4 with the versions
I mentioned, and are now running well again with 32-bit CentOS 6.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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


[asterisk-users] Strange problem with PRI on 64-bit?

2018-04-03 Thread Tony Mountifield
I have some more investigation to do on this, but I wanted to see if anyone
here had any insight into the issue I've run into.

The hardware is a HP DL360 G6 with a TE420 gen 5 4-port T1 PRI card. It is one
of several systems that have been running without issue since 2010/2011. They
have all been running CentOS 4 32-bit with Zaptel 1.4.12.1 (with patch for gen
5 card), libpri 1.2.8 and asterisk 1.2.32.

Having taken this particular system out of production, I updated it to CentOS
6.9 32-bit, with DAHDI 2.11.1, LibPRI 1.6.0 and Asterisk 11.25.3 (this version
of Asterisk is required at the moment due to custom modifications).
This appears to work fine.

In order to reduce the number of different versions we support, I reinstalled
the OS using the 64-bit version of CentOS 6.9 instead, and rebuilt, using
the same versions as above.

However, for reasons I don't understand, the 64-bit version was logging
frequent PRI errors every few minutes:

[Apr  1 03:40:52] VERBOSE[8989] chan_dahdi.c: PRI Span: 2 TEI=0 MDL-ERROR (A): 
Got supervisory frame with F=1 in state 7(Multi-frame established)
[Apr  1 03:40:58] VERBOSE[8988] chan_dahdi.c: PRI Span: 1 TEI=0 MDL-ERROR (A): 
Got supervisory frame with F=1 in state 7(Multi-frame established)
[Apr  1 03:44:06] VERBOSE[8990] chan_dahdi.c: PRI Span: 3 TEI=0 MDL-ERROR (A): 
Got supervisory frame with F=1 in state 7(Multi-frame established)
[Apr  1 03:46:38] VERBOSE[8990] chan_dahdi.c: PRI Span: 3 TEI=0 MDL-ERROR (A): 
Got supervisory frame with F=1 in state 7(Multi-frame established)
[Apr  1 03:47:20] VERBOSE[8988] chan_dahdi.c: PRI Span: 1 TEI=0 MDL-ERROR (A): 
Got supervisory frame with F=1 in state 7(Multi-frame established)
[Apr  1 03:47:24] VERBOSE[8989] chan_dahdi.c: PRI Span: 2 TEI=0 MDL-ERROR (A): 
Got supervisory frame with F=1 in state 7(Multi-frame established)

This left the PRIs in strange states - trying to make a call failed with cause 
101.

So I re-installed the 32-bit OS again, and rebuilt, and the above MDL-ERRORs
were no longer present, and the system operated normally again.

So my question is: does anyone have any clues why there would be a difference
in PRI behaviour between 32-bit and 64-bit builds? Has anyone else run into
anything similar?

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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


Re: [asterisk-users] DIALSTATUS vs HANGUPCAUSE

2018-03-14 Thread Tony Mountifield
In article ,
Patrick Wakano  wrote:
> 
> Thanks Dovid!
> Indeed looks a bug but regardless of this, this problem made me think that
> the HANGUPCAUSE could be used for this purpose with benefits.
> I couldn't find an explanation about when DIALSTATUS would actually be
> better.
> The HANGUPCAUSE was reworked in version 11 (
> https://wiki.asterisk.org/wiki/display/AST/Hangup+Cause) but I didn't find
> someone actually stating it is a better alternative or replacement to the
> DIALSTATUS or something similar.

I think you should always check DIALSTATUS, as that will be set regardless of
the way in which a dial fails. I believe HANGUPCAUSE is set to the Q.931 code
received from PRI or SIP when a call is rejected or terminated. However, there
could be other mechanisms for failure (such as failure to create a channel
within Asterisk, or an attempt to send to an unreachable peer), that may set
DIALSTATUS without setting HANGUPCAUSE.

So HANGUPCAUSE should be considered as extra detail, rather than a replacement
or alternative to DIALSTATUS.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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


Re: [asterisk-users] SIP trunks going to the wrong context

2017-12-14 Thread Tony Mountifield
In article <1513290358.2926.4.ca...@linuxista.com>,
Frank Vanoni  wrote:
> I don't know if it applies to your problem, but I also had some
> troubles with multiple account on same SIP provider. 
> Here what works for me:
> 
> 
> In sip.conf:
> 
> 
> register => 11:qwe...@sip.provider.zz/11 ; Trunk1
> register => 22:asd...@sip.provider.zz/22 ; Trunk2
> register => 22:yxc...@sip.provider.zz/22 ; Trunk3
> 
> 
> [trunk1]
> type=friend
> host=sip.provider.zz
> defaultuser=11
> secret=qwertz
> canreinvite=no
> insecure=invite
> nat=force_rport,comedia
> qualify=yes
> context=trunkincoming
> description=Trunk 1
> 
> [trunk2]
> type=friend
> host=sip.provider.zz
> defaultuser=22
> secret=asdfgh
> canreinvite=no
> insecure=invite
> nat=force_rport,comedia
> qualify=yes
> context=trunkincoming
> description=Trunk 2
> 
> [trunk3]
> type=friend
> host=sip.provider.zz
> defaultuser=33
> secret=yxcvbn
> canreinvite=no
> insecure=invite
> nat=force_rport,comedia
> qualify=yes
> context=trunkincoming
> description=Trunk 3
> 
> 
> 
> In extensions.conf:
> 
> [trunkincoming]
> exten => 11,1,GoTo(firstline,11,1)
> exten => 22,1,GoTo(secondline,22,1)
> exten => 33,1,GoTo(thirdline,33,1)
> 
> [firstline]
> exten => 11,1,Dial(SIP/officephone,120,m)
> 
> [secondline]
> exten => 22,1,Dial(SIP/livingroomphone,120,m)
> 
> [thirdline]
> exten => 33,1,Dial(SIP/bedroomphone,120,m)

But because you have all three of your trunk peers pointing to the
same context, you don't necessarily know whether the inbound calls
are matching different peers or all the same one.

If you had each trunk pointing at a different context, you would
probably run into the same problem as the OP.

Cheers,
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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

Re: [asterisk-users] SIP trunks going to the wrong context

2017-12-14 Thread Tony Mountifield
hing the [string]
that names the peer.

Otherwise, when Asterisk is looking for a matching peer section, I believe
it only matches on the host from which the call comes. So when your call
comes in from sipgate.co.uk, that is the only piece of information it uses,
and so it always matches the first one, irrespective of the registration
that originated the call.

So I think you really do need to have a single peer section for all sipgate
calls, pointing to one sipgate context in your dialplan that contains all
your various extensions like se2489, sj0151, etc.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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

Re: [asterisk-users] ERROR during high volume MoH dialplan

2017-09-01 Thread Tony Mountifield
In article 
,
Joseph Smith  wrote:
> 
> Thanks for the feedback.
> 
> I do agree with having multiple smaller servers.  When I was first approached 
> with this task I mentioned as much. 
> However, the current desire is to work with already existing hardware.  That 
> is out of my hands at the moment unless it
> just can't be done.  I will explore Freeswitch a bit soon to compare it as 
> well.
> 
> 
> I am struggling to find what the bottle neck is in this scenario.  Does 
> anyone have any advice on what that could be or
> on steps to discover it?   Do you think that tasks are pooling up because of 
> transcoding?  If so would it help to change
> the codec that is being used?  I am not sure about the MoH but the audio 
> files I am using are gsm.

You will find it less taxing on the server if you have MoH files and sounds 
files
available in all the possible native formats. Then Asterisk can use the 
appropriate
one for the channel without transcoding.

On my systems I have MoH and sounds installed in wav, ulaw, alaw, gsm and g729.

They will also sound better than transcoding from the gsm versions.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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


Re: [asterisk-users] IAX port 4569

2017-06-06 Thread Tony Mountifield
In article <87af2f00-9973-f338-1cbc-9ce0a5bf7...@sys-concept.com>,
  wrote:
> Doesn't matter how much I increase the verbose output
> asterisk -vvr
> asterisk will not even print a single line.

Check the settings in /etc/asterisk/logger.conf, for example:

...
;debug => debug
;security => security
;console => notice,warning,error
;console => notice,warning,error,debug
console => notice,warning,error,debug,verbose(5)
messages => notice,warning,error
full => notice,warning,error,debug,verbose,dtmf,fax
...

If you don't have verbose listed for console, then AFAIK, you won't
see verbose messages however many -v options you give it!

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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


Re: [asterisk-users] OT: Want to capture all SIP messages

2017-06-01 Thread Tony Mountifield
In article ,
Steve Edwards  wrote:
> On Wed, 31 May 2017, 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?
> 
> A little more specificity...
> 
> I'd like the capture to be in a series of files that can be 'rotated' or 
> 'aged out' so that I can always have x days of traffic on hand but not 
> have to prune the files to keep the storage requirements reasonable.

On most of my systems I have a script sip-capture:

---
#!/bin/sh

DATE=`date '+%Y%m%d-%H%M%S'`
FILE=sip-`hostname -s`-$DATE.pkt

cd /var/tmp

tcpdump -C 8 -i any -n -p -s 0 -w $FILE udp port 5060 /dev/null 
2>&1 &
---

I start it in /etc/rc.d/rc.local for want of anywhere better.

Being in /var/tmp, cron.daily/tmpwatch deletes files older than 30 days.
I could just have easily put them somewhere else and used the -W option
to tcpdump to remove old files on a rolling basis.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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


Re: [asterisk-users] Automatically dial a number, then an extension

2017-05-15 Thread Tony Mountifield
In article <004201d2cd90$cad754e0$6085fea0$@us>,
Tech Support  wrote:
> 
> I have an application that dials a list of numbers and then plays a
> recorded message. My customer uses it to dial a list of customers to confirm
> their appointment for the next day. No biggie, maybe 25 - 30 calls per day
> for customers who want the confirmation call. What they need now is a way to
> dial an extension after the number is dialed and answered. I've seen that
> before, but I just can't remember where. I was wondering if anyone else has
> implemented something along these lines. Any insight at all would be greatly
> appreciated.
> 
> Thanks Much;
> 
> John V.   

That depends on how you are playing the message. If you are doing an Originate,
either via the AMI or via a call file, then you dial the outbound call using
the Channel parameter, and when the call is answered, it gets attached to the
dialplan segment given by your Context, Extension and Priority parameters.

The dialplan segment at its simplest could be something like this:

[myplaycontext]
exten => s,1,Playback(${MESSAGE})
exten => s,n,Hangup

You would give:
Context: myplaycontext
Extension: s
Priority: 1

You would need to supply the message filename in the variable MESSAGE in the
AMI command or call file (maybe you need _MESSAGE or __MESSAGE when setting).

But you can make it more complex, and could do something like:

[myplaycontext]
...
exten => _X!,1,Wait(3)
exten => _X!,n,SendDTMF(${EXTEN})
exten => _X!,n,Wait(5) ; how long???
exten => _X!,n,Playback(${MESSAGE})
exten => _X!,n,Hangup

So if your recipient has an extension number configured, instead of giving s as
the Extension, you give the extension number.

Alternatively, you could supply the DTMF to be dialled in a channel variable.

The problem you will have is that, while for direct lines, you know when to
start playing the message, as you can tell when the line has been answered,
when dialling an extension number on the answering PBX, you have no way of
telling when that extension has been answered and it is safe to play the 
message.
That is why I added the comment "how long???", as it is just a guess.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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


Re: [asterisk-users] asterisk name in mysql

2017-04-24 Thread Tony Mountifield
In article ,
Atux Atux  wrote:
> 
> Thanks a lot for the reply.
> I did follow that already, but i do have a problem. Here is my
> extensions.conf part for that particular number
> exten => 6912345678,1,Answer()
> exten => 6912345678,n,MYSQL(Connect connid 127.0.0.1 root mypasswd asterisk)
> exten => 6912345678,n,MYSQL(Query resultid ${connid} SET NAMES utf8)
> exten => 6912345678,n,GotoIf($["${connid}" = ""]?nodb)
> exten => 6912345678,n,MYSQL(Query resultid ${connid} SELECT displayname
> FROM root WHERE phonenumber="${CALLERID(num)}" LIMIT 1)
> exten => 6912345678,n,MYSQL(Fetch fetchid ${resultid} displayname)
> exten => 6912345678,n,MYSQL(Clear ${resultid})
> exten => 6912345678,n,Set(CALLERID(name)=${displayname})
> exten => 6912345678,n,MYSQL(Disconnect ${connid})
> exten => 6912345678,n(nodb),NoOp(DoneDB)
> exten => 6912345678,n,Dial(SIP/450&SIP/451,20)
> exten => 6912345678,n,VoiceMail(450@Office,su)
> exten => 6912345678,n,Busy(3)
> 
> 6912345678 is my DID
> 
> 
> and here is the error i am getting
> [Apr 22 23:20:29] WARNING[9725][C-0002]: pbx.c:4991
> pbx_extension_helper: No application 'MYSQL' for extension (IncomingDial,
> 6951921078, 2)
>   == Spawn extension (DialIn, 6912345678, 2) exited non-zero on
> 'Dongle/dongle0-010002'

That means that your copy of asterisk does not have the "app_mysql" module.
If you compiled asterisk yourself, you need to go into menuselect and make
sure app_mysql is selected, and then recompile.

You will probably find app_mysql under "Addons".

If it does not let you select app_mysql, you will need to install the mysql
development package (e.g. mysql-devel) to get the headers and libraries.

Cheers
Tony

-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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


Re: [asterisk-users] Asterisk dahai install centos 7

2016-12-10 Thread Tony Mountifield
In article ,
christopher kamutumwa  wrote:
> 
> Package kernel-devel-3.10.0-327.36.3.el7.x86_64 already installed and
> latest version but i still receive the same error
> 
> [root@localhost dahdi-linux-complete-2.11.1+2.11.1]# make
> make -C linux all
> make[1]: Entering directory `/usr/src/dahdi-linux-
> complete-2.11.1+2.11.1/linux'
> make -C drivers/dahdi/firmware firmware-loaders
> make[2]: Entering directory `/usr/src/dahdi-linux-
> complete-2.11.1+2.11.1/linux/drivers/dahdi/firmware'
> make[2]: Leaving directory `/usr/src/dahdi-linux-
> complete-2.11.1+2.11.1/linux/drivers/dahdi/firmware'
> You do not appear to have the sources for the 3.10.0-327.el7.x86_64 kernel
> installed.
> make[1]: *** [modules] Error 1

You need to make sure the kernel and kernel-devel packages are the same
version, and that you are running from the same kernel too (make sure
you rebooted after any update of the kernel).

The version of kernel-devel you have installed is: 3.10.0-327.36.3
The version of kernel-devel the makefile wants is: 3.10.0-327

The difference is significant, and suggests that you are actually
running an older kernel than the latest.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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


Re: [asterisk-users] What could be stopping "Disconnect Call" feature from working (set in features.txt)

2016-11-09 Thread Tony Mountifield
In article ,
Jonathan H  wrote:
> Thank you - that makes sense. I've seen something about swapping and
> optimizing channels on the console, but I didn't realise "optimize"
> meant "not do what you wanted".
> 
> OK, so here's why I'm dialling anything at all:
> 
> The first dial is because I MUST limit the incoming call to less than
> 60 minutes.
> 
> The second dial, which carries the gH option, is because I want
> someone to be able to listen to a radio stream
> 
> >From previous discussion here, it seems the only way to do that is the
> gH workaround above.
> 
> If I'm not missing a trick here and there's no better way to do those
> to things, is there any way to force Asterisk to NOT "optimize" those
> channels?

Yes, append /n to the local channel:

same => n,Dial(Local/s@dial-test/n,3,L(354:6))

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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


Re: [asterisk-users] Match one OR two digit extension not working as expected without using "dangerous" _. pattern (Ast 14)

2016-10-14 Thread Tony Mountifield
In article ,
Jonathan H  wrote:
> On 13 October 2016 at 13:18, Tony Mountifield  wrote:
> 
> > exten => _X,1,NoOp(Matching single digit)
> > exten => _X.,1,NoOp(Matching multiple digits)
> > exten => _X!,2,SayNumber(${EXTEN})
> > exten => _X!,3,Etc..
> 
> Thanks - I appreciate the idea, but it matches more than 2 digits.
> 
> But, thanks to your info, I cobbled together something that works, and
> matches only 1 or 2 digits in what I think is the most compact way, by
> sending a 1 digit extension to the 2 digit matcher, prefixed with a 0.
> Example which works:
> 
> [extentest]
> exten => s,1,Set(TIMEOUT(digit)=1)
> same => n,BackGround(extension)
> same => n,WaitExten(5)
> exten => _X,1,Goto(0${EXTEN},1)
> exten => _XZ,1,SayNumber(${EXTEN})
> same => n,Goto(s,1)
> exten => e,1,Goto(s,1)
> 
> ***HOWEVER*** Do I need to report a bug?
> 
> Either:
> 
> A: All the documentation is wrong and ". (period) Wildcard match;
> matches one or more characters" is NOT actually how Asterisk works.
> or
> B: The documentation is correct and Asterisk's "one of more character
> matching" routine is wrong
> or
> C: I've completely misunderstood what "matches one of more characters" means 
> :)
> 
> What's the consensus? Thanks!

As I understand it, there are two different functionalities overloaded
on the operators.

1. The . in a pattern will match one or more digits, but only when
WaitExten has exited due to the digit timeout. Even if the number
being collected would match the ., it does not do so until Asterisk
decides no more digits will be entered.

2. The ! in a pattern will match zero or more digits, and will also
cause WaitExten to be satisfied as soon as it can match the pattern,
without waiting for more digits.

It's a pity that the choice between one-or-more and zero-or-more is
overloaded with wait-for-dialling-pause and match-immediately, rather
than being selectable independently. But it's been like that ever since
! was introduced, probably over 10 years ago.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
  http://www.asterisk.org/community/astricon-user-conference

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] Match one OR two digit extension not working as expected without using "dangerous" _. pattern (Ast 14)

2016-10-13 Thread Tony Mountifield
In article ,
Jonathan H  wrote:
> Back to basics here. I want to match on one OR two digits.
> 
> The following two both work, but ONLY for more than one digit, which
> is not as expected from the docs (see below).
> 
> exten => _X.,1,SayNumber(${EXTEN})
> exten => _[0-9].,1,SayNumber(${EXTEN})
> 
> 
> This next one will ONLY match 2 digits, as expected, but the first two
> SHOULD match one or more, right?
> 
> exten => _XX,1,SayNumber(${EXTEN})
> 
> The following pattern works, but I thought it was "dangerous" and to
> be discouraged?
> exten => _.,1,SayNumber(${EXTEN})
> 
> So, again, if someone dials 1 and a one second delay passes, I want it to say 
> 1.
> If someone dials 1 then another 1 within a second then I want it to be
> 11, and 111 should be invalid.
> 
> (I've Set(TIMEOUT(digit)=1) )
> 
> Yes, I can do this with multiple lines, but the docs suggest this
> should be easily do-able in 1 line, and I don't want to double the
> amount of dialplan (there'll be a few of these!).

When matching an extension being dialled, Asterisk is only concerned
about priority 1, so that's the only priority you need to double.
You should be able to use ! safely in priority 2 upwards:

exten => _X,1,NoOp(Matching single digit)
exten => _X.,1,NoOp(Matching multiple digits)
exten => _X!,2,SayNumber(${EXTEN})
exten => _X!,3,Etc..

Disclaimer: I haven't tested this.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
  http://www.asterisk.org/community/astricon-user-conference

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] Multiple phones when one is unregistered

2016-09-01 Thread Tony Mountifield
In article <20160901070151.10ae4f26@imp>,
D'Arcy J.M. Cain  wrote:
> On Thu, 1 Sep 2016 11:02:57 +0200
> Administrator TOOTAI  wrote:
> > > [Aug 31 21:52:00] WARNING[-1][C-0001fed5] pbx.c: No application
> > > 'ExecIf' for extension (unauthenticated, 55, 3)
> > >
> > > Is there a module that I need to load?
> > >
> > > In case it matters I am running Asterisk 11.23.0 on NetBSD 7.0.  
> > 
> > What's the output of CLI command "core show application ExecIf" ?
> 
> It looks like this doesn't matter any more but I do wonder why I don't
> have that command.
> 
> # asterisk -x "core show application ExecIf"
> Your application(s) is (are) not registered
> Command 'core show application ExecIf' failed.
> 
> What module am I missing?

The ExecIf command is provided in the module app_exec, which is usually
located at /usr/lib/asterisk/modules/app_exec.so

Maybe you had turned off app_exec in the menuconfigi when building, or maybe 
your
modules.conf has a noload => app_exec.so

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
  http://www.asterisk.org/community/astricon-user-conference

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 trunk

2016-07-26 Thread Tony Mountifield
Hi Jerry,

In article ,
Jerry Geis  wrote:
> 
> It seems I am not getting any digits coming over a SIP trunk.
> 
> How can I match "anything" or "nothing" and start my extension.
> 
> Usually I have something like:
> exten => 55,1,Goto(,yyy,1)
> 
> but if 55 does not come across and it appears to be no digits
> coming across how do I match that that and just start.
> 
> I thought about _X but that says digits. I dont think I am getting any
> digits
> I just want *anything* coming across to start the call.
> 
> Basically ANY call coming across the trunk just do the same as 55 above.

It sounds like you are thinking of your SIP trunk as if it is a telephone
line, when you first pick up the line, and then send digits over it.

SIP doesn't work like that. A SIP call is started by an INVITE message
that says who the caller is, and what address they want to call. Normally,
the address would be something like sip:12...@some.realm.com, where the
12345 would be the digits of the number that would be matched against
your dialplan. It doesn't have to be, though, and you could have a call
to sip:je...@some.realm.com, which would match the following:

exten => jerry,1,Goto(and so on)

It is possible, but often not helpful, to have a call that doesn't specify
a number, with an address such as sip:some.realm.com, and that should
match the "s" extension:

exten => s,1,NoOp(Didn't get a number)

Maybe that's what is happening in your case, so try adding an "s" extension.

Hope this helps,

Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] Mobiles not detecting as BUSY until Dial() timeout completes

2016-03-24 Thread Tony Mountifield
In article <201603241343.24128.asterisk_l...@earthshod.co.uk>,
A J Stiles  wrote:
> I'm not sure if this is an Asterisk thing, a handset thing or a telco thing, 
> so please be gentle with me if this is not the right place to ask .
> 
> When placing a call over a SIP channel to a mobile phone, if the phone is 
> engaged, it does not return a BUSY status straightaway.  Rather, I get a 
> ringing-out tone for the timeout duration specified in the Dial() statement; 
> *then* I get ${DIALSTATUS}=BUSY.
> 
> Now, given how far we have moved on since the days of clicky-clicky 
> exchanges, 
> it is entirely possible that the mobile phone implicitly supports multiple 
> "lines", so you can put an existing caller on hold, talk to the new caller 
> and 
> then switch between them as long as they stay on the line .  in which 
> case, this behaviour is pretty much what should be expected -- Asterisk 
> doesn't know for sure that the remote party really is engaged, because they 
> retain the option to put their call on hold and answer you, so it lets the 
> timeout run; then, since they were already on a call at the time the first 
> signalling message was sent, it sets the dialstatus to BUSY.
> 
> 
> Where should I be looking, if I want to reproduce the "old-fashioned" 
> behaviour and return an engaged signal straight away?

Sounds like the mobile line has Call Waiting enabled, and the waiting call
has been ignored by the recipient until it times out.

See https://en.wikipedia.org/wiki/Call_waiting and try *#43# on the mobile
in question to check whether call waiting is active. Use #43# to try
deactivating it and see if that helps.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] Compile error with libpri 1.4.15

2016-02-02 Thread Tony Mountifield
In article ,
Jerry Geis  wrote:
> 
> > You need to have installed DAHDI before compiling libpri or asterisk
> 
> Thanks Tony,
> 
> in fact I have compiled DAHDI complete 2.11.0+2.11.0 - It did not show any
> errors.
> I did make; make install on the DAHDI source
> 
> crazy typo... :)   in fact I do have tonezone.h in the dahdi source tree.
> but not in /usr/include
> find /usr/include/dahdi/
> /usr/include/dahdi/
> /usr/include/dahdi/kernel.h
> /usr/include/dahdi/user.h
> /usr/include/dahdi/fasthdlc.h
> /usr/include/dahdi/wctdm_user.h
> /usr/include/dahdi/dahdi_config.h
> 
> What up?

Maybe it didn't install properly? Try doing "make install" in DAHDI again
(as root, of course) and watch it closely. I haven't tried 2.11.0. On my
boxes with 2.10.0.1, /usr/include/dahdi/tonezone.h does exist.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] Compile error with libpri 1.4.15

2016-02-02 Thread Tony Mountifield
In article ,
Jerry Geis  wrote:
> 
> I am getting this:
> 
> make
> gcc -g -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -fPIC  -O2
>  -MD -MT pritest.o -MF .pritest.o.d -MP -c -o pritest.o pritest.c
> pritest.c:50:28: fatal error: dahdi/tonezone.h: No such file or directory
>  #include 
> 
> I am using dahdi-linux-complete-2.11.0+2.11.0
> 
> I did "find . | grep timezone.h" from the dahdi root and its not there.

It's tonezone.h, not timezone.h

And it is being looked for in /usr/include/dahdi/tonezone.h, not in
the dahdi source directory.

You need to have installed DAHDI before compiling libpri or asterisk.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] is there some blocking in 11.21.0

2016-01-21 Thread Tony Mountifield
In article ,
Jerry Geis  wrote:
> 
> >Not really. Very little info to go on so far. You need to give us
> >more detail of what you are doing with AGI and AMI.
> 
> Sorry - let me try again...
> 
> 
> I am basically doing the following:
> 1) calling a phone SIP/401 upon answer run an AGI for voice prompts etc...
> to select AUDIO groups
> 2) when done setup to return to the dialplan - exit AGI
> 3) issue AGI that calls those groups selected (SIP/430 & SIP/431) at the
> moment to bring into a conference.
> 4) Wait 10 seconds
> 5) jump SIP/401 into conference
> 6) speak live to endpoints.
> 
> However my issue is such that step 3 above "seems" to block until after
> step 5.
> 
> My Manager AMI connection reports success in step 3:
> 21-Jan-16 01:02 pm asterisk_pa_list() manager_str Action: Originate[CR ][LF
> ]Async: Yes[CR ][LF ]Channel: SIP/430[CR ][LF ] (truncated)
> 21-Jan-16 01:02 pm asterisk_pa_list() manager_str return Response:
> Success[CR ][LF ]Message: Originate successfully queued[CR ][LF ][CR ][LF ]
> 
> I was expecting the jump into conference from step 3 to go ahead and do the
> request - not wait till after step 5.
> 
> Does this help? What am I not doing right so the calls in step 3 happen WAY
> before the 10 seconds is complete?

The problem we have is you are asking us to debug a description. That's
usually almost impossible. Much easier to debug code, as it may or may not
match your description! So we can offer more insight if you include
information such as:

1. Relevant section of your dialplan.
2. The AGI code that does the origination. Presumably it is calling the AMI?
   In your example above, the Originate AMI has a Channel, but doesn't show
   any Context, Extension and Priority. Where is the channel supposed to go
   once the call to SIP/430 is answered?
3. The Asterisk "full" log, with at least verbose level 3, encompassing
   your attempt.
4. Anything else that you yourself would need to look at to debug the issue.

Cheers
Tony

-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] is there some blocking in 11.21.0

2016-01-21 Thread Tony Mountifield
In article ,
Jerry Geis  wrote:
> 
> >Are you saying that this worked in earlier versions but you started to
> >get the delay when you updated to 11.21.0? Or just that you happened to
> >be using 11.21.0 the first time you tried this scenario?
> 
> I should have said "first time" trying this.
> 
> Any thoughts?

Not really. Very little info to go on so far. You need to give us
more detail of what you are doing with AGI and AMI.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] is there some blocking in 11.21.0

2016-01-21 Thread Tony Mountifield
In article ,
Jerry Geis  wrote:
> 
> >>On Thursday 21 Jan 2016, Jerry Geis wrote:
> >>* I am using the AMI interface to start calls.
> *>> >>* At one point I have a 10 second delay "Wait(10)" in the dialplan...
> *>>* During this time it "seems" that if I then connect with the manager
> *>>* interface
> *>>* and place a call that nothing happens till the 10 seconds is done...
> *>> >>* I am requesting Async yes...
> *>>* manager_str Action: Originate[CR ][LF ]Async: Yes[CR ][LF ]Channel:
> *>>* SIP/430[CR ][LF] (this is the first part of the AMI string)
> *>> >>* How can I get past that... I want the other call to happen right away.
> *
> >Use Priority: to begin at the dialplan step after the Wait() command.
> 
> Thanks AJS - Sorry, I was not clear enough.
> 
> Its not the command right after the Wait(10) that is being delayed
> I have another process that issuing the commands to the AMI.
> 
> Its basically like this:
> 
> AGI( run to bring items into conference SIP/100 & SIP/101 lets say)
> Wait(10)
> ConfBridge(to take this user into above conference)
> 
> But the SIP/100 and SIP/101 calls do not take place until a second delay.
> 
> Why are the SIP/100&SIP/101 calls delayed during the Wait(10) ?

Are you saying that this worked in earlier versions but you started to
get the delay when you updated to 11.21.0? Or just that you happened to
be using 11.21.0 the first time you tried this scenario?

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


[asterisk-users] SNMP order of channel types

2016-01-08 Thread Tony Mountifield
I have two very much identical systems running Asterisk 11 with the SNMP
module included.

I have found that the order of channel types on the two systems is different.
One system has:

ASTERISK-MIB::astChanTypeName.1 = STRING: ConfBridgeRec
ASTERISK-MIB::astChanTypeName.2 = STRING: Local
ASTERISK-MIB::astChanTypeName.3 = STRING: SIP
ASTERISK-MIB::astChanTypeName.4 = STRING: Agent
ASTERISK-MIB::astChanTypeName.5 = STRING: IAX2
ASTERISK-MIB::astChanTypeName.6 = STRING: Bridge
ASTERISK-MIB::astChanTypeName.7 = STRING: MulticastRTP
ASTERISK-MIB::astChanTypeName.8 = STRING: DAHDI

But the other has:

ASTERISK-MIB::astChanTypeName.1 = STRING: ConfBridgeRec
ASTERISK-MIB::astChanTypeName.2 = STRING: Local
ASTERISK-MIB::astChanTypeName.3 = STRING: Bridge
ASTERISK-MIB::astChanTypeName.4 = STRING: SIP
ASTERISK-MIB::astChanTypeName.5 = STRING: IAX2
ASTERISK-MIB::astChanTypeName.6 = STRING: Agent
ASTERISK-MIB::astChanTypeName.7 = STRING: MulticastRTP
ASTERISK-MIB::astChanTypeName.8 = STRING: DAHDI

This makes it difficult to have a common MRTG configuration between them
monitoring for SIP channel usage.

Can anyone tell me:

1. What determines the order of channel types?

2. Is this likely to vary between reboots or rebuilds?

3. Is there a way I can make the order predictable and fixed? modules.conf?

4. Or alternatively, a way I can make MRTG find the correct index dynamically?

Thanks for any advice,
Tony

-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] FastAGI not working

2015-12-16 Thread Tony Mountifield
In article 
<26820_1450199905_56704B61_26820_4934_1_9222B1F3842BDF4A9CDAB9E738A7114E8334BB@OPEXCNORM53.corporate.adroot.infra.ftgroup>,
  wrote:
> 
> Hello everyone,
> 
> I have a problem with a FastAGI connection, could you help me fix this 
> problem please?
> 
> Here is my log:
> 
> [2015-12-15 16:17:09] WARNING[23936][C-0015]: res_agi.c:1658 
> handle_connection: Connecting to '10.171.54.149:9110'
> failed for url
> 'agi://10.171.54.149:9110/DatabaseQuery.agi?vars=name%3Bfirst+name%3BStatut&db=Oracle+database&query=VIP&as=10.171.54.149':
> Connection refused
> [2015-12-15 16:17:09] WARNING[23936][C-0015]: res_agi.c:1730 
> launch_netscript: Couldn't connect to any host. 
> FastAGI failed.

This means that either:
a) Nothing on 10.171.54.149 is listening to port 9110, or:
b) The firewall on 10.171.54.149 is rejecting connections to port 9110.

You didn't tell us whether 10.171.54.149 is the same box as the asterisk
one, or a different one.

On 10.171.54.149, do "netstat -nltp" as root to see what processes are
listening, and see if port 9110 is among them.

So if you can describe how you have set up your FastAGI server, and how it
invokes DatabaseQuery.agi, that would help us to help you!

Cheers
Tony

-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] SNMP on Asterisk 11

2015-12-01 Thread Tony Mountifield
In article <001501d12c4d$829a28a0$87ce79e0$@us>,
Tech Support  wrote:
> 
> All;
> 
> I am trying to setup SNMP on an Asterisk 11 system on CentOS 6.

I have this working, so I'll try to help, by comparing what you've said
with my working setup.

> I have the
> net-snmp packages installed and I made sure that SNMP support is compiled
> into Asterisk and that the res_snmp.so module is loaded. res_snmp.conf is
> configured like so:
> 
> [general]
> subagent = yes
> enabled = yes

That's ok. Same as mine.

> My /etc/snmp/snmpd.conf file has the AgentX support configured.
> 
> master agentx
> 
> agentXPerms  0660 0550 nobody asterisk

I have "root root" instead of "nobody asterisk". I don't know whether that
is significant or not. It may be. Try it.

> And both the Asterisk mib and the Digium mib are being loaded. I check that
> by
> 
> >> snmptranslate -On -Td ASTERISK-MIB::asteriskVersion
> 
> .1.3.6.1.4.1.22736.1.1
> 
> asteriskVersion OBJECT-TYPE
> 
>   -- FROM   ASTERISK-MIB
> 
> ::= { iso(1) org(3) dod(6) internet(1) private(4) enterprises(1)
> digium(22736) asterisk(1) 1 }

Whether the MIB is loaded or not doesn't matter, if you are specifying
an OID by number. It's just for translation, a bit like DNS for IP addrs.

> when I try to do a query using the Asterisk mib, I'm getting the following
> error:
> 
> >> snmpwalk -v 2c -c private localhost .1.3.6.1.4.1.22736.1.1
> 
> SNMPv2-SMI::enterprises.22736.1.1 = No Such Object available on this agent
> at this OID

I get:
SNMPv2-SMI::enterprises.22736.1.1.1.0 = STRING: "11.18.0"
SNMPv2-SMI::enterprises.22736.1.1.2.0 = Gauge32: 111800

> Has anyone ever come across this problem? Any insight at all would be
> greatly appreciated.

The other thing to check is further up in /etc/snmp/snmpd.conf. See what
views are defined, and the access groups to which they have been assigned,
as they specify what part(s) of the OID tree will be served.

I have this:

##   incl/excl subtree  mask
view allincluded  .1   80

##context sec.model sec.level prefix read   write  notif
access MyROGroup ""  any   noauth    exact  allnone   none
access MyRWGroup ""  any   noauthexact  allallall


which makes everything under .1 visible. Not sure if that is the default or not.

Cheers
Tony

-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] Dialing a call back out on same SIP trunk as it came in

2015-11-25 Thread Tony Mountifield
In article <20151125133008.6369360.14455.17...@gmail.com>,
Israel Gottlieb  wrote:
> Try putting progress instead of answer

Yes, I tried Progress already, and it didn't help. But thanks for
the suggestion!

Tony

> I have a puzzling situation, and would be grateful for any insight.
> 
> I have a dialplan that forwards an incoming call out to another
> number via the same SIP trunk as it came in on. e.g.
> 
> [from-siptrunk]
> exten => 0123456789,1,NoOp
> exten => 0123456789,n,Dial(SIP/siptrunk/0987654321)
> 
> Now, if I use a different SIP trunk for the outbound call, than the
> inbound call came on, the call is set up fine - the Answer signal from the
> called party gets propagated back to the caller, and they can hear each
> other.
> 
> But if the outbound SIP trunk is the same as the one the call came in on,
> the caller doesn't hear any progress, and has no notification of when the
> call was answered. Neither can the parties hear each other.
> 
> I have tried this on two different machines using two different SIP
> providers.
> 
> However, if I change the above NoOp to be Answer(100), i.e. answer the
> inbound call before placing the outbound Dial, the caller hears progress
> and when the called party answers, they hear each other fine.
> 
> Of course, if the called party is busy, the caller just hears in-band
> busy tone, as the caller's inbound call was already answered.
> 
> Can anyone explain why I need the Answer? It feels wrong that I should.
> 
> The siptrunk entry contains canreinvite=no and directmedia=no.
> 
> The version of Asterisk on these boxes is 10.5.1, if that's relevant.
> 
> Thanks for any insight!
> 
> Cheers
> Tony
> 
> -- 
> Tony Mountifield
> Work: t...@softins.co.uk - http://www.softins.co.uk
> Play: t...@mountifield.org - http://tony.mountifield.org
> 
> -- 
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> http://www.asterisk.org/hello
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
> -- 
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>http://www.asterisk.org/hello
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
> 


-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


[asterisk-users] Dialing a call back out on same SIP trunk as it came in

2015-11-25 Thread Tony Mountifield
I have a puzzling situation, and would be grateful for any insight.

I have a dialplan that forwards an incoming call out to another
number via the same SIP trunk as it came in on. e.g.

[from-siptrunk]
exten => 0123456789,1,NoOp
exten => 0123456789,n,Dial(SIP/siptrunk/0987654321)

Now, if I use a different SIP trunk for the outbound call, than the
inbound call came on, the call is set up fine - the Answer signal from the
called party gets propagated back to the caller, and they can hear each
other.

But if the outbound SIP trunk is the same as the one the call came in on,
the caller doesn't hear any progress, and has no notification of when the
call was answered. Neither can the parties hear each other.

I have tried this on two different machines using two different SIP
providers.

However, if I change the above NoOp to be Answer(100), i.e. answer the
inbound call before placing the outbound Dial, the caller hears progress
and when the called party answers, they hear each other fine.

Of course, if the called party is busy, the caller just hears in-band
busy tone, as the caller's inbound call was already answered.

Can anyone explain why I need the Answer? It feels wrong that I should.

The siptrunk entry contains canreinvite=no and directmedia=no.

The version of Asterisk on these boxes is 10.5.1, if that's relevant.

Thanks for any insight!

Cheers
Tony

-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] 786 000 files limit Centos 7 - Asterisk keep complaining

2015-08-11 Thread Tony Mountifield
In article <002b01d0d414$36af31b0$a40d9510$@verishare.co.za>,
Stefan Viljoen  wrote:
> >> Anybody else ran into this?
> 
> >No, but I would ask myself why so many file descriptors are being used.
> >It sounds like you have a file descriptor leak (not being closed when
> >finished with).
> 
> Hi Tony
> 
> Thanks for replying.
> 
> I suspected something like that, though repeatedly running
> 
> lsof | wc -l
> 
> Always stays quite low - 100 000 open files, which is still 8 times less
> than the system maximum as confirmed by running ulimit -n

>From what you said below, the above is probably not relevant...

> 
> SOMETHING NEW
> 
> I have now ran
> 
> /usr/bin/prlimit --pid `pidof asterisk` 
> 
> and I have noticed that even though I have 800 000 files specified, the
> ACTUAL limit in place on Asterisk for numbers of files is only 1024?!

Yes, this is likely. Have a look in /usr/sbin/safe_asterisk, at the
commented-out settings for SYSMAXFILES and MAXFILES, and try setting those.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] 786 000 files limit Centos 7 - Asterisk keeps complaining

2015-08-07 Thread Tony Mountifield
In article <001c01d0d10a$ce89cd40$6b9d67c0$@verishare.co.za>,
Stefan Viljoen  wrote:
> Hi Guys
> 
> I keep getting messages in the Asterisk 1.8.11.0 CLI that there are not
> enough file descriptors available on my Centos 7 box.
> 
> I also get regular error messages that RTP connections are failing due to
> bad file descriptors.
> 
> I have already edited /etc/sysctl.conf by setting fs.file-max to 786 000
> files, and running sysctl -p afterward.
> 
> I have also edited /etc/security/limits.conf and entered
> 
> * soft nofile 786000
> * hard nofile 786000
> 
> and rebooted my system.
> 
> When I ge the Asterisk error messages in the CLI that there are not enough
> file descriptors, I immediately ran
> 
> lsof | wc -l
> 
> and I only get around 100 000 files open - while my limit is 786 000 - yet
> still Asterisk keeps complaining.
> 
> I have also edited /etc/asterisk/asterisk.conf to have 
> 
> maxfiles = 786000
> 
> and restarted Asterisk / rebooted, but this has no effect.
> 
> Why does Asterisk 1.8.11.0 complain that there are insufficient file
> descriptors when my limit is 786 000 and the kernel itself states that only
> 100 000+ handles / decriptors are in use at the moment Asterisk is
> complaining about insuffiecient descriptors?
> 
> Anybody else ran into this?

No, but I would ask myself why so many file descriptors are being used.
It sounds like you have a file descriptor leak (not being closed when
finished with).

You might also want to look at the output of lsof (or at least some of it)
to see what all these file descriptors are pointing to, and whether it is
indeed Asterisk that is consuming them.

If it is Asterisk, it's quite possible, even probable, that such a leak
has been found and fixed, even in the 1.8 series. 1.8.11.0 is rather old -
the latest is 1.8.32.3, so it would be best to update to that version and
see if the problem persists.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


[asterisk-users] Find out or log negotiated codec for SIP channel?

2015-06-04 Thread Tony Mountifield
Hi, despite some searching I haven't found an answer to this question:

Is there a way I can see in the log, or find out in the dialplan, what
codec has been negotiated for a SIP channel? If possible, I'd like to
do this in both Asterisk 11 and in an old 1.2 system.

What I'm specifically trying to do is to determine historically the
usage of the G.729 licences installed in a system, but an answer to
the more general question would be useful.

Thanks
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] How does chan_sip match an ACK?

2015-03-31 Thread Tony Mountifield
In article ,
Tony Mountifield  wrote:
> I am trying to debug a SIP issue, between an Asterisk 1.2.32 system that
> is behind a network device to which I don't have ready access, which is
> performing NAT with possibly some kind of SIP ALG, and an Asterisk 11
> system on a public IP.
> 
> My question is very specific, and I don't need right now to discuss the
> ins and outs of the above setup.
> 
> What I am seeing is that when I have set up a call from the Asterisk 11
> system, the 1.2.32 system is sending 200 OK, and sip debug shows the
> ACK response coming back from the Asterisk 11 box. However, the ACK
> appears not to be understood, because the 200 OK gets re-sent, multiple
> times, and eventually gives up.

OK, for the future reference of anyone else having a similar problem,
this is what was happening:

The dialplan was doing an immediate Answer:

exten => _X.,1,Answer
exten => _X.,n,Goto(wherever)

This means that the answering system, upon receiving the SIP INVITE,
would reply with a 100 Trying, followed immediately by a 200 OK.

Now, the two systems are actually on opposite sides of the Atlantic,
and the sending system sent the INVITE with a very short retransmission
timeout (T1 appeared to be 228ms due to a qualify time of 114ms). And by
the time it received the replies from the receiving system, it had
already retransmitted the INVITE.

However, the receiving system, having sent the 200 OK, then received
the repeat INVITE. It looks like it repeated the 200 OK, but then the
ACK from the sending system didn't get recognised properly.

I appear to have overcome it by putting in a delay before the Answer,
so that any repeated INVITE would arrive before the receiving system
tried sending the 200 OK to Answer:

exten => _X.,1,Ringing
exten => _X.,n,Wait(1)
exten => _X.,n,Answer
exten => _X.,n,Goto(wherever)

On further reading, I would think I could also solve it by setting the
T1 values in sip.conf, instead of doing the above:

Should I set "timert1=500", or "t1min=500" or both, or what?

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


[asterisk-users] How does chan_sip match an ACK?

2015-03-30 Thread Tony Mountifield
I am trying to debug a SIP issue, between an Asterisk 1.2.32 system that
is behind a network device to which I don't have ready access, which is
performing NAT with possibly some kind of SIP ALG, and an Asterisk 11
system on a public IP.

My question is very specific, and I don't need right now to discuss the
ins and outs of the above setup.

What I am seeing is that when I have set up a call from the Asterisk 11
system, the 1.2.32 system is sending 200 OK, and sip debug shows the
ACK response coming back from the Asterisk 11 box. However, the ACK
appears not to be understood, because the 200 OK gets re-sent, multiple
times, and eventually gives up.

My specific question is, what values in the ACK does chan_sip (1.2.32)
use to match the ACK with the pending 200 OK? My understanding of the
chan_sip.c code is not good enough to work it out for certain.

Here is the 200 OK (I've changed the address of the public endpoint):

Mar 30 10:20:20 VERBOSE[5811] logger.c: Retransmitting #5 (no NAT) to 
11.111.11.111:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 
11.111.11.111:5060;branch=z9hG4bK6bee4b53;received=11.111.11.111
From: "Tony Mountifield" ;tag=as4ab948f7
To: ;tag=as76e64309
Call-ID: 21bf5fa61b5e98880b96448118310bf7@11.111.11.111:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: 
Content-Type: application/sdp
Content-Length: 218

v=0
o=root 5732 5732 IN IP4 172.16.141.143
s=session
c=IN IP4 172.16.141.143
t=0 0
m=audio 16282 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -

And here is the ACK in reply that is not getting understood:

<-- SIP read from 11.111.11.111:5060:
ACK sip:12345@172.16.141.143 SIP/2.0
Via: SIP/2.0/UDP 11.111.11.111:5060;branch=z9hG4bK36651b68
Max-Forwards: 70
From: "Tony Mountifield" ;tag=as4ab948f7
To: ;tag=as76e64309
Contact: 
Call-ID: 21bf5fa61b5e98880b96448118310bf7@11.111.11.111:5060
CSeq: 102 ACK
User-Agent: Asterisk PBX 11.5.0
Content-Length: 0

So what is it about the ACK that is wrong?

Thanks for any help!

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] Dahdi ISDN logging

2015-03-20 Thread Tony Mountifield
In article ,
Grant Bagdasarian  wrote:
> 
> Is it possible to log the raw signaling of Dahdi channels to a log file?

Try googling for: dahdi pcap

It should be possible to log to a pcap file that you can later examine
using Wireshark. I haven't yet tried doing so.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


[asterisk-users] DAHDI 2.10 on CentOS 5.11

2015-03-05 Thread Tony Mountifield
I have just installed DAHDI 2.10.0.1 on a system running CentOS 5.11
(let's not get sidetracked into discussing the version of CentOS - there
are reasons for using it in this case).

The system has a TE220 card with 2xE1.

It has been working fine, but when booting, the udev startup gives out
warnings about ATTRS{hardware_id} and ATTRS{location} not being found.

After doing some research, I changed ATTRS to SYSFS in the file
/etc/udev/rules.d/dahdi.rules, and the warnings went away. Although I did
notice that after making the change and rebooting, /dev/dahdi/devices only
contained the symbolic link @Board, pointing to ../chan/001/031, and no
longer contained subdirectories called 1 and 2, each of which previously
contained 31 symbolic links, one for each channel (although it looks like
those links actually contained one too many ../).

So my questions are:
1. Was it correct on this system to change ATTRS back to SYSFS? I notice
that it was changed to ATTRS in DAHDI 2.9.

2. Should /dev/dahdi/devices contain just @Board, or also 1/ and 2/?

3. Are the /dev/dahdi/devices entries used by Asterisk or anything else?

Thanks for any advice!

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] Asterisk executable suddenly about 40KB larger - modules not working

2015-01-07 Thread Tony Mountifield
In article <001a01d02a75$cf314fc0$6d93ef40$@verishare.co.za>,
Stefan Viljoen  wrote:
> Hi all
> 
> I have a strange issue with 1.8.11.0 on a production Asterisk machine at our
> head office, and the same issue with a production machine at a branch
> office.
> 
> Every now and then, on the head office machine, ODBC CEL and CDR logging
> will stop working. On examination in the CLI, Asterisk behaves as if the
> config files for ODBC in the /etc directory are just gone.
> 
> Repeated tests have then proved that the config files
> (/etc/asterisk/res_odbc.conf, /etc/asterisk/res_pgsql.conf, etc.) ARE in
> /etc/asterisk folder and are readable and have the correct contents, and are
> NOT gone.
> 
> On the branch machine, where we do not use ODBC but FreeTDS to log CDRs to
> an MSSQL DB, TDS stops working randomly as well, with the cdr_tds.so module
> refusing to load with a message (I forget now the exact wording) that seems
> to indicate that the Asterisk version is incompatible with the cdr_tds.so
> ELF object file.
> 
> Checking further, I discovered that in both situations, the asterisk
> executable in /usr/sbin grew by about 40KB compared to its size just after
> being compiled...
> 
> The fix on both machines is to re-copy a backup of the asterisk executable
> to /usr/sbin to overwrite the new "suddenly larger" asterisk executable, and
> then restarting asterisk on both machines.
> 
> Everything then works correctly again until the next time the
> /usr/sbin/asterisk executable again "grows" by +- 40kb - at Head Office
> stopping ODBC from working, at the branch stopping TDS from working.
> 
> This doesn't happen with our other 14 branches all running 1.8.11.0 on
> mostly identical hardware.
> 
> Anybody encountered this "growing executable" error before? 

It could be something to do with pre-linking. See "man prelink". This
is usually run from /etc/cron.daily

You can disable pre-linking by following the instructions here:
http://www.builddesigncreate.com/index.cgi?mode=webpage_list&pageid=2011080413332724848

If that prevents the problem, the next step would be to determine why
pre-linking causes the problem, although I'm not sure how you do so.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


[asterisk-users] Other Allison prompts?

2014-05-02 Thread Tony Mountifield
I was wondering whether there are any other collections of Asterisk-
compatible prompts recorded by Allison, that people might have kindly
made available for free download.

I found mention of some in an article at 
http://www.venturevoip.com/news.php?rssid=2690
but the links referred to on www.asterisk.org appear no longer to exist.

I already have the core- (good quality) and extra- (poor quality) sets
of standard prompts.

On a related note, the extra- set appears to have been converted from
the old GSM format. Are there any plans to have them re-recorded in
good quality?

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] Anyone used WatchGuard SIP ALG?

2014-04-22 Thread Tony Mountifield
In article 
<616B4ECE1290D441AD56124FEBB03D0818EB7AE075@mailserver2007.nyigc.globe>,
Eric Wieling  wrote:
> I would be very surprised is anyone uses WatchGuard SIP ALG.   For the
> past 12 years the advice has always been "Disable SIP ALG and let
> Asterisk do the NAT fixup itself" on any firewall, regardless of brand.
> I wish you the best of luck.

The only way we were able to get that to work was by using the
"media_address" setting within sip.conf to override the IP address in the
SDP:

; The IP address used for media (audio, video, and text) in the SDP can also be 
overridden by using
; the media_address configuration option. This is only applicable to the 
general section and
; can not be set per-user or per-peer.
;
; media_address = 172.16.42.1

However, this only works if the box is ONLY talking to outside SIP
endpoints, since for some bizarre reason, media_address is global
rather than per-peer. So setting it to the customer's external IP
address renders all internal SIP endpoints non-functional, as they
then receive the external IP address in the SDP.

But as I said, the proper solution to a broken SIP ALG is to fix the
ALG, not just to give up on it. There's no reason it can't be made
to work correctly, and it enables RTP ports to be opened and closed
as required, instead of having a complete range permanently open.

Such a pity WatchGuard is closed-source.

Cheers
Tony

> -Original Message-
> From: asterisk-users-boun...@lists.digium.com 
> [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Tony Mountifield
> Sent: Tuesday, April 22, 2014 12:12 PM
> To: asterisk-users@lists.digium.com
> Subject: Re: [asterisk-users] Anyone used WatchGuard SIP ALG?
> 
> In article 
> ,
> Ishfaq Malik  wrote:
> > On 22 April 2014 16:24, Tony Mountifield  wrote:
> > 
> > > Has anyone here used Asterisk inside a WatchGuard firewall, talking 
> > > via the WatchGuard SIP Application Layer Gateway to an outside SIP 
> > > service?
> > >
> > > I have a customer doing just that, and I am 100% convinced there is 
> > > a bug in the ALG regarding the media port number it inserts into the 
> > > SDP when it rewrites it. However, either they or WatchGuard will not 
> > > accept there is a bug, despite my very detailed description of it.
> > >
> > > So if anyone else has any experience of using this product, I'd be 
> > > very interested to hear from you. Thanks!
> > >
> > Just about every SIP ALG (Watchguard included) makes things worse or 
> > simply not work.
> 
> Maybe, but that doesn't mean the concept is flawed. It should be
> possible to do it correctly.
> 
> > Have you tried to simply disable it?
> 
> Yes, the customer has tried that, but since NAT is involved, the lack of
> SDP rewriting means that the media streams do not get routed correctly.
> 
> But I am specifically looking for people with experience of this
> particular product, rather than for general advice, as I am seeking
> support for my assertion that it has a specific bug that the vendor
> needs to acknowledge and fix.
> 
> -- 
> _
> -- 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
> 


-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] Anyone used WatchGuard SIP ALG?

2014-04-22 Thread Tony Mountifield
In article 
,
Ishfaq Malik  wrote:
> On 22 April 2014 16:24, Tony Mountifield  wrote:
> 
> > Has anyone here used Asterisk inside a WatchGuard firewall, talking via
> > the WatchGuard SIP Application Layer Gateway to an outside SIP service?
> >
> > I have a customer doing just that, and I am 100% convinced there is a bug
> > in the ALG regarding the media port number it inserts into the SDP when
> > it rewrites it. However, either they or WatchGuard will not accept there
> > is a bug, despite my very detailed description of it.
> >
> > So if anyone else has any experience of using this product, I'd be very
> > interested to hear from you. Thanks!
> >
> Just about every SIP ALG (Watchguard included) makes things worse or simply
> not work.

Maybe, but that doesn't mean the concept is flawed. It should be possible
to do it correctly.

> Have you tried to simply disable it?

Yes, the customer has tried that, but since NAT is involved, the lack
of SDP rewriting means that the media streams do not get routed correctly.

But I am specifically looking for people with experience of this particular
product, rather than for general advice, as I am seeking support for my 
assertion
that it has a specific bug that the vendor needs to acknowledge and fix.

Thanks,
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


[asterisk-users] Anyone used WatchGuard SIP ALG?

2014-04-22 Thread Tony Mountifield
Has anyone here used Asterisk inside a WatchGuard firewall, talking via
the WatchGuard SIP Application Layer Gateway to an outside SIP service?

I have a customer doing just that, and I am 100% convinced there is a bug
in the ALG regarding the media port number it inserts into the SDP when
it rewrites it. However, either they or WatchGuard will not accept there
is a bug, despite my very detailed description of it.

So if anyone else has any experience of using this product, I'd be very
interested to hear from you. Thanks!

Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] Asterisk to Microsoft Lync2013?

2014-04-11 Thread Tony Mountifield
In article ,
Tony Mountifield  wrote:
> In article 
> ,
> Ishfaq Malik  wrote:
> > On 11 April 2014 11:34, Tony Mountifield  wrote:
> > 
> > > Are they any gotchas to be aware of in getting Asterisk and Lync 2013
> > > talking to each other using SIP? Or is Lync a pretty standard
> > > implementation
> > > of SIP?
> > 
> > You have to use TCP for transport and you need to define the host and port
> > address in your peer config and then secure it with ACL.
> 
> Thanks, Ish. That's a little inconvenient. Does Lync not support standard UDP?
> 
> I have two boxes that need to talk to Lync. One is Asterisk 11, which should
> pose no problem with TCP, but the other is a legacy Asterisk 1.2 box, which
> is UDP only, I believe.
 
OK, I've found a description of Lync 2013 saying it does not support SIP over 
UDP,
so have told the customer the 1.2 box will need a full upgrade. Thanks!

Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] Asterisk to Microsoft Lync2013?

2014-04-11 Thread Tony Mountifield
In article ,
Ishfaq Malik  wrote:
> On 11 April 2014 11:34, Tony Mountifield  wrote:
> 
> > Are they any gotchas to be aware of in getting Asterisk and Lync 2013
> > talking to each other using SIP? Or is Lync a pretty standard
> > implementation
> > of SIP?
> 
> You have to use TCP for transport and you need to define the host and port
> address in your peer config and then secure it with ACL.

Thanks, Ish. That's a little inconvenient. Does Lync not support standard UDP?

I have two boxes that need to talk to Lync. One is Asterisk 11, which should
pose no problem with TCP, but the other is a legacy Asterisk 1.2 box, which
is UDP only, I believe.

> Regards
> 
> Ish
> -- 
> 
> Ishfaq Malik
> Department: VOIP Support
> Company: Packnet Limited

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


[asterisk-users] Asterisk to Microsoft Lync2013?

2014-04-11 Thread Tony Mountifield
Are they any gotchas to be aware of in getting Asterisk and Lync 2013
talking to each other using SIP? Or is Lync a pretty standard implementation
of SIP?

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] Need more meetme users -- hitting some limit

2014-03-24 Thread Tony Mountifield
In article ,
Steve Edwards  wrote:
> On Fri, 21 Mar 2014, Steve Edwards wrote:
> 
> > Googling 'dahdi pseudo channel limit modprobe' showed the secret sauce.
> 
> Oops. Guess I should complete the thread...
> 
> You can set the DAHDI pseudo channel limit in /etc/modules.conf:
> 
>  options dahdi max_pseudo_channels=x
> 
> or you can set it from the command line like:
> 
>  echo x >/sys/module/dahdi/parameters/max_pseudo_channels
> 
> It appears you need 1 DAHDI pseudo channel per caller and 2 pseudo 
> channels per meetme.

To be more exact, you need one DAHDI channel of *some kind* per caller.

For DAHDI hardware channels (e.g. PRI), Meetme can mix directly from
the channel and doesn't need a pseudo too.

For VoIP channels (and a few other cases), Meetme needs to route the
call through a DAHDI pseudo channel to give it data to mix.

And yes, two pseudos per meetme - one for recording from and one for
playing announcements into the conference.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] G729 - what happens if licences used up?

2014-02-20 Thread Tony Mountifield
In article ,
Paul Belanger  wrote:
> On Thu, Feb 20, 2014 at 10:40 AM, Tony Mountifield  wrote:
> > I haven't been able to find the answer online, and am not currently
> > able to conduct an experiment to find the answer...
> >
> > I understand that in a SIP call where G729 has been negotiated as the
> > preferred codec, a G.729 licence is not consumed until there is a need
> > to perform transcoding, e.g. play a non-g729 sound, or do voicemail,
> > or enter a Meetme, etc.
> >
> > What happens when a SIP call in progress needs a G.729 licence and
> > they are all in use already? Does the call fail, or go silent, or do a
> > re-INVITE to negotiate another codec?
> >
> > I'm interested in what happens on Asterisk 1.2 (for a legacy system),
> > and also whether it is any different on later versions.
> >
> The question depends if you are offering up other codecs or not.  If
> you only using g729, the call will fail to establish because lack of
> codecs.  If you offer a both g729 and ulaw, then ulaw will be used.

The codecs offered by each end would be g729, alaw and ulaw.

I guess my point is that the licence is NOT required to negotiate codecs
and establish the call, e.g. if g.729 sounds are installed and calls are
pass-through, then no transcoding is required.

So the call will negotiate g729 and get established, and then if later
the dialplan calls something that requires transcoding, the licence is
requested at that time. What happens if there is not one available?
Can/will it do a re-INVITE to change codec, or does the call fail,
or does it continue but go silent?

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


[asterisk-users] G729 - what happens if licences used up?

2014-02-20 Thread Tony Mountifield
I haven't been able to find the answer online, and am not currently
able to conduct an experiment to find the answer...

I understand that in a SIP call where G729 has been negotiated as the
preferred codec, a G.729 licence is not consumed until there is a need
to perform transcoding, e.g. play a non-g729 sound, or do voicemail,
or enter a Meetme, etc.

What happens when a SIP call in progress needs a G.729 licence and
they are all in use already? Does the call fail, or go silent, or do a
re-INVITE to negotiate another codec?

I'm interested in what happens on Asterisk 1.2 (for a legacy system),
and also whether it is any different on later versions.

Thanks,
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] 11.5.0 - SIP registration not retrying after failures

2013-11-08 Thread Tony Mountifield
In article <9519872.915.1383925949785.JavaMail.myoung@myoung-laptop>,
Michael L. Young  wrote:
> > From: "Tony Mountifield" 
> > To: asterisk-users@lists.digium.com
> > Sent: Friday, November 8, 2013 10:39:25 AM
> > Subject: [asterisk-users] 11.5.0 - SIP registration not retrying after  
> > failures
> > 
> > I had a SIP problem on an 11.5.0 system that I look after. It
> > registers
> > with a SIP trunk provider, and at one point the provider had an issue
> > that
> > caused registration to fail.
> > 
> > The problem was that Asterisk did not keep retrying, and it was not
> > until
> > it was restarted that registration was re-established.
> 
> A fix for this was actually just committed and will be in 11.7.  There is a 
> release candidate available if you want to
> try it out.  You want to look for the "register_retry_403" option that was 
> added to the sip.conf file.

Great, thanks! It should hopefully be a rare issue, so I'll just keep an
eye out for the 11.7 release.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


[asterisk-users] 11.5.0 - SIP registration not retrying after failures

2013-11-08 Thread Tony Mountifield
I had a SIP problem on an 11.5.0 system that I look after. It registers
with a SIP trunk provider, and at one point the provider had an issue that
caused registration to fail.

The problem was that Asterisk did not keep retrying, and it was not until
it was restarted that registration was re-established.

Here are the entries in the full log:

[Nov  5 21:19:12] NOTICE[3248] chan_sip.c:-- Registration for 
'usern...@nn.nn.nnn.nn' timed out, trying again (Attempt #1)
[Nov  5 21:19:32] NOTICE[3248] chan_sip.c:-- Registration for 
'usern...@nn.nn.nnn.nn' timed out, trying again (Attempt #1)
[Nov  5 21:19:52] NOTICE[3248] chan_sip.c:-- Registration for 
'usern...@nn.nn.nnn.nn' timed out, trying again (Attempt #1)
[Nov  5 21:19:56] WARNING[3248] chan_sip.c: Forbidden - wrong password on 
authentication for REGISTER for 'username' to 'nn.nn.nnn.nn'

The output of "sip show registry" was as follows:
CLI> sip show registry
Hostdnsmgr Username   Refresh State 
   Reg.Time
nn.nn.nnn.nn:5060   N  username23 No 
AuthenticationTue, 05 Nov 2013 21:18:28
1 SIP registrations.

There was evidently a temporary authentication problem at the provider.
Does a Forbidden response cause Asterisk to decide never to retry?
Even if it is a rare situation, is it possible to configure Asterisk to
recover from it automatically by retrying?

I checked sip.conf, and registerattempts was left unset (defaults to 0=forever).
I couldn't see any other relevant settings.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] issue with dahdi_channels.conf

2013-10-31 Thread Tony Mountifield
In article ,
Salaheddine Elharit  wrote:
> 
> below
> 
> etc/dahdi/system.conf
> # Autogenerated by /usr/sbin/dahdi_genconf on Tue Oct 22 15:03:14 2013
> # If you edit this file and execute /usr/sbin/dahdi_genconf again,
> # your manual changes will be LOST.
> # Dahdi Configuration File
> #
> # This file is parsed by the Dahdi Configurator, dahdi_cfg
> #
> # Span 1: TE2/0/1 "T2XXP (PCI) Card 0 Span 1" (MASTER)
> span=1,0,0,ccs,hdb3
> # termtype: te
> bchan=1-15,17-31
> dchan=16
> echocanceller=mg2,1-15,17-31
> 
> # Span 2: TE2/0/2 "T2XXP (PCI) Card 0 Span 2"
> span=2,2,0,ccs,hdb3
> # termtype: te
> bchan=32-46,48-62
> dchan=47
> echocanceller=mg2,32-46,48-62
> 
> # Global data
> 
> loadzone = us
> defaultzone = us

OK, that looks fine.

> dahdi-channels.conf
> ===
> with this configuration there is no problem but when i add 1-15
> 
> and i make service asterisk stop, service dahdi stop, service dahdi start,
> service asterisk start i can't make the calls i must remove 1-15 in order
> to make the calls

It's always possible that the problem is a misconfiguration at the remote
end. I had that once, where the PBX to which Asterisk was talking had had
its channel numbers misconfigured, resulting in a similar problem to what
you have described.

What happens if you swap the cables over between the two E1 ports on the card?
Does the problem move to the second card (channels 32-46)?

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] issue with dahdi_channels.conf

2013-10-31 Thread Tony Mountifield
In article ,
Salaheddine Elharit  wrote:
> 
> i have an issue with my dahdi_channels.conf
> 
> in span 1 when i use it like below i can do my outband calls without issue
> 
> ; Span 1: TE2/0/1 "T2XXP (PCI) Card 0 Span 1" (MASTER)
> group=0,11
> context=from-pstn
> switchtype = euroisdn
> signalling = pri_cpe
> channel => 17-31
> context = default
> group = 63
> 
> 
> but when i add in channel 1-15 like: channel => 1-15,17-31
> 
> i receive all the time this message
> 
> chan_dahdi.c:9438 pri_fixup_principle: Can't move call (DAHDI/3-1) from
> channel 3 to 2.  It is already in use.
> 
> 
> WARNING[4264]: chan_dahdi.c:9558 pri_find_fixup_principle: Span 1: PRI
> requested channel 1/2 is not available.
> 
> 
> in span 2 there is no problem
> 
> ; Span 2: TE2/0/2 "T2XXP (PCI) Card 0 Span 2"
> group=0,12
> context=from-pstn
> switchtype = qsig
> signalling = pri_net
> channel => 32-46,48-62
> context = default
> group = 63
> 
> could you please help me

What are the contents of /etc/dahdi/system.conf ?

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] is g729 codec free? or under license???

2013-10-14 Thread Tony Mountifield
In article ,
s m  wrote:
> 
> thanks Asghar, but are you sure? my two endpoints -which are soft-phones-
> have g729 codec but my asterisk on middle system has not any module for
> g729 codec. i think i should get module g729 for my middle system in order
> to pass calls with g729 codec. isn't it true?

No, it's not. Asterisk can pass G.729 frames transparently from one endpoint
to another without using a codec.

However, that does limit the functionality of Asterisk a bit.

Asterisk does need the G.729 codec any time it needs to understand the
contents of a G.729 frame, in order to do any of these:

1. Play a sound (unless you have installed the g729-format sounds).
2. Save voicemail (unless you have configured voicemail ONLY to save g729 
format).
3. Detect in-band DTMF (you should be using RFC2833 instead of inband anyway).
4. Meetme or Confbridge conferencing (needs to convert to linear in order to 
mix).
5. Play music on hold (unless you have installed only g729-format music).
6. Bridge a call to a device that cannot do G.729 format or a non-VoIP channel.

There may be others I haven't thought of.

So I guess if you have only G.729-capable devices, a G.729-capable SIP trunk,
install the G.729 sounds and music and configure the system correctly, the
only thing you can't do is conferencing.

However, I don't see any real need to use G.729 unless you are severely limited
on network bandwidth. It seems to be a solution to a historical problem that
has largely gone away nowadays. You will get better quality with G.711 at least.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] utils.c: fwrite() returned error: Broken pipe how to solve it ???

2013-10-10 Thread Tony Mountifield
In article <201310101230.56058.asterisk_l...@earthshod.co.uk>,
A J Stiles  wrote:
> 
> Also, as Asterisk runs on Unix-like systems, you don't really need the 
> Microsoft-style \r\n line endings.  Just an ordinary Unix-style \n on its own 
> will suffice.  It even saves a few CPU cycles on the far end  (not that 
> you'll 
> ever actually notice from within an interpreted script).

Text-based internet protocols (e.g. SMTP, FTP, etc) canonically use \r\n
as a line terminator, and AMI does likewise. It may well accept commands
with just \n as a line termiator (I haven't checked), but it certainly
sends \r\n to terminate lines that it outputs. IMHO, it's good to adhere
to the same convention in both directions.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] utils.c: fwrite() returned error: Broken pipe how to solve it ???

2013-10-10 Thread Tony Mountifield
In article ,
akhilesh chand  wrote:
> 
> I want to make call through socket i have set code given below:
> 
> #!/usr/bin/perl -w
> 
> use IO::Socket::INET;
> 
> 
> sub asterisk_command ()
> {
> #  my $command=$_[0];
> my
> $ami=IO::Socket::INET->new(PeerAddr=>'127.0.0.1',PeerPort=>5038,Proto=>'tcp')
> or die "failed to connect to AMI!";
> print $ami "Action: Login\r\nUsername: lite\r\nSecret:
> 4003\r\n\r\nAction: Logoff\r\n\r\n";
> }
> &asterisk_command("Channel: DAHDI/27/7702009896\r\nExten: s\r\nContext:
> outbound\r\nCallerID: 20048645\r\nPriority: 1\r\nMaxRetries: 2\r\n");
> 
> Whenever i execute that code i'm get following error
> 
> [Oct 10 15:13:23] ERROR[856]: utils.c:1175 ast_careful_fwrite: fwrite()
> returned error: Broken pipe
> [Oct 10 15:13:23] ERROR[856]: utils.c:1175 ast_careful_fwrite: fwrite()
> returned error: Broken pipe
> [Oct 10 15:13:23] ERROR[856]: utils.c:1175 ast_careful_fwrite: fwrite()
> returned error: Broken pipe
> [Oct 10 15:13:23] ERROR[856]: utils.c:1175 ast_careful_fwrite: fwrite()
> returned error: Broken pipe
> 
> 
> asterisk verison :-  1.6.2.7
> CentOS release 5.3
> kernel version :- 2.6.18-128.el5

AMI is a *two-way* protocol. You mustn't just fire in a bunch of commands
and close the socket!

The reason Asterisk reports the fwrite() error is because you have closed
the socket before it had a chance to send you the responses.

What you need to do is this:

1. Connect to the AMI port.
2. Read the one-line greeting message that Asterisk sends you. It will tell
   you the version of the protocol (which might be of interest if you wanted
   to be compatible with different versions of Asterisk).
3. Send the Login action with username, secret and terminating blank line.
4. Read the response lines from Asterisk until it gives you a blank line.
5. Send whatever command you want it to do, and go back to step 4.
6. When you have done the commands you want, send the Logoff action.
7. *** READ THE RESPONSE TO THE LOGOFF
8. Close the socket.

If it helps. Here is similar piece of code I wrote to query pri spans.
Note carefully the setting of $/ in two places, and the inclusion of
"Events: off" to avoid responses getting confused by asynchronous events.

==
#!/usr/bin/perl

use IO::Socket;

my $numspans = 4;
my $host = 'localhost';
my $login = "Action: login\r\nUsername: \r\nSecret: \r\nEvents: 
off\r\n\r\n";

$/ = "\r\n";# <> reads a single line for signon banner

my $s = IO::Socket::INET->new("$host:5038") or die "can't connect to $host: 
$!\n";
my $banner = <$s>;  # read the banner

#my $line = ('-' x 78)."\n";
#print $banner,$line;

$/ = "\r\n\r\n";# <> reads a complete response ending in a blank line

print $s $login;
my $resp = <$s>;

#print $resp,$line;

my @spans;

foreach $span (1..$numspans) {
print $s "Action: Command\r\nCommand: pri show span $span\r\n\r\n";
$resp = <$s>;
#print $resp,$line;

if ($resp =~ /Status: (.*)\n/) {
$status = $1;
} else {
        $status = 'Unknown';
}
$spans[$span-1] = "Span $span status = $status\n";
}

print $s "Action: Logoff\r\n\r\n";
$resp = <$s>;
#print $resp,$line;

close $s;

# go on to display the results from @spans
==

Cheers
Tony

-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] RTP port ranges

2013-09-13 Thread Tony Mountifield
In article <5232dcbc.20...@telenet.be>,
Jonas Kellens  wrote:
> 
> I have defined that I want to receive audio (RTP) on port 11500 till 
> 11954 (rtp.conf).
> 
> The same range I have defined in my firewall.
> 
> I now see that an IP-address gets blocked by my firewall because there 
> are packets coming onto port 11955.
> 
> 
> How come the client sends audio on port 11955 when I clearly define in 
> my SDP-body that I want to receive audio on port range 11500 till 11954 ?
> 
> What makes the client choose this port number when it is not allowed ?

An RTP connection typically uses a pair of adjacent ports. The even port
for the RTP stream, and the next port up (odd) for RTCP reports.

So when defining a port range, you should probably make the lower port
number even and the upper port number odd.

(so the default 1-2 is probably wrong too, and should be 1-1)

It also means that you should allow at least twice as many ports as the
number of simultaneous calls you want to handle.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] 11.4.0: iax packets lost by amazon ec2

2013-09-07 Thread Tony Mountifield
In article ,
Sean Darcy  wrote:
> 
> iptables -vnL
> Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
>   pkts bytes target  prot opt in   out  source destination
>   125K  171M ACCEPT  all  --  **0.0.0.0/0  0.0.0.0/0  ctstate 
> RELATED,ESTABLISHED
>  0 0 ACCEPT  icmp --  **0.0.0.0/0  0.0.0.0/0
>  0 0 ACCEPT  all  --  lo   *0.0.0.0/0  0.0.0.0/0
> 13   768 ACCEPT  tcp  --  **0.0.0.0/0  0.0.0.0/0  ctstate NEW tcp 
> dpt:22
>  140 REJECT  all  --  **0.0.0.0/0  0.0.0.0/0
> 
> So this means the packet is accepted only if it comes from the loopback 
> interface?

Yes, the rules above mean:
1. If the packet is part of an established or related session, accept it.
2. Else if it's ICMP (e.g. ping or network status), accept it.
3. Else if it's from the loopback interface, accept it.
4. Else if it's a new ssh connection, accept it.
5. Otherwise reject it.

Nothing in there about accepting UDP, which is why you needed the extra
rule to accept the IAX port.

Cheers
Tony

-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] 11.4.0: iax packets lost by amazon ec2

2013-09-07 Thread Tony Mountifield
In article ,
Sean Darcy  wrote:
> On 09/07/2013 10:33 AM, Tony Mountifield wrote:
> > In article <522a934d.8010...@gmail.com>,
> > Sean Darcy  wrote:
> >> On 09/06/2013 07:08 PM, Steve Edwards wrote:
> >>> On Fri, 6 Sep 2013, Sean Darcy wrote:
> >>>
> >>>> I'm not sure asterisk is even listening for the packets:
> >>>>
> >>>> [root@asterisk ~]# netstat -apnt | grep 4569
> >>>> [root@asterisk ~]#
> >>>
> >>> '-t' meand TCP. IAX is UDP.
> >>>
> >>
> >> My bad:
> >>
> >> netstat -apnu | grep 4569
> >> udp0  0 0.0.0.0:45690.0.0.0:*
> >>   3176/asterisk
> >>
> >> But why isn't asterisk seeing/acting upon the registration request?
> >> Wireshark finds the packet to 4569, so it's not a firewall problem.
> >
> > Are you sure about that? I have found in the past that tcpdump sees inbound
> > packets before they get to the iptables filter.
> >
> > What happens if you do:
> > iptables -I INPUT 1 -p udp --dport 4569 -j ACCEPT
> >
> > Cheers
> > Tony
> >
> 
> Wow! Look:
> 
>   iptables -L
> Chain INPUT (policy ACCEPT)
> target prot opt source   destination
> ACCEPT all  --  anywhere anywhere ctstate 
> RELATED,ESTABLISHED
> ACCEPT icmp --  anywhere anywhere
> ACCEPT all  --  anywhere anywhere
> ACCEPT tcp  --  anywhere anywhere ctstate 
> NEW tcp dpt:ssh
> REJECT all  --  anywhere anywhere 
> reject-with icmp-host-prohibited
> 
> Chain FORWARD (policy ACCEPT)
> target prot opt source   destination
> REJECT all  --  anywhere anywhere 
> reject-with icmp-host-prohibited
> 
> Chain OUTPUT (policy ACCEPT)
> target prot opt source   destination
> 
> 
> Which means to me that the INPUT chain will ACCEPT all protocols from 
> anywhere to anywhere.

I suspect there's something that is not being shown there. Try:

# iptables -vnL

(and if pasting it, to post here, try to avoid line-wrapping if possible).

> But no, iptables -I INPUT 1 -p udp --dport 4569 -j ACCEPT solves the 
> problem and asterisk now registers my device.
> 
> Now I have to find a way to make it persistent across reboots.

If your system is RH or CentOS-like, you can do:

# service iptables save

That creates the file /etc/sysconfig/iptables, which is loaded on boot.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] 11.4.0: iax packets lost by amazon ec2

2013-09-07 Thread Tony Mountifield
In article <522a934d.8010...@gmail.com>,
Sean Darcy  wrote:
> On 09/06/2013 07:08 PM, Steve Edwards wrote:
> > On Fri, 6 Sep 2013, Sean Darcy wrote:
> >
> >> I'm not sure asterisk is even listening for the packets:
> >>
> >> [root@asterisk ~]# netstat -apnt | grep 4569
> >> [root@asterisk ~]#
> >
> > '-t' meand TCP. IAX is UDP.
> >
> 
> My bad:
> 
> netstat -apnu | grep 4569
> udp0  0 0.0.0.0:45690.0.0.0:* 
>  3176/asterisk
> 
> But why isn't asterisk seeing/acting upon the registration request? 
> Wireshark finds the packet to 4569, so it's not a firewall problem.

Are you sure about that? I have found in the past that tcpdump sees inbound
packets before they get to the iptables filter.

What happens if you do:
iptables -I INPUT 1 -p udp --dport 4569 -j ACCEPT

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] DAHDI wct4xxp high system CPU on idle?

2013-08-16 Thread Tony Mountifield
In article ,
Tony Mountifield  wrote:
> I have a system running CentOS 5.9 and DAHDI 2.6.2 with a 2-port E1 card
> using the wct4xxp driver (also using Asterisk 11.5.0, but that isn't
> relevant to the question).
> 
> With DAHDI and Asterisk started, the system appears to run normally, as
> far as I can tell from limited testing.
> 
> I am monitoring User, System and Nice CPU usage using SNMP and MRTG, and I
> have noticed that when I have started up DAHDI, the System CPU jumps up to
> around 12% or so and stays there. It does this even if I don't start
> Asterisk.
> 
> On previous systems I have built over the years, using CentOS4 and Zaptel,
> I don't recall seeing such high CPU usage just from having Zaptel started.
> It would be down near 0% until the system started handling real calls.
> 
> So my first question would be: is this high CPU usage normal with current
> cards and DAHDI? It's curious that 12.5% is 1/8 of 100% and /proc/cpuinfo
> reports 8 CPUs, but I don't know whether that is just coincidence. The CPU
> is a X3450 with four cores and HT enabled.
> 
> Any thoughts would be gratefully received!

I did some more digging, during which I learnt some stuff about the UCD-SNMP
ssCpuRaw* items. I wrote a perl script to poll them all exactly once per
second. The values are tick counts - apparently, each time a kernel tick 
happens,
the kernel determines the current state (user, nice, system, wait, kernel,
interrupt, softirq, idle), and increments the appropriate tick counter(s).
Kernel, interrupt and softirq are subsets of system.

The UCD-SNMP module returns new counts every 5 seconds. I noticed that the
system and interrupt counters would spend say 30 seconds incrementing and
then 30 seconds hardly changing. My guess is that the 1ms interrupt handling
of the E1 card is beating with the 10ms system tick, and that the kernel
tick is a higher priority interrupt than the E1 card's. So it's possible
that the tick interrupts the DAHDI interrupt. This increments "system" and
"interrupt", registering effectively a whole 10ms in the counters, even if
the DAHDI interrupt really takes much less than this (which it would need
to, being every 1ms!). The slow beat between the 1ms DAHDI and the 10ms tick
means that once they coincide, they will continue to do so for a while,
registering much more apparent time handling the DAHDI interrupts than is
really the case.

So now I understand it, I'm no longer worried about it, although it's a pity
the graph is misleading!

I also discovered that 100% is the capacity of a single CPU, and a n-core
system will register a max of n*100%. Once I allowed the MRTG graphs to exceed
100%, I found ssCpuRawIdle was near 400% on my 4-core system with HT disabled
and near 800% with HT enabled. (I didn't find having HT enabled gave any
problem with call quality).

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


[asterisk-users] DAHDI wct4xxp high system CPU on idle?

2013-08-14 Thread Tony Mountifield
I have a system running CentOS 5.9 and DAHDI 2.6.2 with a 2-port E1 card
using the wct4xxp driver (also using Asterisk 11.5.0, but that isn't
relevant to the question).

With DAHDI and Asterisk started, the system appears to run normally, as
far as I can tell from limited testing.

I am monitoring User, System and Nice CPU usage using SNMP and MRTG, and I
have noticed that when I have started up DAHDI, the System CPU jumps up to
around 12% or so and stays there. It does this even if I don't start
Asterisk.

On previous systems I have built over the years, using CentOS4 and Zaptel,
I don't recall seeing such high CPU usage just from having Zaptel started.
It would be down near 0% until the system started handling real calls.

So my first question would be: is this high CPU usage normal with current
cards and DAHDI? It's curious that 12.5% is 1/8 of 100% and /proc/cpuinfo
reports 8 CPUs, but I don't know whether that is just coincidence. The CPU
is a X3450 with four cores and HT enabled.

Any thoughts would be gratefully received!

Cheers

Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] Multi-homed SIP in Asterisk 11?

2013-07-31 Thread Tony Mountifield
In article 
<616B4ECE1290D441AD56124FEBB03D08171492B22C@mailserver2007.nyigc.globe>,
Eric Wieling  wrote:
> This is the standard way we set up our servers.   There is nothing special 
> about it.   Just make sure you disable direct media.

Thanks, that's reassuring. Appreciate the response!

Tony

> -Original Message-
> From: asterisk-users-boun...@lists.digium.com 
> [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Tony Mountifield
> Sent: Wednesday, July 31, 2013 10:33 AM
> To: asterisk-users@lists.digium.com
> Subject: [asterisk-users] Multi-homed SIP in Asterisk 11?
> 
> Most of my experience until recently has been in Asterisk 1.2, and I am just 
> starting to make use of Asterisk 11 for new systems.
> 
> I have a question about using SIP on a multi-homed machine.
> 
> I have a customer who wants an Asterisk box with two network interfaces:
> one on the public Internet (no NAT), and one on a private LAN. The box will 
> not do any IP forwarding between interfaces. They want to connect to a SIP 
> trunk from an ITSP via the public interface, and to have SIP phones on their 
> LAN registered via the private interface.
> 
> I haven't tried such a setup before, so before creating a test system, I 
> wondered if anyone here has made such a setup, and whether there are any 
> issues with getting SDP contents and media routing correct?
> 
> Cheers
> Tony
> --
> Tony Mountifield
> Work: t...@softins.co.uk - http://www.softins.co.uk
> Play: t...@mountifield.org - http://tony.mountifield.org
> 
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to 
> Asterisk? Join us for a live introductory webinar every Thurs:
>http://www.asterisk.org/hello
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
> 
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>http://www.asterisk.org/hello
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
> 


-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] Multi-homed SIP in Asterisk 11?

2013-07-31 Thread Tony Mountifield
In article <51f925f2.1040...@dns99.co.uk>,
Gareth Blades  wrote:
> On 31/07/13 15:32, Tony Mountifield wrote:
> > Most of my experience until recently has been in Asterisk 1.2, and I am
> > just starting to make use of Asterisk 11 for new systems.
> >
> > I have a question about using SIP on a multi-homed machine.
> >
> > I have a customer who wants an Asterisk box with two network interfaces:
> > one on the public Internet (no NAT), and one on a private LAN. The box
> > will not do any IP forwarding between interfaces. They want to connect
> > to a SIP trunk from an ITSP via the public interface, and to have SIP
> > phones on their LAN registered via the private interface.
> >
> > I haven't tried such a setup before, so before creating a test system,
> > I wondered if anyone here has made such a setup, and whether there are
> > any issues with getting SDP contents and media routing correct?
> >
> > Cheers
> > Tony
> I normally just ensure localnet= and externip= is set correctly. I 
> normally also have 'directmedia=no' defined in sip.conf so that asterisk 
> is performing store and forward for all the rtp traffic. That does mean 
> rtp traffic for internal calls is going via asterisk where it could be 
> direct between the phones but the amount of traffic doing this is 
> normally pretty trivial so it doesnt matter in most cases.

Thanks. But I thought localnet= and externip= were for when the external
interface is going through NAT. In this case the ITSP is connected through
a real non-NATted public interface.

Is it possible to specify directmedia=no just for the SIP trunk? So that
the phones could still do direct media between themselves, but not if
they were connected to the trunk?

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


[asterisk-users] Multi-homed SIP in Asterisk 11?

2013-07-31 Thread Tony Mountifield
Most of my experience until recently has been in Asterisk 1.2, and I am
just starting to make use of Asterisk 11 for new systems.

I have a question about using SIP on a multi-homed machine.

I have a customer who wants an Asterisk box with two network interfaces:
one on the public Internet (no NAT), and one on a private LAN. The box
will not do any IP forwarding between interfaces. They want to connect
to a SIP trunk from an ITSP via the public interface, and to have SIP
phones on their LAN registered via the private interface.

I haven't tried such a setup before, so before creating a test system,
I wondered if anyone here has made such a setup, and whether there are
any issues with getting SDP contents and media routing correct?

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] What is my syntax error here?

2013-07-24 Thread Tony Mountifield
In article ,
James B. Byrne  wrote:
> I have thsi code in a dial plan.  The purpose of which is to set
> distinctive ring tones for internal and transferred calls.
> 
> 
> exten => _.,1,Noop(CALLERID_ALL=${CALLERID(all)})
> 
> exten => _.,n,Set(CallerIDNum=${CALLERID(num)})

I believe _. is frowned upon because it can potentially match h, i, and so on.
Use _X. instead, or just the full pattern of _417XX

> 
> exten => _417XX,n,GotoIf(
>   $[$["${CallerIDNum}" > "41799"] |
> $["${CallerIDNum}" < "41700"]]?notfromlocal:)
> 
> But I am getting a message say there is no variable to check.  So what
> I have done that is wrong?

Is that step split into three lines in your dialplan? I think you might
need to put it all on a single line.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] Troubleshooting TDMs (Packet capture like debugging)

2013-06-13 Thread Tony Mountifield
In article ,
James Bensley  wrote:
> Hi All,
> 
> I am looking for a way to troubleshoot issues with TDM (E1) trunks
> with a provider.
> 
> Currently with SIP trunks I am using tcpdump to perform packet
> captures between our gateways and the SIP providers IPs, capturing
> traffic on all ports, to include both the SIP messages and the RTP
> stream.
> 
> How can I achieve a similar result on TDM links connected to TDM cards
> in Asterisk servers, where by I can see the signalling (like the SIP
> message) and the audio stream (like the RTP stream) in my packet
> captures?
> 
> If it helps, the end goal is to create something like the packet
> captures I am making so I can see the control signals and audio
> streams (in and out) for troubleshooting one way audio issues for
> example. So, am I sending audio to the TDM provider, are they sending
> it to me, have we both signalled correctly to start/stop sending
> audio, etc.

A google for "DAHDI pcap" led me to the following page:
http://forums.digium.com/viewtopic.php?f=1&t=82833

That suggests that DAHDI 2.6 onwards can be compiled with pcap support,
that presumably provides the drivers with the ability to capture to
pcap files, and a tool to control it.

Presumably a recent version of Wiresharl will then be able to interpret
the captured files.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] ISDN- E1 PRI module in network side signaling

2013-03-31 Thread Tony Mountifield
In article ,
Mitul Limbani  wrote:
> On Mar 31, 2013 12:25 PM, "Dimitar Dimitrov"  wrote:
> 
> >  Hello everyone.
> > I am looking for a E1 PRI card which supports network side signaling not
> > CPE. The main idea is to connect an plain old E1 compliant PBX which
> > doesn't have an VoIP module to the newly created VoIP infrastructure.
> > Could we use a Digium TE122P or something other to resolve this situation?
> 
> Use pri_net as signalling mode inside chan_dadhi.conf in /etc/asterisk/
> folder.
> 
> You can set this up using any pri card thats supported on Asterisk.

And you may need to make an E1 crossover cable. These are different from
Ethernet crossover cables. You need to cross pair 1-2 with pair 4-5.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] Set(CALLERID(num-pres)=prohib) / AGI version

2013-02-06 Thread Tony Mountifield
In article <51127171.2030...@ovm-group.com>,
Thorsten Göllner  wrote:
> 
> Am 06.02.2013 16:02, schrieb Steve Edwards:
> > On Wed, 6 Feb 2013, Thorsten Göllner wrote:
> >
> >> I tried to implement it into my AGI-Script, but with no success. Can 
> >> please anyone give me a hint, what is wrong with it:
> >> Set CALLERID(num-pres) prohib
> >> or
> >> Set CALLERID(num-pres)=prohib
> >>
> >> Both commands lead into:
> >> 510 Invalid or unknown command
> >
> > I'm just a 1.2 Luddite, but...
> >
> > Who's library/framework are you using?
> >
> > Neither of the commands you show above are valid AGI commands.
> >
> > Curiously, I've never tried to set caller ID (or its options) in an 
> > AGI, I've only set channel variables that ended up setting CID in the 
> > dialplan.
> >
> > If you were reading the variables, the command would look like:
> >
> > 'get full variable "${CALLERID(num-pres)}"'
> >
> > Maybe you could try something like:
> >
> > 'set variable "CALLERID(num-pres)" "prohib"'
> >
> > (I don't see a 'set full variable' AGI command.)
> >
> > How about a console log with verbose and debug cranked up and with AGI 
> > debug enabled? 
> 
> Thanks. But I found the right syntax now:
> Exec Set CALLERID(num-pres)=prohib
> 
> This AGI-Command leads into "200 OK" and I can verify, that outgoing 
> calls (SIP and DAHDI) are anonymous.

Yes, that will work, but it is executing the Set() dialplan application.
AGI has a built-in command to set a variable, and it will be more efficient
to use that. I can confirm the following AGI syntax will work, as I have
used it to set other function-based values:

SET VARIABLE CALLERID(num-pres) "prohib"

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

Re: [asterisk-users] How to propagate NOANSWER up through a Local channel?

2012-11-08 Thread Tony Mountifield
In article <20121108092952.78cb6...@ws78.int.tlc>,
Chad Wallace  wrote:
> On Thu, 8 Nov 2012 16:44:32 + (UTC)
> t...@softins.co.uk (Tony Mountifield) wrote:
> 
> > Here is a simplified example:
> > 
> > [test]
> > exten => _X.,1,Dial(Local/${EXTEN}@outbound)
> > exten => _X.,n,NoOp(${CONTEXT}:DIALSTATUS=${DIALSTATUS})
> > 
> > [outbound]
> > exten => _X.,1,Dial(SIP/ext${EXTEN},30)
> > exten => _X.,n,NoOp(${CONTEXT}:DIALSTATUS=${DIALSTATUS})
> > 
> > So if I don't answer within 30 sec, I see outbound:DIALSTATUS=NOANSWER
> > but test:DIALSTATUS=CHANUNAVAIL
> > 
> > If instead I put the timeout on the outer Dial instead, I see
> > test:DIALSTATUS=NOANSWER and outbound:DIALSTATUS=CANCEL, because the
> > Local channel hung up the inner Dial while it was still ringing.
> > 
> > So I understand the reasons for the above behaviours, but my question
> > is: How can I propagate the NOANSWER status upwards from the inner
> > Dial, so that the Local channel also returns NOANSWER?
> 
> Try Hangup(NO_ANSWER) if DIALSTATUS is NOANSWER after the Dial in the
> Local channel.

Thanks! Just need to get my platform updated from 1.2 :(

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


[asterisk-users] How to propagate NOANSWER up through a Local channel?

2012-11-08 Thread Tony Mountifield
I am using a Local channel in order to provide a layer of processing
when dialling out. I have put a timeout on the inner dial, which returns
a DIALSTATUS of NOANSWER if the call times out while ringing.

However, this then causes the Local channel to return CHANUNAVAIL
instead of NOANSWER, because effectively the proxy channel has just gone
away.

Here is a simplified example:

[test]
exten => _X.,1,Dial(Local/${EXTEN}@outbound)
exten => _X.,n,NoOp(${CONTEXT}:DIALSTATUS=${DIALSTATUS})

[outbound]
exten => _X.,1,Dial(SIP/ext${EXTEN},30)
exten => _X.,n,NoOp(${CONTEXT}:DIALSTATUS=${DIALSTATUS})

So if I don't answer within 30 sec, I see outbound:DIALSTATUS=NOANSWER
but test:DIALSTATUS=CHANUNAVAIL

If instead I put the timeout on the outer Dial instead, I see
test:DIALSTATUS=NOANSWER and outbound:DIALSTATUS=CANCEL, because the
Local channel hung up the inner Dial while it was still ringing.

So I understand the reasons for the above behaviours, but my question
is: How can I propagate the NOANSWER status upwards from the inner Dial,
so that the Local channel also returns NOANSWER?

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] i extension not triggering

2012-10-25 Thread Tony Mountifield
In article <50895cab.9080...@claborn.net>,
Mitch Claborn  wrote:
> I set logger.conf to
> console =>debug,notice,warning,error,verbose
> 
> and get the following output:
> 
>== Using SIP RTP CoS mark 5
> [Oct 25 10:32:53] NOTICE[3501]: chan_sip.c:22622 handle_request_invite: 
> Call from 'Mitch295' (192.168.5.104:5060) to extension '123' rejected 
> because extension not found in context 'DockPhone'.
> 
> NoOp() is not a typo, and it shows up correctly with "dialplan show 
> DockPhone".
> 
> 
> [ Context 'DockPhone' created by 'pbx_config' ]
>'444' =>  1. NoOp(Dock Phone) 
> [pbx_config]
>  2. Dial(${DOCK_RECIPIENTS},30,kt) 
> [pbx_config]
>  3. Verbose(2,DIALSTATUS=${DIALSTATUS}) 
> [pbx_config]
>  4. GotoIf($["${DIALSTATUS}" = "ANSWER"]?good) 
> [pbx_config]
>  5. Playback(custom/dock-no-one-available) 
> [pbx_config]
>  6. Wait(2) 
> [pbx_config]
>   [good] 7. Hangup() 
> [pbx_config]
>'h' =>1. NoOp(hangup extension from dock phone) 
> [pbx_config]
>  2. Hangup() 
> [pbx_config]
>'i' =>1. NoOp(invalid extension from dock phone i) 
> [pbx_config]
>  2. Playback(custom/dock-invalid) 
> [pbx_config]
>  3. Hangup() 
> [pbx_config]
>Include =>'emergency-services' 
> [pbx_config]

The 'i' extension is not used when entering a context. You can only enter
a context (with Dial(), Goto(), etc), at an extension that exists. If it
doesn't exist, the context cannot be entered.

The 'i' extension is only used when already in a context, and is mainly
for catching unmatched extensions dialled within a Background or WaitExten.

See http://www.voip-info.org/wiki/view/Asterisk+i+extension for further
details.

There has also been discussion about this in the mailing list over the years.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] Fully utilise all PRIs in a DAHDI group

2012-10-17 Thread Tony Mountifield
In article <201210171813.45334.r...@linux-delhi.org>,
Raj Mathur (राठ  माथॠर)  wrote:
> Hi,
> 
> Our client has DAHDI groups with 4 PRIs in each group (one 4-port 
> interface per group), up to 6 groups per server.  When we dial, we can 
> specify the group to be used for dialling, and our dial plan 
> automatically distributes calls over multiple servers and multiple 
> groups within a server.
> 
> The way Asterisk dials by default is to use the lowest-numbered free 
> line in a group to place a call.  This is technically fine.  However, 
> what it means for our client is that the first couple of PRIs in a group 
> tend to get the bulk of calls, the other two remain more-or-less 
> unutilised.  This is a problem, since there are call commitments to the 
> Telco for each PRI line.  The Telco tends to get all soggy and hard to 
> light if some of the PRIs are used way below committed call levels.
> 
> One solution is to group at the individual PRI level, so the load 
> balancing automatically takes care of fair utilisation of each PRI.  
> However, for various reasons we'd prefer not to do this.
> 
> Another solution would be if Asterisk could choose a random (or LRU or 
> LCU or round-robin or any other scheme) PRI within a group when 
> dialling.  Any roughly fair way to distribute calls to PRIs within a 
> DAHDI group would be fine.  Is there some way to achieve this?
> 
> Asterisk 1.8.8 on Debian Squeeze.

Instead of dialling using DAHDI/g1/123456789, you can try using
DAHDI/r1/123456789 to make Asterisk use the channels in round-robin
order instead of always choosing the lowest free channel.

See http://www.voip-info.org/wiki/view/Asterisk+ZAP+channels (I could not
find comparable information on the Asterisk WIKI at https://wiki.asterisk.org).

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

Re: [asterisk-users] AGI HANGUP PROBLEM

2012-09-18 Thread Tony Mountifield
In article ,
SamyGo  wrote:
> 
> So basically the FXO cards configurations need to be tweaked i.e
> hanguponpolarityinverse=yes etc.
> Since this is a Hangup request initiated by the SIP client, Asterisk then
> atleast it should close all the media streams and channel should get
> deleted.
> Keeping an eye on BYE : *CLI> "sip set debug on" Then make this call and
> see if a SIP BYE method is triggered properly and appears on screen.
> More likely you need to look into you dahdi configs.
> 
> Thanks,
> Sammy

I think you are misunderstanding the OP's issue.

Hangup on polarity reversal would only apply if Asterisk were making the
call to a phone and wanted to me informed if the phone (called party)
hung up.

The OP's situation is different. The extension below is invoked by an
INCOMING call to Asterisk, and he is then trying to hang up that call
from the Asterisk (called) end.

If the caller is a SIP phone, that is fine, as either end can hang up.

Hi problem is that when the incoming call is via his FXO port, the PSTN
does not drop the call when the Asterisk end hangs up the FXO line. In
this scenario there is on SIP involved. The problem is that the PSTN
will not drop the call when the called party on an analogue line hangs
up, until after a long timeout. There is usually no solution to this.

Cheers
Tony

> On Tue, Sep 18, 2012 at 2:03 PM, Tony Mountifield wrote:
> 
> > In article <
> > caehsoweantztyoebdobjchoeszhfk_z9sigaujsij15xx-u...@mail.gmail.com>,
> > Mehdi Rahimi  wrote:
> > > Hi all,
> > >
> > > I need to handle a problem from AGI please guide me
> > >
> > >  in extensions_custom.conf :
> > >
> > >  exten => s,1,Answer
> > >  exten => s,n,AGI(hang.php)
> > >  exten => s,n,Hangup
> > >
> > >  in hang.php :
> > >
> > >  #!/usr/bin/php -q
> > >   > >  set_time_limit(30);
> > >  require('phpagi.php');
> > >  error_reporting(E_ALL);
> > >  $agi = new AGI();
> > >  $agi->answer();
> > >  $agi->say_number('1');
> > >  $agi->hangup();
> > >  ?>
> > >
> > >
> > >  calling from an extension has no problem but whenever i use landline
> > >  or mobile it can not hangup the call and the caller has to hangup the
> > >  call.
> >
> > In the UK phone network, and I suspect in many other countries too, for
> > analogue lines it is the caller who holds the call open. For example in
> > a call between two normal analogue phones, the called party can hangup
> > their phone, and then within a short while pick it up again (or another
> > phone on the same line) and the caller is still there. Hanging up the
> > called phone does not clear down the call until after quite a long
> > timeout (a couple of minutes perhaps).
> >
> > In your above example with Asterisk connected to an analogue line with an
> > FXO card, Asterisk is the called party, and is therefore unable to clear
> > down the line forcibly. This is not an Asterisk or AGI problem but a PSTN
> > one.
> >
> > Cheers
> > Tony
> > --
> > Tony Mountifield
> > Work: t...@softins.co.uk - http://www.softins.co.uk
> > Play: t...@mountifield.org - http://tony.mountifield.org
> >
> > --
> > _
> > -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> > New to Asterisk? Join us for a live introductory webinar every Thurs:
> >http://www.asterisk.org/hello
> >
> > asterisk-users mailing list
> > To UNSUBSCRIBE or update options visit:
> >http://lists.digium.com/mailman/listinfo/asterisk-users
> >
> 
> -=-=-=-=-=-
> [Alternative: text/html]
> -=-=-=-=-=-
> -=-=-=-=-=-
> 
> --
> _
> -- 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
> -=-=-=-=-=-


-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] AGI HANGUP PROBLEM

2012-09-18 Thread Tony Mountifield
In article ,
Mehdi Rahimi  wrote:
> Hi all,
> 
> I need to handle a problem from AGI please guide me
> 
>  in extensions_custom.conf :
> 
>  exten => s,1,Answer
>  exten => s,n,AGI(hang.php)
>  exten => s,n,Hangup
> 
>  in hang.php :
> 
>  #!/usr/bin/php -q
>set_time_limit(30);
>  require('phpagi.php');
>  error_reporting(E_ALL);
>  $agi = new AGI();
>  $agi->answer();
>  $agi->say_number('1');
>  $agi->hangup();
>  ?>
> 
> 
>  calling from an extension has no problem but whenever i use landline
>  or mobile it can not hangup the call and the caller has to hangup the
>  call.

In the UK phone network, and I suspect in many other countries too, for
analogue lines it is the caller who holds the call open. For example in
a call between two normal analogue phones, the called party can hangup
their phone, and then within a short while pick it up again (or another
phone on the same line) and the caller is still there. Hanging up the
called phone does not clear down the call until after quite a long
timeout (a couple of minutes perhaps).

In your above example with Asterisk connected to an analogue line with an
FXO card, Asterisk is the called party, and is therefore unable to clear
down the line forcibly. This is not an Asterisk or AGI problem but a PSTN one.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


[asterisk-users] MixMonitor inserting extra 20ms packets of silence (1.4.43)

2012-09-10 Thread Tony Mountifield
I'm trying to diagnose potential causes of an issue with MixMonitor in 1.4.43
(I doubt it's very version-specific). I won't have hands on the kit until the
end of the week, but I have listened to some recordings. It doesn't happen on
every call - only sometimes.

Basically, it is a call from one SIP phone extension to another, and the
dialplan sets up MixMonitor on the calling channel before doing the Dial.

The call sounds fine to both parties in the call, but when listening back to
the recording, the speech is slowed down and broken - a bit like a robot or
dalek voice. Examining the recorded audio in Goldwave I can see that every 20ms
(the size of a SIP packet), an extra 20ms of silence is being inserted in the
recording file. This happens most of the time, punctuated by occasional bursts
of clear audio before it starts happening again.

Has anyone seen this kind of thing before? Better still, seen it and solved it?

The "SIP phones" are actually Soundwin ATAs.

There is no zaptel or dahdi timing source in the system.

Are there any known issues with MixMonitor that could cause this behaviour?

Any pointers would be appreciated - thanks!

Tony

-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] Record calls as BLOB into MySQL?

2012-08-31 Thread Tony Mountifield
In article ,
Stefan at WPF  wrote:
> 
> Thanks Danny,
> 
> do you mean better put the filename into the database?

I would normally just put the filename into the database. However, if you
had a good reason for storing the actual content in a BLOB field, you could
use the LOAD_FILE() function to copy from the file to the field. See

http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_load-file

You would need to make sure your MySQL configuration had a suitable value
for max_allowed_packet, as mentioned in the above section.

Cheers
Tony


> 2012/8/31 Danny Nicholas 
> 
> > Probably “possible” but not recommendable.  You have no idea how long your
> > call will or will not be.  It would be better to record the call into a wav
> > or gsm file, then put that into the blob.
> >
> > ** **
> >
> > *From:* asterisk-users-boun...@lists.digium.com [mailto:
> > asterisk-users-boun...@lists.digium.com] *On Behalf Of *Stefan at WPF
> > *Sent:* Friday, August 31, 2012 10:22 AM
> > *To:* Asterisk Users Mailing List - Non-Commercial Discussion
> > *Subject:* [asterisk-users] Record calls as BLOB into MySQL?
> >
> > ** **
> >
> > Hello all,
> >
> > is it possible, to record calls directly as BLOB into a MySQL database?
> >
> >
> > Best regards
> > Stefan
> >
> > --
> > _
> > -- 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
> >
> 
> -=-=-=-=-=-
> [Alternative: text/html]
> -=-=-=-=-=-
> -=-=-=-=-=-
> 
> --
> _
> -- 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
> -=-=-=-=-=-


-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

Re: [asterisk-users] Basic GotoIf question

2012-08-25 Thread Tony Mountifield
In article <50390065.6020...@truemetal.org>,
Markus  wrote:
> 
> Can anyone shed some light on:
> 
> 
> A few more questions - the doc link that I just mentioned shows:
> 
> GotoIf(condition?label1[[:label2])
> 
> What are the [[ before :label2? There are two opening square brackets, 
> but just one ] closing? Is that a typo?

Yes, it looks like a typo and should be [ instead of [[

These square brackets are not part of the syntax, but are just showing that
the colon and label2 are optional, so it means you can have either:

GotoIf(condition?label1:label2)

or:

GotoIf(condition?label1)

In the latter case, you branch to label1 if the condition is true, and just
continue with the next statement if it's false.

> Also, the doc shows:
> 
> GotoIf(condition?[label1]:label2)
> 
> Why is label1 in square brackets and label2 isn't?

This is saying that label1 is optional. If you only want to branch when
the condition is false, you say:

GotoIf(condition?:label2)

I guess it could easily have been confusing because typically the condition
is an expression contained within $[...], where the square brackets ARE part
of the syntax!

Hope this helps!

Cheers
Tony

-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] confbridge

2012-08-22 Thread Tony Mountifield
In article <50353df9.3060...@pagestation.com>,
Jerry Geis  wrote:
> I finally found  this - it was not asterisk, it was me. I had in the 
> dialplan two locations
> that brought other asterisk boxes into conf. Its was being called twice. 
> So first call
> into a box worked, then the second call was giving me a busy.
> 
> Thanks Tony! For all your help. Meetme must have been "slightly" smarter 
> to say that
> device is already in the meetme so don't do a second call, where 
> confbridge did not do that.

Glad to help, and I'm pleased you tracked it down.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


Re: [asterisk-users] confbridge

2012-08-22 Thread Tony Mountifield
In article <5034d4b7.8000...@pagestation.com>,
Jerry Geis  wrote:
> 
> So I commented in the "full" in the logger and restarted. set verbose 
> and debug.
> the only thing I saw was below. dsp.c Setup Tone. See below.
> 
> [Aug 22 08:02:31] DEBUG[31329] channel.c: Didn't receive a media frame 
> from 
> Local/app_confbridge_call_out@smvoice-local-public-address-playfile-621a;2 
> within 500 ms of answering. Continuing anyway
> [Aug 22 08:02:31] DEBUG[31329] app_confbridge.c: Trying to find 
> conference bridge 'PA0001'
> [Aug 22 08:02:31] DEBUG[31329] bridging.c: Joining bridge channel 
> 0x7fb07c0032e8 to bridge 0x7fb07801e8f8
> [Aug 22 08:02:31] DEBUG[31329] bridging.c: Added channel 
> Local/app_confbridge_call_out@smvoice-local-public-address-playfile-621a;2(0x7fb07800f4a8)
>  
> to bridge array on 0x7fb07801e8f8, new count is 2
> [Aug 22 08:02:31] DEBUG[31329] bridging.c: Bridge 0x7fb07801e8f8 is 
> happy that channel 
> Local/app_confbridge_call_out@smvoice-local-public-address-playfile-621a;2 
> already has read format slin
> [Aug 22 08:02:31] DEBUG[31329] bridging.c: Bridge 0x7fb07801e8f8 is 
> happy that channel 
> Local/app_confbridge_call_out@smvoice-local-public-address-playfile-621a;2 
> already has write format slin
> [Aug 22 08:02:31] DEBUG[31329] bridging.c: Giving bridge technology 
> softmix notification that 0x7fb07c0032e8 is joining bridge 0x7fb07801e8f8
> [Aug 22 08:02:31] DEBUG[31329] dsp.c: Setup tone 1100 Hz, 500 ms, 
> block_size=160, hits_required=21
> [Aug 22 08:02:31] DEBUG[31329] dsp.c: Setup tone 2100 Hz, 2600 ms, 
> block_size=160, hits_required=116
> [Aug 22 08:02:31] DEBUG[31340] pbx.c: Launching 'AGI'

The dsp stuff doesn't matter. It is not generating tones, just setting up
a detector to listen for them. It does this any time a dsp is set up using
ast_dsp_new(), and there is probably one in confbridge for talk detection.

> Also I dont want to do any transcoding and its talking about slin 
> format. seems likes thats the
> native format for conference. Do I need to add slin to my formats for 
> the end locations. All I have right now are ulaw,alaw,gsm.

Conference mixing has to be done in slin for the sample addition to work.
You don't need slin as an endpoint format (most endpoints won't understand
it anyway) - Asterisk will efficiently transcode between ulaw and slin
as required.

> Rename the sounds directory (I just tried again) did nothing this time. 
> Not sure what I had
> done??? Anyway from above looks like the dsp.c tone is whats doing it.

No, I think it's something else.

Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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


  1   2   3   4   5   6   7   8   9   >