Re: [asterisk-users] help with crash

2023-11-20 Thread Mark Murawski

Hello Federico,

Can you please review the Bug Report requirements, and submit a new bug 
report for this issue?

https://docs.asterisk.org/Asterisk-Community/Asterisk-Issue-Guidelines/

Also Note:
Before filing a bug report... Your issue may not be a bug or could have 
been fixed already. Run through the check list below to verify you have 
done your due diligence.


Also Note:
You need to provide details regarding the crash.  Upload your dialplan 
(hide any secret information/passwords/etc).  Provide the console and 
debug logs that were just prior to the crash.



On 11/9/23 17:24, Federico wrote:


2023-11-08 18:14:13] ERROR[571246][C-17e2] : Got 19 backtrace records

# 0: [0x5bd18a] asterisk utils.c:2800 __ast_assert_failed()

# 1: [0x4618e3] asterisk astobj2.c:589 __ao2_ref()

# 2: [0x58e660] asterisk stasis_cache.c:824 update_create()

# 3: [0x58efed] asterisk stasis_cache.c:903 caching_topic_exec()

# 4: [0x586b90] asterisk stasis.c:1380 dispatch_message()

# 5: [inlined] asterisk stasis.c:1490 publish_msg()

# 6: [0x59588e] asterisk stasis_channels.c:796 
ast_channel_publish_snapshot()


# 7: [0x53b54c] asterisk pbx_app.c:488 pbx_exec()

# 8: [0x52e039] asterisk pbx.c:2989 pbx_extension_helper()

# 9: [0x52fd83] asterisk pbx.c:4204 ast_spawn_extension()

#10: [0x7f625d802ccf] app_macro.so app_macro.c:463 _macro_exec()

#11: [0x53b599] asterisk pbx_app.c:493 pbx_exec()

#12: [0x52e039] asterisk pbx.c:2989 pbx_extension_helper()

#13: [0x5302b4] asterisk pbx.c:4377 __ast_pbx_run()

#14: [0x53184b] asterisk pbx.c:4669 decrease_call_count()

#15: [inlined] asterisk pbx.c:4702 pbx_thread()

#16: [0x5b8329] asterisk utils.c:1576 dummy_start()

#17: [0x7f62bec07ea5] libpthread.so.0 :0 __pthread_get_minstack()

#18: [0x7f62bd0fe8dd] libc.so.6 :0 clone()

[2023-11-08 18:14:13] ERROR[571292][C-17e4] stasis_cache.c: 
Excessive refcount 10 reached on ao2 object 0x3616b38


[2023-11-08 18:14:13] ERROR[571292][C-17e4] stasis_cache.c: 
FRACK!, Failed assertion Excessive refcount 10 reached on ao2 
object 0x3616b38 (0)


[2023-11-08 18:14:13] ERROR[571291][C-17e3] stasis_cache.c: 
Excessive refcount 10 reached on ao2 object 0x3616b38


[2023-11-08 18:14:13] ERROR[571291][C-17e3] stasis_cache.c: 
FRACK!, Failed assertion Excessive refcount 10 reached on ao2 
object 0x3616b38 (0)


[2023-11-08 18:14:13] ERROR[571290][C-17e2] stasis_cache.c: 
Excessive refcount 10 reached on ao2 object 0x3616b38


[2023-11-08 18:14:13] ERROR[571290][C-17e2] stasis_cache.c: 
FRACK!, Failed assertion Excessive refcount 10 reached on ao2 
object 0x3616b38 (0)


[2023-11-08 18:14:14] ERROR[571292][C-17e4] : Got 23 backtrace records

# 0: [0x5bd18a] asterisk utils.c:2800 __ast_assert_failed()

# 1: [0x4618e3] asterisk astobj2.c:589 __ao2_ref()

# 2: [0x58e660] asterisk stasis_cache.c:824 update_create()

# 3: [0x58efed] asterisk stasis_cache.c:903 caching_topic_exec()

# 4: [0x586b90] asterisk stasis.c:1380 dispatch_message()

# 5: [inlined] asterisk stasis.c:1490 publish_msg()

# 6: [0x59588e] asterisk stasis_channels.c:796 
ast_channel_publish_snapshot()


# 7: [0x53b54c] asterisk pbx_app.c:488 pbx_exec()

# 8: [0x52e039] asterisk pbx.c:2989 pbx_extension_helper()

# 9: [0x52fd83] asterisk pbx.c:4204 ast_spawn_extension()

#10: [0x7f625d802ccf] app_macro.so app_macro.c:463 _macro_exec()

#11: [0x53b599] asterisk pbx_app.c:493 pbx_exec()

#12: [0x52e039] asterisk pbx.c:2989 pbx_extension_helper()

#13: [0x52fd83] asterisk pbx.c:4204 ast_spawn_extension()

#14: [0x7f625d802ccf] app_macro.so app_macro.c:463 _macro_exec()

#15: [0x53b599] asterisk pbx_app.c:493 pbx_exec()

#16: [0x52e039] asterisk pbx.c:2989 pbx_extension_helper()

#17: [0x5302b4] asterisk pbx.c:4377 __ast_pbx_run()

#18: [0x53184b] asterisk pbx.c:4669 decrease_call_count()

#19: [inlined] asterisk pbx.c:4702 pbx_thread()

#20: [0x5b8329] asterisk utils.c:1576 dummy_start()

#21: [0x7f62bec07ea5] libpthread.so.0 :0 __pthread_get_minstack()

#22: [0x7f62bd0fe8dd] libc.so.6 :0 clone()

[2023-11-08 18:14:14] ERROR[571291][C-17e3] : Got 19 backtrace records

# 0: [0x5bd18a] asterisk utils.c:2800 __ast_assert_failed()

# 1: [0x4618e3] asterisk astobj2.c:589 __ao2_ref()

# 2: [0x58e660] asterisk stasis_cache.c:824 update_create()

# 3: [0x58efed] asterisk stasis_cache.c:903 caching_topic_exec()

# 4: [0x586b90] asterisk stasis.c:1380 dispatch_message()

# 5: [inlined] asterisk stasis.c:1490 publish_msg()

# 6: [0x59588e] asterisk stasis_channels.c:796 
ast_channel_publish_snapshot()


# 7: [0x53b54c] asterisk pbx_app.c:488 pbx_exec()

# 8: [0x52e039] asterisk pbx.c:2989 pbx_extension_helper()

# 9: [0x52fd83] asterisk pbx.c:4204 ast_spawn_extension()

#10: [0x7f625d802ccf] app_macro.so app_macro.c:463 _macro_exec()

#11: [0x53b599] asterisk pbx_app.c:493 pbx_exec()

#12: [0x52e039] asterisk pbx.c:2989 pbx_extension_helper()

#13: [0x5302b4] asterisk pbx.c:4377 __ast_pbx_run()

#14: [0x53184b] asterisk pbx.c:4669 

Re: [asterisk-users] Saving "admins" from themselves

2023-09-05 Thread Mark Murawski

Hi Dovid,


There is no default manager.conf in the 'make basic-pbx' config build.  
But there is however the sample manager.conf.sample which would get 
installed with 'make samples' config which has a giant security warning 
at the top of the file.  By default manager has enabled=no, and has a 
commented/disabled example config for the 'mark' user.  There is no 
default 'open to the world' configuration for mainline asterisk.  I 
would agree however that the default bindaddr should not be 0.0.0.0 in 
manager.conf.sample.  I'll put in for a fix for that.



With that being said, The Asterisk project has no control over what 
other distributions might do in terms of packaging and the default 
configurations they install.  For example, Debian, Redhat, FreePBX, etc 
etc... might by default open up asterisk to the world with something 
wildly insecure like a 0.0.0.0 bind and a login of admin/admin.  So if 
that was the case, then those package managers should be made aware of 
that issue on a case-by-case basis. Offhand I don't know which 
distributions install a default open manager.conf.






On 9/4/23 12:35, Dovid Bender wrote:

Hi,

We recently had a customer that set up Asterisk with port 5038 open to 
the world with standard configs for the AMI (by that I mean they 
copied and pasted configs that they saw online). Digging around a bit 
it seems the attacker used the AMI action "pjsip show auths" followed 
by "pjsip show auth " which got them the credentials to 
their account. I know we can't protect n00bs in every scenario 
(username 100 password 100) but I wonder if by default certain items 
such as passwords should not be available in plain text. If the 
consensus is that hiding such info is good I would want to contribute 
to a patch to hide plain text passwords by default across Asterisk.


Your thoughts?






--
_
-- 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] Question on the RTP packet header

2023-08-28 Thread Mark Murawski

Hi Dan,

Your best bet for looking at RTP media specifics is the standards that 
define RTP.


Wikipedia has some really good resources on RTP and a list of the 
various RFC standards that relate:

https://en.wikipedia.org/wiki/Real-time_Transport_Protocol



On 8/28/23 11:16, Dan Cropp wrote:


I am working on a project that uses Asterisk ARI ExternalMedia request 
to stream the RTP audio from Asterisk to an UDP/RTP receiver project.


Using slin16 format.

1) I believe I am seeing is a 12-byte header followed by 640 bytes of 
data.  Is this correct?


2) Is there some place I can find a description of the 12-byte packet 
header fields?


Dan


-- 
_
-- 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] Segmentation fault

2023-08-23 Thread Mark Murawski

Hi Federico,

The first hit from Google 'how to run command from gdb'
https://ftp.gnu.org/old-gnu/Manuals/gdb/html_chapter/gdb_5.html#:~:text=Use%20the%20run%20command%20to,section%20Commands%20to%20specify%20files).

# gdb
(gdb) file /usr/sbin/asterisk
(gdb) run –gvvc
Starting program: /usr/sbin/asterisk -gvc
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
snip
Created by Mark Spencer 
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' 
for details.

snip...

etc etc




On 8/20/23 09:12, Federico wrote:


I cannot follow your instructions, because asterisk segfaults on 
start. It never starts


Can you give me instruction to trap this segfault on starting asterisk?

Like gdb …..asterist –gvvc

*From:* asterisk-users  *On 
Behalf Of *Mark Murawski

*Sent:* Saturday, August 19, 2023 11:04 PM
*To:* asterisk-users@lists.digium.com
*Subject:* Re: [asterisk-users] Segmentation fault

Hi Federico,

Segfaults are 100% not by design.  Typically if something seg faulted, 
either there is a logic bug or a component mismatch. The you should 
definitely be able to use more than one connection (we use multiple 
connections with postgres odbc with no issue).


If Asterisk segfaults when using odbc
Try this:
- use ps and get the pid of Asterisk
- run gdb, attach to the asterisk pid
- do something that would cause the seg fault
- get a backtrace (bt) and show all threads backtrace (thread apply 
all bt)


if Asterisk segfaults when starting up
Run Asterisk straight from gdb
Wait for segfault, get backtrace, and all threads backtrace




On 8/16/23 18:48, Federico wrote:

I tested this issue with version 13 and version 18.

In res_odbc.conf, if I add a second, new data source like

[asterisk]

enabled=yes

dsn=asterisk

sanitysql => select 1

isolation => read_committed

username=root

;password=

pre-connect => yes

forcecommit => yes

connect_timeout => 10

negative_connection_cache => 0

max_connections =>500

my odbc.ini

[cdr]

Description = MySQL ODBC Driver Testing

Driver = maria

Socket = /var/run/mysqld/mysqld.sock

User = root

Password =

Database = public

Option = 3

I  get, immediately, segmentation fault.

With only one, it works fine.

Is this by design?

Philip




-- 
_
-- 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] Segmentation fault

2023-08-19 Thread Mark Murawski

Hi Federico,

Segfaults are 100% not by design.  Typically if something seg faulted, 
either there is a logic bug or a component mismatch. The you should 
definitely be able to use more than one connection (we use multiple 
connections with postgres odbc with no issue).


If Asterisk segfaults when using odbc
Try this:
- use ps and get the pid of Asterisk
- run gdb, attach to the asterisk pid
- do something that would cause the seg fault
- get a backtrace (bt) and show all threads backtrace (thread apply all bt)

if Asterisk segfaults when starting up
Run Asterisk straight from gdb
Wait for segfault, get backtrace, and all threads backtrace




On 8/16/23 18:48, Federico wrote:


I tested this issue with version 13 and version 18.

In res_odbc.conf, if I add a second, new data source like

[asterisk]

enabled=yes

dsn=asterisk

sanitysql => select 1

isolation => read_committed

username=root

;password=

pre-connect => yes

forcecommit => yes

connect_timeout => 10

negative_connection_cache => 0

max_connections =>500

my odbc.ini

[cdr]

Description = MySQL ODBC Driver Testing

Driver = maria

Socket = /var/run/mysqld/mysqld.sock

User = root

Password =

Database = public

Option = 3

I  get, immediately, segmentation fault.

With only one, it works fine.

Is this by design?

Philip


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

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

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

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

Re: [asterisk-users] PJSIP Losing knowledge of external_media_address

2023-08-18 Thread Mark Murawski

On 8/18/23 12:41, Joshua C. Colp wrote:
On Fri, Aug 18, 2023 at 1:09 PM Mark Murawski 
 wrote:


I've seen this happen three times in the wild now.  I've been
trying to
isolate the source of the issue, but so far it seems like there's not
enough debug output to know why this occurs.

Long story short:
- Start Asterisk
- PJSIP Handles receiving INVITE from ITSP via WAN (Asterisk is
behind
NAT).  SIP is handled correctly, Asterisk responds OK with RTP media
address of external_media_address
- After 30 minutes to an hour or sometimes months later after
startup,
upon receiving INVITE from ITSP via WAN, Asterisk responds OK with
INTERNAL LAN IP instead of external_media_address
- I've observed this occur after 30 minutes from startup with no
configuration changes that were made or any pjsip reloads done during
this period






Attached sip sessions and debug log... the only thing I found
interesting was finding a lack of a log item
We SHOULD be seeing:
DEBUG[X] res_pjsip_session.c: (null session): Setting external
media
address to 152.X.Y.Z
This message is clearly lacking from the debug session where the
incorrect media address is sent.  But there's not enough detail in
the
debugs to see why this decision was not made to use
external_media_address


Can't you just extend the debug and add further logging to understand 
the choices being made and why?


Doing that now!



By default we use nat settings for all our endpoints, but
obviously it's
not required here for an ITSP that has trustworthy media ports in the
SDP.  Maybe a bandaid is turning off rewrite_contact for this
endpoint?
Going to try that as soon as possible.


I believe I've stated this once or twice when you've brought this 
issue up on IRC but rewrite_contact has no influence or impact on 
this. It rewrites incoming Contact headers to the source IP address 
and port of the SIP message. You can turn it on if you wish, but it is 
unlikely to do anything.



Sorry, I missed this on IRC.  Thanks.  Makes sense



With the limited insight into things it could be a bug. I haven't seen 
any other reports, and haven't received any reports from other Sangoma 
products. Is this with a mainline Asterisk, or is it your patched 
version of Asterisk? It should be confirmed on normal Asterisk.


Thanks, very curious if this has come up for anyone else.  This is a 
slightly patched asterisk but nothing that would change the outcome of 
any nat handling or decision making (additional logging updates to pjsip 
only)-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

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

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

[asterisk-users] PJSIP Losing knowledge of external_media_address

2023-08-18 Thread Mark Murawski
I've seen this happen three times in the wild now.  I've been trying to 
isolate the source of the issue, but so far it seems like there's not 
enough debug output to know why this occurs.


Long story short:
- Start Asterisk
- PJSIP Handles receiving INVITE from ITSP via WAN (Asterisk is behind 
NAT).  SIP is handled correctly, Asterisk responds OK with RTP media 
address of external_media_address
- After 30 minutes to an hour or sometimes months later after startup, 
upon receiving INVITE from ITSP via WAN, Asterisk responds OK with 
INTERNAL LAN IP instead of external_media_address
- I've observed this occur after 30 minutes from startup with no 
configuration changes that were made or any pjsip reloads done during 
this period


pjsip
-
[global]
endpoint_identifier_order = username,ip,anonymous

[system]
type=system
threadpool_initial_size=30
threadpool_auto_increment=5
threadpool_idle_timeout=0
threadpool_max_size=100

[transport-udp]
type   = transport
symmetric_transport    = yes
protocol   = udp
bind   = 0.0.0.0:5060
external_media_address = 152.X.Y.Z
external_signaling_address = 152.X.Y.Z
external_signaling_port    = 5060
allow_reload   = no
tos    = cs3
cos    = 3
local_net  = 127.0.0.1/24
local_net  = 192.168.50.0/24
local_net  = 192.168.1.0/24
local_net  = 10.3.2.0/24
local_net  = 10.20.1.0/24
local_net  = 10.10.41.0/24
local_net  = 10.5.1.0/24

pjsip_wizard
-

[isoft-sr-in-1]
type = wizard
transport = transport-udp
remote_hosts = 192.81.237.20
aor/max_contacts = 1
aor/remove_existing = yes
aor/qualify_frequency = 60
aor/qualify_timeout = 2000
endpoint/ice_support = no
endpoint/disallow = g723,slin,ilbc,lpc10,g729,speex,g726aal2,g722
endpoint/allow = ulaw,alaw,adpcm,gsm
endpoint/direct_media = no
endpoint/force_rport = yes
endpoint/rewrite_contact = yes
endpoint/rtp_keepalive = 30
endpoint/rtp_symmetric = yes
endpoint/rtp_timeout = 60
endpoint/rtp_timeout_hold = 60
endpoint/send_pai = yes
endpoint/send_rpid = yes
endpoint/trust_id_inbound = yes
endpoint/trust_id_outbound = yes
endpoint/trust_connected_line = no
endpoint/send_connected_line = no
endpoint/context = trunkhandler_pbx-sip-t1


Attached sip sessions and debug log... the only thing I found 
interesting was finding a lack of a log item

We SHOULD be seeing:
DEBUG[X] res_pjsip_session.c: (null session): Setting external media 
address to 152.X.Y.Z
This message is clearly lacking from the debug session where the 
incorrect media address is sent.  But there's not enough detail in the 
debugs to see why this decision was not made to use external_media_address


By default we use nat settings for all our endpoints, but obviously it's 
not required here for an ITSP that has trustworthy media ports in the 
SDP.  Maybe a bandaid is turning off rewrite_contact for this endpoint?  
Going to try that as soon as possible.


Why is external_media_address not being used all of a sudden?  Has 
anyone else seen this... is this a bug?-
Calls are normal for an indetermine amount of time
-

INVITE sip:+12011555432@152.X.Y.Z:5060 SIP/2.0^M
Via: SIP/2.0/UDP 192.81.237.20:5060;branch=z9hG4bK489fe.a7c59e79.0^M
From: "MARK MURAWSKI  " ;tag=gK0c130ae5^M
To: ^M
Call-ID: 241982955_121107611@4.55.28.225^M
CSeq: 297441 INVITE^M
Max-Forwards: 69^M
Allow: INVITE,ACK,CANCEL,BYE,UPDATE,OPTIONS^M
Accept: application/sdp, application/isup, application/dtmf, application/dtmf-relay, multipart/mixed^M
Contact: ^M
Content-Length:   307^M
Content-Disposition: session; handling=required^M
Content-Type: application/sdp^M
P-Asserted-Identity: "MARK MURAWSKI  " ^M
^M
v=0^M
o=Sonus_UAC 800537 120497 IN IP4 4.55.28.225^M
s=SIP Media Capabilities^M
c=IN IP4 4.55.28.198^M
t=0 0^M
m=audio 34046 RTP/AVP 0 8 18 101^M
a=rtpmap:0 PCMU/8000^M
a=rtpmap:8 PCMA/8000^M
a=rtpmap:18 G729/8000^M
a=fmtp:18 annexb=no^M
a=rtpmap:101 telephone-event/8000^M
a=fmtp:101 0-15^M
a=sendrecv^M
a=maxptime:20^M


SIP/2.0 100 Trying^M
Via: SIP/2.0/UDP 192.81.237.20:5060;rport=5060;received=192.81.237.20;branch=z9hG4bK489fe.a7c59e79.0^M
Call-ID: 241982955_121107611@4.55.28.225^M
From: "MARK MURAWSKI  " ;tag=gK0c130ae5^M
To: ^M
CSeq: 297441 INVITE^M
Server: Asterisk PBX 18.18.0^M
Content-Length:  0^M

SIP/2.0 200 OK^M
Via: SIP/2.0/UDP 192.81.237.20:5060;rport=5060;received=192.81.237.20;branch=z9hG4bK489fe.a7c59e79.0^M
Call-ID: 241982955_121107611@4.55.28.225^M
From: "MARK MURAWSKI  " ;tag=gK0c130ae5^M
To: ;tag=1014aa45-e933-4506-bff9-5cba4530019c^M
CSeq: 297441 INVITE^M
Server: Asterisk PBX 18.18.0^M
Contact: ^M
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, P

Re: [asterisk-users] Adding Voicemail to My System

2023-06-06 Thread Mark Murawski

Hi Steve,

You must be using a prebuilt system, maybe a prebuilt Asterisk-based 
distribution?   Asterisk does not send email by default... Almost 
nothing is done by default.  Things like sending email have to be 
specifically configured to do so in voicemail.conf.  If you don't want 
to send email, remove the email addresses.


For custom greeting, best bet is Playback() that greeting and then call 
VoiceMail() with the 's' option for silent which means no greeting.  Or 
you can do the 'welcome' process for setting up a new email box and set 
the busy/unavailable greetings inside the mailbox itself.  There's an 
option in the docs to force new-user-setup if the pin number matches the 
extension.


Asterisk Console: core show application Voicemail



On 6/6/23 17:21, Steve Matzura wrote:

I'm setting up voicemail on my answering-machine project.


Since the directory for voicemail messages for an extension doesn't 
exist until there's a message to be saved therein, how can I create a 
custom greeting since it goes in that directory? That's what it sounds 
like the book is telling me anyway.



Also, how do I tell the Voicemail() application to play a custom 
greeting? I don't mean one I can create with VoicemailMain; I mean to 
play a prepared file, or possibly have no greeting at all, with the 
greeting message actually being contained in the message played in the 
Play() application. It doesn't matter which way I do it, I'm just 
trying to figure out how to do one or the other, whichever is the 
right way.




And one more, if I don't want voicemail messages to be sent out by 
email, how do I suppress this? It seems that the default is to send 
the email, but there's no option I could found that lets me say no, 
don't send.






--
_
-- 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] Upgraded from asterisk 18.14.0 to 20.0.0 and inbound registration(?) is now failing

2022-12-02 Thread Mark Murawski

Hi Justin,

There's absolutely no detail here regarding the SIP messages going out 
and back.  You'll need to include the asterisk-side sip debug.


https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information
https://support.digium.com/s/article/How-to-collect-an-Asterisk-Debug-Capture

If you're using pjsip, you'll need to use it's specific logging.
https://www.asterisk.org/new-pjsip-logging-functionality/



On 12/2/22 12:22, Justin Piszcz wrote:

Hello,

I have been using asterisk for the past decade and never had an issue 
with upgrades until now.  Recently, in November I upgraded from 
18.14.0 to 20.0.0 and afterwards my SPA3102 can no longer register 
with asterisk.  I have not made any asterisk or SPA3102 configuration 
changes in ~1-2 years.


asterisk versions: (old -> new)
18.14.0~dfsg+~cs6.12.40431414-1+b1
20.0.0~dfsg+~cs6.12.40431414-2

An example of the log from the SPA3102 under asterisk (succeeds) 18 
vs. asterisk 20 (fails), kindly inquiring what I may have missed that 
is causing these failures?


asterisk18_sip_success.txt (inbound call success) from the SPA3102 
(with asterisk 18 installed)

Dec  1 17:34:55 system1 local3 fs: 11707:11782:65536
Dec  1 17:34:55 system1 local3 fls: af:1:0:0
Dec  1 17:34:55 system1 local3 fbr: 0:3000:3000:03d6a:0008:0007:5.1.10(GW)
Dec  1 17:34:55 system1 local3 fhs: 01:0:0001:upg:app:0:3.3.6(GW)
Dec  1 17:34:55 system1 local3 fhs: 02:0:0002:upg:app:1:3.3.6(GW)
Dec  1 17:34:55 system1 local3 fhs: 03:0:0003:upg:app:2:3.3.6(GW)
Dec  1 17:34:55 system1 local3 fhs: 04:0:0004:upg:app:0:5.1.10(GW)
Dec  1 17:34:55 system1 local3 fhs: 05:0:0005:upg:app:1:5.1.10(GW)
Dec  1 17:34:55 system1 local3 fhs: 06:0:0006:upg:app:2:5.1.10(GW)
Dec  1 17:34:56 system1 local3 fu: 0:3d91, 0003 0001
Dec  1 17:35:19 system1 local2 FXO: Start CNDD
Dec  1 17:35:21 system1 local2 FXO: CNDD name=11234567890, 
number=1234567890

Dec  1 17:35:21 system1 local2 FXO: Stop CNDD
Dec  1 17:35:21 system1 local3 FXO: CNDD Name=11234567890 Phone=1234567890
Dec  1 17:35:22 system1 local2 AUD: Stop PSTN Tone
Dec  1 17:35:22 system1 local2 AUD: Stop PSTN Tone
Dec  1 17:35:22 system1 local2 Calling: 1...@system1.int.com:0 


Dec  1 17:35:22 system1 local2  [1:0]AUD ALLOC CALL (port=16458)
Dec  1 17:35:22 system1 local2  [1:0]RTP Rx Up
Dec  1 17:35:22 system1 local2 CC: pc(0)=18 not in codec list
Dec  1 17:35:22 system1 local2  [0:0]AUD ALLOC CALL (port=16460)
Dec  1 17:35:22 system1 local2  [0:0]RTP Rx Up
Dec  1 17:35:22 system1 local2 CC: Ringback
Dec  1 17:35:22 system1 local2  [1:0]RTP Rx Dn
Dec  1 17:35:22 system1 local2 AUD: Play PSTN Tone 9
Dec  1 17:35:23 system1 local3 IDBG: sc-0
Dec  1 17:35:23 system1 local3 IDBG: rs:10
Dec  1 17:35:26 system1 local3 IDBG: sc-0
Dec  1 17:35:26 system1 local3 IDBG: rs:8
Dec  1 17:35:32 system1 local2 AUD: Stop PSTN Tone
Dec  1 17:35:32 system1 local3 FXO: On Hook
Dec  1 17:35:32 system1 local2 AUD: Stop PSTN Tone
Dec  1 17:35:32 system1 local2 FXO: Stop CNDD
Dec  1 17:35:32 system1 local3  [0]FM Alert Stop RxTx (c=002550b0;a=0)
Dec  1 17:35:32 system1 local2  [1:0]AUD Rel Call
Dec  1 17:35:32 system1 local3  [0]FM Alert Stop RxTx (c=0024e5e8;a=0)
Dec  1 17:35:32 system1 local2  [0:0]AUD Rel Call
Dec  1 17:35:32 system1 local2 CC: Ended


asterisk20_sip_error.txt  (inbound call failure) from the SPA3102 
(with asterisk 20 installed)

Dec  1 17:23:21 system1 local2 FXO: Start CNDD
Dec  1 17:23:23 system1 local2 FXO: CNDD name=11234567890, 
number=1234567890

Dec  1 17:23:23 system1 local2 FXO: Stop CNDD
Dec  1 17:23:23 system1 local3 FXO: CNDD Name=11234567890 Phone=1234567890
Dec  1 17:23:24 system1 local2 AUD: Stop PSTN Tone
Dec  1 17:23:24 system1 local2 AUD: Stop PSTN Tone
Dec  1 17:23:24 system1 local2 Calling: 1...@system1.int.com:0 


Dec  1 17:23:24 system1 local2  [1:0]AUD ALLOC CALL (port=16418)
Dec  1 17:23:24 system1 local2  [1:0]RTP Rx Up
Dec  1 17:23:24 system1 local2  [1]SIP:ICMP Error -1 (a01:5060, 2)
Dec  1 17:23:24 system1 local3 RSE_DEBUG: getting alternate from 
domain:system1.int.com 

Dec  1 17:23:24 system1 local3  [0]FM Alert Stop RxTx (c=002550b0;a=0)
Dec  1 17:23:24 system1 local2  [1:0]AUD Rel Call
Dec  1 17:23:24 system1 local2 CC: Failed w/ Calling
Dec  1 17:23:24 system1 local2 AUD: Stop PSTN Tone
Dec  1 17:23:24 system1 local2 AUD: Stop PSTN Tone
Dec  1 17:23:39 system1 local2 AUD: Stop PSTN Tone
Dec  1 17:23:39 system1 local3 FXO: On Hook
Dec  1 17:23:39 system1 local2 AUD: Stop PSTN Tone
Dec  1 17:23:39 system1 local2 FXO: Stop CNDD

Regards,
Justin


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

Re: [asterisk-users] Question on resources

2022-09-05 Thread Mark Murawski

On 8/4/22 20:32, Jerry Geis wrote:

I am running Asterisk 13.30.0
40 core CPU (VM) VMware.
CentOS 7
32 G ram
10G vmx network

Should be plenty of room for anything...

Yes asterisk is running 270% CPU...
Is it not taking advantage of the 40 cores ?
I am bring around 300 SIP endpoints in a muted audio conference (so 
one way) and this spikes up the CPU to 270%.


Is there something I dont have set right to take advantage to 
the resourses?

Thanks

Jerry



Hi Jerry,

If I recall correctly, there was a talk at an AstriCon or a web page 
somewhere that I came across at one point (I'm having a hard time 
finding it now) that dove in fairly deep into Asterisk performance 
related to multiple cores.


And if I recall correctly, the conclusion was that the drop-off was 
around 8-12 cores -- and beyond that the extra cores aren't doing much 
other than helping schedule work and you can't really get more 
concurrent calls by adding more cores.


Someone who is a bit more well-versed in large-machine performance with 
Asterisk can certainly chime in here, but from what I gather, throwing 
40 cores at a single Asterisk instance is not the magic bullet to 
support a massive number of calls.




--
_
-- 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] Originate with label?

2022-08-31 Thread Mark Murawski



On 8/31/22 09:25, Antony Stone wrote:


If I simply do

Tracker="${CDR(uniqueid)}";

it works as required.

It's just not the sort of syntax I've seen in any other language, and it feels
(to me) weird.


^^^ Yup!  This is what I was suggesting in my last email.  Just add quotes.


Think of it this way.  Compared to other languages.. If you want to do 
math, do math, if you want to use a string, use a string.  I think it 
follows the convention quite nicely, other than the weird behavior of 
AEL of when you use an assignment of mixed text-math without quoting.



c

a = 1 + 1; /* correct */
b = "foo"; /* correct */
c = 1 + "bar"; /* syntax error */

perl

$a = 1 + 1;  # correct
$b = "foo";  # correct
$c = 1 + "bar"; # syntax error

php

$a = 1 + 1;
$b = "foo";
$c = 1 + "bar"; # treats "bar" as 0, results in a runtime warning, final 
value: $c=1


python

a = 1 + 1 # correct
b = "foo"  # correct
c = 1 + "bar" # runtime error


So... the only weird thing here... is AEL 'works' with " 
 ", and does something unexpected with it



Maybe the documentation: "NOTE: AEL wraps the right hand side of an assignment
with $[ ] to allow expressions to be used If this is unwanted, you can protect
the right hand side from being wrapped by using the Set() application." could
be enhanced to point out that quote marks can overcome the problem as well?

https://wiki.asterisk.org/wiki/display/AST/AEL+Variables


Antony.




Thanks for the suggestion.. I'll update the documentation and add some 
examples.


--
_
-- 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] Originate with label?

2022-08-31 Thread Mark Murawski

On 8/31/22 05:29, Antony Stone wrote:



What I am suggesting is that Tracker=${CDR(uniqueid)} should be converted
by AEL into Set(Tracker=${CDR(uniqueid)}) in order to avoid this sort of
surprise.

On the flip-side... anyone who currently relies on purely
numeric/boolean handling of the current implementation would be
incredibly surprised to find their AEL suddenly broken... so we need to
take that into account.

Indeed.

I realise that the better solution might be to wrap assignments (inside Set()
or MSet(), no matter) with $[..] *only* if the expressions contain arithmetic
operators + - * / and not if they are simple a=b assignments, including
a=${b}.

This would ensure that even if ${b} expanded to something containing a dash,
it would be interpreted as a mathematical minus sign in a=${b}




I would hesitate about making this happen as well.. without a 
migration-plan in place.


Typically:
1) Add a new option that would flip the behavior of var=val sets to 
auto-detect math and act accordingly on whether or not to use $[] (which 
comes with its own issues)


2) Warn about the change in the application: Ie: In Asterisk 20 there 
would be a warning stating in Asterisk 21 this will be the new default 
behavior



But, there's issues with auto-detecting math.  Because it's impossible 
for a compiler/transpiler to correctly assess *intent*. It can read the 
symbols and say, "Oh, I see you have some math symbols here, lets force 
this to math mode" in a purely search and replace context.  Here's the 
problem with that.  Variables can contain all kinds of (very 
unpredictable from a compiler perspective) stuff.


How is the compiler supposed to tell the difference between the 
following examples, for intent

var1 = ${a} + ${b} / ${c};
var2 = Hello World / Hello Bob / Hello Sue
var3 = *1*1*1* HEY THERE IS A PROBLEM *1*1*1
var4 = This-Is-Some-Dash-Separated-Data: 1-2-3-4-5-6

I'm not saying I personally write code like this, but there are some 
quick examples that can easily proof this to be the wrong approach


I think what you're looking for is quoted strings.
var1 = "This-Is-Some-Dash-Separated-Data: 1-2-3-4-5-6"
Which gets converted to an MSet(var1=$[ 
"This-Is-Some-Dash-Separated-Data: 1-2-3-4-5-6" ])


Which considering MSet actually has a desired behavior here of removing 
quotes, your value of var1 will be exactly what you expect it to be



AEL

   => {

    var = "hi there - what's - up 0 * 1 / 4 not math";

    NoOp(${var});

  }


Dialplan:

vbox-markm-x64*CLI> dialplan show @services

[ Context 'services' created by 'pbx_ael' ]

  '' => 1. MSet(var=$[ "hi there - what's - up 0 * 1 / 4 not 
math"]) [pbx_ael]

    2. NoOp(${var})   [pbx_ael]



Execution:

MSet(var="hi there - what's - up 0 * 1 / 4 not math")

NoOp(hi there - what's - up 0 * 1 / 4 not math)


-- 
_
-- 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] Originate with label?

2022-08-30 Thread Mark Murawski

On 8/30/22 17:51, Mark Murawski wrote:

On 8/30/22 12:34, Antony Stone wrote:

I want.

However writing:
Tracker=${CDR(uniqueid)};

results in:
MSet(Tracker=-1661872057.2349)

systemname is missing.

Hi Antony,

This is not a problem with MSet.
No, it is indeed the documented behaviour of MSet "MSet behaves in a 
similar
fashion to the way Set worked in 1.2/1.4 and is thus prone to doing 
things

that you may not expect."



Please re-evaluate what I wrote previously.  Again, this is not a 
problem with MSet.  You can see this for yourself if you do an inline 
MSet(Tracker=${CDR(uniqueid)});  this will work fine.


Just because the documentation says that MSet should not be used, it's 
not appropriate to blame all undesirable behaviors on MSet(), since 
clearly MSet() is not the problem here.



Let me correct myself.  The documentation doesn't say it shouldn't be 
used... it's making you aware of possible side-effects.  It's perfectly 
legitimate to use MSet() if you prefer the assumptions/behaviors of 
MSet() as opposed to the assumptions/behaviors of Set().


-- 
_
-- 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] Originate with label?

2022-08-30 Thread Mark Murawski

On 8/30/22 12:34, Antony Stone wrote:

I want.

However writing:
Tracker=${CDR(uniqueid)};

results in:
MSet(Tracker=-1661872057.2349)

systemname is missing.

Hi Antony,

This is not a problem with MSet.

No, it is indeed the documented behaviour of MSet "MSet behaves in a similar
fashion to the way Set worked in 1.2/1.4 and is thus prone to doing things
that you may not expect."



Please re-evaluate what I wrote previously.  Again, this is not a 
problem with MSet.  You can see this for yourself if you do an inline 
MSet(Tracker=${CDR(uniqueid)});  this will work fine.


Just because the documentation says that MSet should not be used, it's 
not appropriate to blame all undesirable behaviors on MSet(), since 
clearly MSet() is not the problem here.


You agreed below that $[] is not what you expected var=val to do... 
but... despite being unexpected, it's actually the defined behavior.  
And since there is no official specification for AEL, the specification 
for AEL is what AEL does.  (And I'm not trying to give you a hard time 
on this.. I'm just stating facts:  This is very much like Perl 
language.. where the spec for Perl *is* the Perl interpreter).


In this case, what the language does... is what it's supposed to do 
(unless it's a bug).  Ie: any inherent behaviors especially major 
transpiling behaviors, are going to stay the way they are as to not 
break people's existing usages of it.  I didn't write the AEL system, 
I'm just maintaining it.  So I'm not trying to "defend my honor" or 
anything.  I'm just stating the reality of the situation about 
maintaining compatibility and not making a major change to the language 
for syntactic sugar sake.


If you still need clarification as to why MSet isn't the problem, then 
this example should clear it up:


extensions.conf
MSet(Tracker=${CDR(uniqueid)});       // works as expected
MSet(Tracker=$[${CDR(uniqueid)}]);   // undesirable, due to conversion 
to math/boolean


extensions.ael
MSet(Tracker=${CDR(uniqueid)});    // works as expected
MSet(Tracker=$[${CDR(uniqueid)}]);    // undesirable, due to conversion 
to math/boolean


extensions.ael
Tracker=${CDR(uniqueid)};  // converted to 
MSet(Tracker=$[${CDR(uniqueid)}]);   which is the same *exact* behavior 
of extensions.conf



So... you can see from the above..  if you put your assignment value 
containing a string into a $[]  you'll loose the string value, 
regardless of whether or not it's an AEL var=val assignment or not.







I think we'll have to disagree on what a programmer "expects" a syntax like
var=value to do, then.


The fix/workaround is to explicitly use Set() when you need to work with
anything non-numeric and non-boolean

True, and that is precisely what I have been doing in order to avoid such
problems.  This example slipped through my conversion process (I've been
converting previously-non-AEL dialplans into AEL because I prefer the general
style).

What I am suggesting is that Tracker=${CDR(uniqueid)} should be converted by
AEL into Set(Tracker=${CDR(uniqueid)}) in order to avoid this sort of
surprise.


On the flip-side... anyone who currently relies on purely 
numeric/boolean handling of the current implementation would be 
incredibly surprised to find their AEL suddenly broken... so we need to 
take that into account.





If someone knows they want to perform arithmetic, they can write
Result=$[${var1}-4] and end up with Set(Result=$[${var1}-4]) after AEL has
done its transpilation.


When I write AEL needing arithmatic, i use var=val notation, skipping 
the need for Set and $[]

I still intend to abide by the documentation for MSet "Avoid its use if
possible.", and I simply think it would be good if AEL: did the same.




I'm a huge fan of enhancements and improvements and bug fixes, but as 
noted, MSet isn't the problem here.  I'll look into making an option 
available on switching the 'setter', but making the change from MSet to 
Set will not fix your issue.  But... currently I don't see a justifiable 
reason to make this a thing, unless there's actual problems demonstrated 
with the fact that MSet is being used.





--
_
-- 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] Originate with label?

2022-08-30 Thread Mark Murawski

On 8/30/22 11:16, Antony Stone wrote:

If I write in my AEL dialplan:

Set(Tracker=${CDR(uniqueid)});

this results in executing:

Set(Tracker=eagle.domain.com-1661872057.2349)

Just what I want.

However writing:

Tracker=${CDR(uniqueid)};

results in:

MSet(Tracker=-1661872057.2349)

systemname is missing.


Hi Antony,

This is not a problem with MSet.

Keep in mind that AEL is a transpiler, the AEL itself is not evaluated 
at the time of execution... extensions.conf-style dialplan is what's 
being executed.




Also... keep in mind that var=val assignments always use surround the 
value with $[]  which will either evaluate math or boolean expressions.


Since 'eagle.domain.com' is not numeric, and not boolean, it's expected 
it would not be included in the final value.


If you do a 'dialplan show' on the context after AEL has processed it, 
you'll clearly see the MSet and ${CDR(uniqueid)} being inside $[]


If you run the same code through extensions.conf you'll get exactly the 
same result... so I would call this expected behavior.


The fix/workaround is to explicitly use Set() when you need to work with 
anything non-numeric and non-boolean



--
_
-- 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] Originate with label?

2022-08-29 Thread Mark Murawski

On 8/29/22 14:00, aster...@phreaknet.org wrote:



This is a mockup of what the new-style if/else processor would output

    26. NoOp(AEL IF("\${DIALSTATUS}" == "BUSY") -- 
extensions.ael:1405)

    27. GotoIf($["${DIALSTATUS}" == "BUSY"]?28:30)
    28. Set(voiceMailOptions=b)
    29. Goto(32)
    30. NoOp(AEL ELSE -- extensions.ael:1409)
    31. Set(voiceMailOptions=u)
    31. NoOp(AEL END ELSE -- extensions.ael:1410)
    32. NoOp(AEL END IF("\${DIALSTATUS}" == "BUSY") 
-- extensions.ael:1411)

    33. NoOp(DoStuff)


Why all the GotoIfs? Why not just use the If/EndIf applications 
(assuming they get merged)? Much cleaner syntax:


If($["${DIALSTATUS}"="BUSY"])
Set(voiceMailOptions=b)
Else()
Set(voiceMailOptions=u)
EndIf()

NA


That's definitely very doable.  If/Else/Endif was not available at the 
time AEL was created.  This would be much cleaner code generation as well.


--
_
-- 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] Originate with label?

2022-08-29 Thread Mark Murawski

On 8/29/22 09:30, Antony Stone wrote:


It is, although there are ways I think it can be improved - I'm wondering how
best to go about proposing these.

The most obvious for now are:

  - please can "a=1;" be converted to use Set() instead of MSet() (especially
since MSet is officially deprecated)?


Currently being discussed!  We can definitely continue talking about the 
pros and cons of adding an option for this or maybe finding another way 
altogether.



  - same thing for for (;;)


I see that for (;;) produces an empty MSet().  Definitely this can be 
cleaned up.  Thanks for bringing this up.  In the meantime you can use 
while (1)




  - please can gosub be added, to convert into Gosub() (matching goto
converting to Goto())?  The & syntax is completely different from the rest of
the language, and also creates redundant assignments at the start of the
subroutine for parsing the parameters.  Now that macros are deprecated in
favour of subroutines, it makes sense, I think, to make gosub a part of AEL.


I agree that AEL keyword 'gosub' should exist.  That's been one of my 
todo items.  From not only a consistency perspective, but from a syntax 
checking perspective it would benefit from reporting whether or not your 
gosub destination exists or not, just like goto will complain that the 
destination doesn't exist when the context/extension/priority used is 
not valid.


The '&' syntax does use GoSub under the hood, and not the deprecated 
Macro().  And I'm not sure what you mean by redundant parameters?  When 
you use AEL 'macro' to define a '& destination', it uses the positional 
parameters that are passed in as ARG1/ARG2/etc that are inherent in 
using GoSub and converts them to more friendly named-parameters (as 
defined in the macro definition).  This is why there's always a group of 
MSet's generated when using AEL 'macro'.  If you don't want these extra 
MSets, then feel free to define a straight up context to GoSub into and 
you can do your own parameter processing using ARG1/ARG2/etc




  - it would be great if the redundant NoOp()s which get created by if .. else,
while ... and for(;;) could be (maybe optionally?) removed from the resultant
dialplan code - otherwise you end up with lots of added commands such as
NoOp(Finish if_if_fromTrunk_208_209); in the output.



They aren't redundant specifically, they were left in there (not by me) 
for debugging/tracing purposes.  But for the casual user, I agree they 
are mysterious and not very useful. My idea to address this is to 
instead report on the actual if condition to assist with 
tracing/troubleshooting.


This is a mockup of what the new-style if/else processor would output

    26. NoOp(AEL IF("\${DIALSTATUS}" == "BUSY") -- 
extensions.ael:1405)

    27. GotoIf($["${DIALSTATUS}" == "BUSY"]?28:30)
    28. Set(voiceMailOptions=b)
    29. Goto(32)
    30. NoOp(AEL ELSE -- extensions.ael:1409)
    31. Set(voiceMailOptions=u)
    31. NoOp(AEL END ELSE -- extensions.ael:1410)
    32. NoOp(AEL END IF("\${DIALSTATUS}" == "BUSY") -- 
extensions.ael:1411)

    33. NoOp(DoStuff)


My idea is that the 'if' block would be preceded by outputting the 
logical condition we're about to check, along with the original ael line 
number, and then at the end of the if block, we would get an associated 
END IF with the original ael line number.  This would enable the ability 
to quickly locate the code where conditions are being used and also be 
able to look at the logs and see why your code is doing what it's doing 
without a lot of extra verbosity and without needing a lot of work to 
find which ael-lines are running.



  - finally, it would be good if the documentation could be clear about whether
the extensions.conf [general] section can be substituted using AEL.  I haven't
yet worked out whether this is possible or not.



[general] section options are not available in ael... currently there's 
no mechanism to support that sort of thing.


bracket items like [general] aren't supported in the AEL parser. and 
some of the options don't even make sense and/or apply to AEL like 
static/writeprotect


--
_
-- 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] Originate with label?

2022-08-29 Thread Mark Murawski

On 8/29/22 10:15, Antony Stone wrote:

But!  What specific reason do you have for wanting Set() instead of
MSet() for all assignments that can't be otherwise just written as an
in-line Set() instead?

I *am* currently writing inline Set() everywhere, but surely the syntax "a=1;"
instead of "Set(a=1);" is supposed to be one of the advantages of AEL over
standard Asterisk dialplan language?


Hi Antony,

Right... using a=1; one advantage of using AEL, so you don't have to 
type Set() everywhere... but what I'm trying to get at is... and my 
original question is:  what specific situation prevents you from using 
a=1; style syntax?  Why are you feeling the need to use Set(a=1) instead 
of a=1.  What are specific examples where the 'straight-assignment' 
isn't working for you?





Note: Make sure to use 'Reply All'.. I typically do a list reply and 
direct reply.


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

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

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

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

Re: [asterisk-users] Originate with label?

2022-08-29 Thread Mark Murawski

On 8/29/22 09:53, Antony Stone wrote:

On Monday 29 August 2022 at 15:35:09, Joshua C. Colp wrote:


MSet is not deprecated.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_MSet
includes the sentence "MSet behaves in a similar fashion to the way Set worked
in 1.2/1.4 and is thus prone to doing things that you may not expect." and
ends with "Avoid its use if possible."

So, that may not mean "officially deprecated", but it still strongly suggests to
me that it's undesirable for AEL to convert all assignments into MSet instead
of Set (allowing the user to explicitly write MSet if that's what's desired).


Antony.



Some users of AEL might rely on the 'odd behavior' of MSet (the most 
obvious of which is the removal of quotes).  This would definitely have 
to be an option if all conversions were to use Set instead of MSet.


But!  What specific reason do you have for wanting Set() instead of 
MSet() for all assignments that can't be otherwise just written as an 
in-line Set() instead?


Also.. if you specifically want to use Set(), there's nothing preventing 
you from just using Set()


The assignment (ex: a=1) style shortcut is mostly useful for math-based 
operations. such as making nice syntactic sugar for something like:

a = ${a} + 1

You can of course accomplish math operations a traditional Set() by 
using traditional $[] syntax.  So for the intended purposes it's pretty 
much a shortcut for simple assignments or math.  Anything else, you 
would need to call Set() directly.




--
_
-- 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] Originate with label?

2022-08-29 Thread Mark Murawski

On 8/29/22 08:48, Mark Murawski wrote:

On 8/29/22 08:31, Antony Stone wrote:

Hi.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Application_Originate 



I need to use Originate() in a dialplan, pointing to another location 
in the

same extension of the same context, so for example:

Originate(Local/${Dest}@Dialout,exten,${CONTEXT},${EXTEN},158);

I don't seem to be able to substitute the priority 158 with a label - 
is this

deliberate or is this a bug?

If it is deliberate, is there any workaround which would enable me to 
use
Originate when the dialplan is written in AEL, which makes it not 
possible for

me to define priority numbers?

(Alternatively, is there a way to define priority numbers in AEL?)

I'd prefer the first solution - being able to use Originate with a 
label as the

target - as it's neater and more generic.


Thanks,


Antony.



Hi Anthony,

I love to hear about AEL use-cases.  I'm happy that AEL is working out 
for you.


Without modifying the code for Originate(), you can do this while 
staying purely in AEL

Here's your workaround:


context something {
  s => {
Originate(Local/${Dest}@Dialout,exten,${CONTEXT},GotoLabel,1,,v(GotoExten=${EXTEN}^GotoLabel=LabelName));
  }

  GotoLabel => {
    goto ${CONTEXT}, ${GotoExten}, ${GotoLabel};
  }
}




And, additionally.  You really *should* be breaking down components into 
their own macros or extension blocks.  Adding labels to jump into the 
middle of an extension is typically a sign that you've outgrown your 
overall design.


It's much. much. much easier to build a system up from different 
contexts,extensions and use goto/gosub and make your system more modular 
instead of having one-giant-context with one-giant-extension that tries 
to do everything.



Hope this helps!



--
_
-- 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] Originate with label?

2022-08-29 Thread Mark Murawski

On 8/29/22 08:31, Antony Stone wrote:

Hi.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Application_Originate

I need to use Originate() in a dialplan, pointing to another location in the
same extension of the same context, so for example:

Originate(Local/${Dest}@Dialout,exten,${CONTEXT},${EXTEN},158);

I don't seem to be able to substitute the priority 158 with a label - is this
deliberate or is this a bug?

If it is deliberate, is there any workaround which would enable me to use
Originate when the dialplan is written in AEL, which makes it not possible for
me to define priority numbers?

(Alternatively, is there a way to define priority numbers in AEL?)

I'd prefer the first solution - being able to use Originate with a label as the
target - as it's neater and more generic.


Thanks,


Antony.



Hi Anthony,

I love to hear about AEL use-cases.  I'm happy that AEL is working out 
for you.


Without modifying the code for Originate(), you can do this while 
staying purely in AEL

Here's your workaround:


context something {
  s => {

Originate(Local/${Dest}@Dialout,exten,${CONTEXT},GotoLabel,1,,v(GotoExten=${EXTEN}^GotoLabel=LabelName));
  }

  GotoLabel => {
goto ${CONTEXT}, ${GotoExten}, ${GotoLabel};
  }
}


--
_
-- 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] Pickup with pjsip not working

2022-03-30 Thread Mark Murawski

On 3/1/22 05:59, Karsten Wemheuer wrote:

Am Dienstag, dem 01.03.2022 um 06:37 -0400 schrieb Joshua C. Colp:

On Tue, Mar 1, 2022 at 6:14 AM Karsten Wemheuer  wrote:

Hi *,

i am currently trying to migrate from chan_sip to pjsip. I am using
Asterisk version 18.10.

In chan_sip information about the pickup was sent in the XML body
of
the NOTIFY requests:

/---





\---


If I use pjsip, the pickup information is missing:

/---


  
   

\---

Many phones expect this information and cannot perform a pickup.

Where does this need to be configured or does this not work in
pjsip?


It does not appear as though anyone has written support for this in
PJSIP.


Do You know, if someone is working on this? Maybe I can help. Is it
part of the upstream project or would it be built somewhere into
res/res_pjsip.XXX?

Karsten




Hi Karsten,

You can try posting a bounty for a work-for-hire to add this support 
into Asterisk in the asterisk-biz mailing list.


I would expect the fee for an add like this to be a few thousand USD. 
But there's also a possibility that a volunteer may step up to write 
this code as well.


--
_
-- 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] Decimal seconds?

2022-03-28 Thread Mark Murawski

Hi Antony,

NOW is not a variable...

In the majority of cases (the exceptions are things like CUT)... 
variables are utilized by ${}


If NOW was a variable you would see it written as ${NOW}

The word NOW is actually not special.  Deep in the Asterisk source (if 
you are curious), the flow is this:



acf_strftime
 -> ast_get_timeval


"NOW" gets passed as a string to ast_get_timeval, which really scans for 
a numeric unixtime.  If the scan fails (if the input is not a proper 
seconds-since-epoch-unixtime), then it uses a default.


Oddly enough you could pass "POTATO" to STRFTIME and it would work just 
fine... since no matter what the value is, if it doesn't parse properly 
the default is ast_tvnow which is a high resolution 'now'






On 3/16/22 09:01, Antony Stone wrote:

On Wednesday 16 March 2022 at 13:38:44, Tom Ray wrote:


What have you actually tried? STRFTIME(NOW,America/Detroit,%3q) doesn't
work?


That works - thank you for the pointer.  I was not aware of the word "NOW" - I
have always used the variable ${EPOCH} when I needed a timestamp.

Do you know where this is documented?  I would have expected it to be in
https://wiki.asterisk.org/wiki/display/AST/Asterisk+Standard+Channel+Variables
for example, which does mention ${EPOCH}, and also shows an example of
${STRFTIME()}, using ${EPOCH} as the timestamp value.


Antony.




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

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

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

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

Re: [asterisk-users] extensions.conf asterisk 18.8.0 question

2022-01-14 Thread Mark Murawski

If you're executing /usr/bin/rm directly, shell aliases will have no effect.


On 1/11/22 11:29, Antony Stone wrote:

On Tuesday 11 January 2022 at 17:20:44, Michael Englehorn wrote:


If you're on RHEL or CentOS or one of its descendants,

Oh, now that reminds me that those systems also tend to alias "rm" to "rm -i",
so they won't delete files without confirmation.

Irritating in general IMHO, but it might be the cause of your puzzlement...


‐‐‐ Original Message ‐‐‐

On Monday, January 10th, 2022 at 1:03 PM, Jerry Geis wrote:

I am trying to run this command:
exten => _4XX,n,System(/usr/bin/rm /tmp/test.incoming.txt)


 From the log:
Executing [402@smvoice-sip:7] System("SIP/103-0018", "/usr/bin/rm
/tmp/test.incoming.txt") in new stack


Is "rm" not an allowed command - the above file is not removed.
-rw-rw-rw- 1 silentm silentm 3 Jan 10 14:02 /tmp/test.incoming.txt


Antony.




--
_
-- 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 16.23.0 doesn't respond anymore

2021-12-15 Thread Mark Murawski

Hi Daniel,

This is a production server which is running well over years (asterisk 
11-13-16) and this happend with the latest version. Only valid option 
you gave is the core show locks. I ask the list before opening a bug 
report, as usually.




Please don't let the fact that the system has been running just fine 
with no issue affect anything in your process related to this problem.  
Sure... Asterisk 11 was okay for you.   Sure: Asterisk 13 was okay with 
you... and so on.  But obviously something is new and different with the 
new Asterisk you've set up with has nothing to do with what your 
Asterisk did a year ago.  None of that helps with debugging the current 
problem you're facing.


In order to get this fixed you'll 100% need to be able to submit a bug 
report with enough information in order for someone to investigate this 
and get a resolution.  The information required is generally laid out in 
the guidelines linked to earlier.   It will also help to upload your log 
file from several minutes prior and up until the lockup.  Please feel 
free to mask out any confidential information from the logs that you 
don't want shared publicly.





And for the name, emails are always signed with first name ;)


The email is signed with the first name of the account information that 
your email system is set up with... not your actual name.  You 
definitely should change your name away from Administrator










On 12/13/21 12:24, Administrator wrote:
Complement: restarting asterisk does the job and everything come 
back to normal.



That's typical of most software... this in itself is not a fix. Needing 
to restart Asterisk because it stops responding is a really bad problem 
and definitely needs to be fixed.  And with your help the developers can 
find this issue and make sure this doesn't happen to other people as well.



Thanks!




--
_
-- 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 16.23.0 doesn't respond anymore

2021-12-13 Thread Mark Murawski

Hi,

1) You should change your name on your email client so it doesn't say 
"Administrator"


2) Please follow the instructions at 
https://wiki.asterisk.org/wiki/display/AST/Installing+Asterisk+From+Source


3) Compile with DEBUG_THREADS and DONT_OPTIMIZE, but note this will 
incur a performance hit.  Test this on a lab/testing environment if you can.


4) Reproduce your lockup problem.

5) Save the output of 'core show locks'

6) Enable core dumps in your environment, Get a core dump 
https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace


7) Post your findings back to the list and/or submit a bug report 
following the guidelines here: 
https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines




On 12/13/21 12:24, Administrator wrote:
Complement: restarting asterisk does the job and everything come back to 
normal.


Le 13/12/2021 à 18:13, Administrator a écrit :

Hi list,

we faced on 2 different asterisk servers an identical problem (16.23.0 
compiled as well as 16.2.1~dfsg-1+deb10u2 packaged for Debian Buster)


[lot of same before ...]
[2021-12-13 17:13:33] WARNING[3923454] chan_iax2.c: Max retries 
exceeded to host 10.99.3.24 on IAX2/33388917474-20089 (type = 6, 
subclass = 11, ts=3879966, seqno=91)
[2021-12-13 17:13:38] WARNING[3923450] chan_iax2.c: Max retries 
exceeded to host 10.99.3.24 on IAX2/33388917474-20089 (type = 6, 
subclass = 2, ts=3884984, seqno=92)
[2021-12-13 17:13:40] WARNING[3923447] chan_iax2.c: Max retries 
exceeded to host 10.99.3.24 on IAX2/33388917474-24830 (type = 6, 
subclass = 11, ts=3919975, seqno=100)
[2021-12-13 17:13:43] WARNING[3923448] chan_iax2.c: Max retries 
exceeded to host 10.99.3.24 on IAX2/33388917474-20089 (type = 6, 
subclass = 11, ts=3889966, seqno=93)
[2021-12-13 17:13:47] WARNING[3923450] chan_iax2.c: Max retries 
exceeded to host 10.99.3.24 on IAX2/33388917474-24830 (type = 6, 
subclass = 2, ts=3926989, seqno=101)
[2021-12-13 17:13:50] WARNING[3923453] chan_iax2.c: Max retries 
exceeded to host 10.99.3.24 on IAX2/33388917474-24830 (type = 6, 
subclass = 11, ts=3929974, seqno=102)
[2021-12-13 17:13:53] WARNING[3923447] chan_iax2.c: Max retries 
exceeded to host 10.99.3.24 on IAX2/33388917474-20089 (type = 6, 
subclass = 11, ts=3899966, seqno=94)
[2021-12-13 17:13:59] WARNING[3923448] chan_iax2.c: Max retries 
exceeded to host 10.99.3.24 on IAX2/33388917474-20089 (type = 6, 
subclass = 2, ts=3905984, seqno=95)

[lot of same after ...]

and asterisk doesn't respond anymaore. Logs on console and in files 
are written but iax as well as pjsip doesn't respond, running calls 
are dead.


The above errors appears only for this one IAX trunk, no info about 
the others but on their side registrations is gone and they try to 
reconnect. Same for PJSIP client, they try to reconnect but no answer 
from asterik.


Any clue ?




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

2013-10-18 Thread Mark Murawski

On 10/17/13 23:06, John T. Bittner wrote:

Today I was hacked but caught it very quickly. This is the weird part,
they hacked an IP Auth based account by simply knowing the account name.


How is this possible? I am running Asterisk 11.5.0. Now it’s my fault I
used a dictionary based account name but how did they bypass the set ip
I had under the account for this host.



Any chance your sip peer was configured like this?

[accountname]
host=10.9.8.7



Without seeing your settings it's quite difficult to come up with 
accurate possibilities of what happened.


The above example will allow *all* ip addresses with no password!. 
Because there is no permit+deny (you need to use both)





--
_
-- 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 do *you* test your changes to dialplans ruled by GotoIfTime?

2012-12-27 Thread Mark Murawski

On 12/27/2012 07:36 PM, Ron Wheeler wrote:

On 27/12/2012 3:14 PM, Carlos Alvarez wrote:

On Thu, Dec 27, 2012 at 12:46 PM, Ernie Dunbar maill...@lightspeed.ca
mailto:maill...@lightspeed.ca wrote:

This past holiday weekend has resulted in some real groaners when
it comes to bugs in our dialplan, making obvious the need for some
changes in our procedures.

First, our hours of operation for Christmas Eve, Christmas, Boxing
Day and New Year's Eve had changed with little to no notice. Okay,
fine, whatever, I fix.


Boxing day???  Seriously?  There's a holiday for people who beat each
other up?  TIL.

That is the day you box up all the crap you got and exchange it for what
you really wanted.
It is a religious holiday in the old British Commonwealth (probably
Scottish in origin).

Ron



But anyway the best way to test time-based rules is on a VM that has a
copy of your configs, and just change the time.  You can easily run a
small VM to accomodate a copy of your main server on almost any computer.

--
Carlos Alvarez
TelEvolve
602-889-3003




What about using TESTTIME

core show function TESTTIME



--
_
-- 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] Cannot resume call on hold

2012-04-07 Thread Mark Murawski

Asterisk 1.8.5
Polycom Bootrom 4.4.0
Polycom spip 4.0.1

They are all sip devices talking to each other.
Polycom phone A puts polycom phone B on hold, Phone A tries to unhold 
the caller but the line button is still flashing on hold like nothing 
happened.


All sip peers are directmedia/canreinvite=no, no nat, all communication 
is on the local lan.  It's as simple as it can be.


I haven't touched my asterisk version in a while and all of a sudden 
this started happening.


I'll have a sip debug in the next day or two, but in the meantime is 
there something someone can shed some light on?



Thanks,
-Mark

--
_
-- 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 1.6 = No sound/voice when i redirect the call

2011-04-03 Thread Mark Murawski
In that situation, I've had to do a pickup macro that kind of primes 
the audio.


Dial(SIP/MyOperator/${NUMAPPEL},180,rtU(start-audio))

context start-audio {
  s = {
Playback(silence/1);
  }
}

The above might help... What it does is plays an audio track on the 
callee's channel (SIP/MyOperator-) before bridging the audio.



On 04/03/11 12:01, Olivier CALVANO wrote:

Hi

i use this into my extension :


 exten =  _00339,1,Set(foo=${SIP_HEADER(To)})
 exten =  _00339,2,Set(cut1=${CUT(foo,:,2)})
 exten =  _00339,3,Set(CLI=${CUT(cut1,,1)})
 exten =  _00339,4,Set(toexten=${CUT(CLI,@,1)})
 exten =  _00339,5,Noop(ORIGINAL NUMBER : [ ${toexten} ])
 exten =  _00339,6,AGI(Ddi-Network.agi,${toexten})
 exten =  _00339,7,Set(CALLERPRES()=prohib_not_screened)
 exten =  _00339,8,Dial(SIP/MyOperator/${NUMAPPEL},180,rt)
 exten =  _00339,9,Hangup


and i have in sip.conf:


[MyOperator]
type=peer
host=host-of-my-operator
qualify=yes
dtmf=rfc2833
nat=no
canreinvite=no
canredirect=yes
insecure=port,invite
dtmfmode=rfc2833
disallow=all
allow=g729
allow=alaw
allow=g723
defaultuser=0033xx
secret=x



When i call directly from [MyOperator], no probleme i have sound/Voice
but when a customer call to the 00339xxx.., the call are correct, asterisk
call to my standard SIP/MyOperator/${NUMAPPEL} but no sound/voice
(i receive the call without problems, only sound off)

anyone have a idea of this problems ?

bye
Olivier

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

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



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

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


Re: [asterisk-users] Asterisk 1.6 = No sound/voice when i redirect the call

2011-04-03 Thread Mark Murawski
I gave you the syntax in ael format, if you want to use extensions.conf 
you'll have to use the syntax that's applicable, which is:


[start-audio]
exten = s,1,Playback(silence/1)


On 04/03/11 14:14, Olivier CALVANO wrote:

Hi Mark

Thanks for your answer, but i am new in asterisk ;=) the context
start-audio ...
i put it into the extension.conf ?

because i have a error:

[Apr  3 20:12:08] WARNING[28078]: config.c:1154 process_text_line: No
'=' (equal sign) in line 134 of /etc/asterisk/extension-operator.conf
[Apr  3 20:12:08] WARNING[28078]: config.c:1154 process_text_line: No
'=' (equal sign) in line 136 of /etc/asterisk/extension-operator.conf
[Apr  3 20:12:17] WARNING[28078]: pbx_config.c:1499 pbx_load_config:
==!!== Unknown directive: s at line 135 -- IGNORING!!!

thanks for your help

olivier




2011/4/3 Mark Murawskimarkm-li...@intellasoft.net:

In that situation, I've had to do a pickup macro that kind of primes the
audio.

Dial(SIP/MyOperator/${NUMAPPEL},180,rtU(start-audio))

context start-audio {
  s =  {
Playback(silence/1);
  }
}

The above might help... What it does is plays an audio track on the callee's
channel (SIP/MyOperator-) before bridging the audio.


On 04/03/11 12:01, Olivier CALVANO wrote:


Hi

i use this into my extension :


 exten =_00339,1,Set(foo=${SIP_HEADER(To)})
 exten =_00339,2,Set(cut1=${CUT(foo,:,2)})
 exten =_00339,3,Set(CLI=${CUT(cut1,,1)})
 exten =_00339,4,Set(toexten=${CUT(CLI,@,1)})
 exten =_00339,5,Noop(ORIGINAL NUMBER : [ ${toexten} ])
 exten =_00339,6,AGI(Ddi-Network.agi,${toexten})
 exten =_00339,7,Set(CALLERPRES()=prohib_not_screened)
 exten =_00339,8,Dial(SIP/MyOperator/${NUMAPPEL},180,rt)
 exten =_00339,9,Hangup


and i have in sip.conf:


[MyOperator]
type=peer
host=host-of-my-operator
qualify=yes
dtmf=rfc2833
nat=no
canreinvite=no
canredirect=yes
insecure=port,invite
dtmfmode=rfc2833
disallow=all
allow=g729
allow=alaw
allow=g723
defaultuser=0033xx
secret=x



When i call directly from [MyOperator], no probleme i have sound/Voice
but when a customer call to the 00339xxx.., the call are correct,
asterisk
call to my standard SIP/MyOperator/${NUMAPPEL} but no sound/voice
(i receive the call without problems, only sound off)

anyone have a idea of this problems ?

bye
Olivier

--


--
_
-- 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] Removing Polycom Transfer Softkey

2011-03-27 Thread Mark Murawski

From the polycom pdf:

divert.fwd.x.enabled
If set to 1, the user will be able to enable universal call
forwarding through the soft key menu.

This sounds like it turns on and turns off the call forwarding feature 
on the phone.  I can try it out Monday, but I don't see where it has any 
relation to transfer (both attended and blind).





On 03/27/2011 08:43 PM, C F wrote:

In phone.cfg set the following line to
divert.fwd.1.enabled=0
from:
divert.fwd.1.enabled=1
For more info check page 323:
http://supportdocs.polycom.com/PolycomService/support/global/documents/support/setup_maintenance/products/voice/spip_ssip_vvx_Admin_Guide_SIP_3_2_2_eng.pdf



On Fri, Mar 25, 2011 at 6:33 PM, Mark Murawski
markm-li...@intellasoft.net  wrote:

Sorry for the crosspost.  This was supposed to be on -users


I know some of you are polycom gurus...

Anyone know how to remove transfer from a polycom 33x phone?  We've set
allowtransfer=no, but we would like to remove a polycom soft key as well.

--


--
_
-- 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] Removing Polycom Transfer Softkey

2011-03-25 Thread Mark Murawski

Sorry for the crosspost.  This was supposed to be on -users


I know some of you are polycom gurus...

Anyone know how to remove transfer from a polycom 33x phone?  We've set 
allowtransfer=no, but we would like to remove a polycom soft key as well.


--
_
-- 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] Dialplan to bridge 2 legs?

2011-01-23 Thread Mark Murawski

See pickup macros... the U option to Dial.


On Sun, 23 Jan 2011, Michelle Dupuis wrote:

I need to do some stuff in the dialplan BEFORE either leg of the call is
started...





--
_
-- 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] Top Posting

2011-01-17 Thread Mark Murawski

On 01/17/2011 08:26 PM, Matt Riddell wrote:

On 17/01/11 4:29 PM, jon pounder wrote:

Surely there is some mail client smart enough to be able to flip around
the levels of indenting so most recent is top or bottom.
If not quit bitching and make one - I will continue top posting since I
don't seem to be alone in preferring it.




That was one of the first things that came to mind.


I'm definitely more keen on inline replies - if you reply to 20 points
in someone's email you quote the part you're replying to then reply to it.


That was the standard for much of the 90's for emails.  I do like that 
method but most people don't seem to do it anymore.




In a long email it's the only way. Otherwise you'd scroll down to find
the question, scroll up to find the answer, scroll down to find the next
question, scroll up for the next answer etc - crazy.



It's also easier to keep the context of what's going on.  If replying in 
one big block, I try to keep the style of one paragraph of response for 
each paragraph of question, but sometimes stuff just mixes in between 
and you can easily lose context.



Much easier when replies are inline with the questions.



It gets hard to follow when there's a dozen nested levels of reply.  In 
conclusion, I think it just depends (tm).



--
_
-- 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] Top Posting

2011-01-16 Thread Mark Murawski
We obviously have all our own opinions about being on top or bottom. 
And it boils down to personal preference obviously.


I think in all cases, top posting is by far superior.  But I think the 
battle will continue ad infinitum.


One, because of speedups in finding the most recent content which will 
always be on the top.


Two, with the new content on top, reading list posts from any phone 
becomes really easy.  If you have a particular thread you're following, 
you can quickly look at the new reply without having to do anything 
other than open the email!  I don't know of any phone that's 'smart' 
enough to auto scroll to the bottom when you open up a list post where 
someone has bottom posted.





On 01/16/2011 10:17 PM, Tilghman Lesher wrote:

On Sunday 16 January 2011 20:47:56 James Miller wrote:

When you get over 500 emails a day on your blackberry you have make a
decision on what is or is not worth reading at that moment.


Clearly, then, the problem is your blackberry.  Ditch it.  Or stop
subscribing to list email on a device which is clearly not up to the task.

Or would you say that since it's inconvenient for you to clean up your dog
poo, you shouldn't have to pick it up?  And leave it where the rest of us
might step in it?  If you cannot be bothered to clean up after your dog,
maybe you shouldn't be taking your dog to the park.  Similarly, we may not
be able to fine you for failing to obey list rules, but the rules still
apply to you, like it or not.




--
_
-- 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] Top Posting

2011-01-16 Thread Mark Murawski

On 01/16/2011 10:28 PM, Mark Murawski wrote:

We obviously have all our own opinions about being on top or bottom. And
it boils down to personal preference obviously.



And it looks like I top posted, heh.  I just usually hit reply and start 
typing, the default is top.


I guess I go both ways. :P

--
_
-- 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] Top Posting

2011-01-14 Thread Mark Murawski


  
  
Seconded. Although I've succumbed to bottom posting on occasion
when following the convention of the ongoing thread.

On 01/14/2011 07:42 PM, Don Kelly wrote:

  
  
  
  
Bruce et al

Im posting a
  new thread with the Top Posting
  subject so I wont draw complaints about hijacking the
  4-port thread.

Top Posting
  refers to the practice of sending a message with
  a reply at the top and including the entire thread below
  the reply. I prefer
  this. If Im actively following a thread, the most-recent
  information
  appears at the top of the message I receive. If Ive
  missed part of the
  thread, I need to look only at the most recent message and
  scroll down a bit to
  see whats been happening.

Bottom
  Posting requires me to scroll through all of the
  history before I see the newest addition.

While
  scrolling down, I may see something new and realize
  that the sender has interleaved responses, addressing
  multiple points with
  individual responses.

Its been a
  while, but when I researched Top
  Posting I found this Wikipedia description:

Top-posting
  is a natural consequence of
  the behavior of the "reply" function in many current e-mail
  readers,
  such as Microsoft Outlook, Gmail,
  and others. By
  default, these programs insert into the reply message a copy
  of the original
  message (without headers and often without any extra
  indentation or quotation
  markers), and position the editing cursor above it. Moreover, a
  bug present on most
  flavours of Microsoft Outlook caused the quotation markers to
  be lost when
  replying in plain text to a message that was originally sent
  in HTML/RTF. In
  addition, users of mobile devices, like BlackBerries,
  are encouraged to use top-posting, because the devices only
  download the
  beginning of a message for viewing. The rest of the message is
  only retrieved
  when needed, which takes additional download time. Putting the
  relevant content
  at the beginning of the message requires less bandwidth, less
  time, and less
  scrolling for the Blackberry user.[4][5][6]
  For
  these and possibly other reasons, many users seem to accept
  top-posting as the
  "standard" reply style.
and an explanation of why people complain
  about it:
Objections
  to top-posting on newsgroups, as a rule, seem to come from
  persons who first
  went online in the earlier days of Usenet, and in communities that date
  to Usenet's early days.
  Until the mid-90s, top-posting was unknown and interleaved
  posting an obvious
  standard that all net.newcomers had to learn. Among the
  most vehement
  communities are those in the Usenet comp.lang hierarchy,
  especially
  comp.lang.c and comp.lang.c++. Top-posting is more
  tolerated on the alt hierarchy. Newer online
  participants, especially those with limited experience of
  Usenet, tend to be
  less sensitive to arguments about posting style.
When
  I post (which is rarely, as I have little to offer the
  list), I top post and
  explain that its my preference and I dont know how to do
  it
  effectively otherwise. This gives everyone fair warning to
  delete my posts
  before reading them.
--Don
Don Kelly
PCF Corp
  People Come First
  651 842-1000
  888 Don Kell(y)
  651 842-1001 fax

  
  

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

Re: [asterisk-users] Polycom Blf / Directed Pickup

2011-01-13 Thread Mark Murawski

 Yeah... My directory looks like this:

directory
item_list
item 
ln6288/lnfn/fnct6288/ctsd1/sdrt2/rtdc/ad0/adar0/arbw1/bwbb0/bb 
/item
item 
ln6208/lnfn/fnct6208/ctsd2/sdrt2/rtdc/ad0/adar0/arbw1/bwbb0/bb 
/item
item 
ln6234/lnfn/fnct6234/ctsd3/sdrt2/rtdc/ad0/adar0/arbw1/bwbb0/bb 
/item
item 
ln6205/lnfn/fnct6205/ctsd4/sdrt2/rtdc/ad0/adar0/arbw1/bwbb0/bb 
/item
item 
ln6231/lnfn/fnct6231/ctsd5/sdrt2/rtdc/ad0/adar0/arbw1/bwbb0/bb 
/item

/item_list
/directory



On 01/13/2011 10:20 AM, Sebastien Thomas wrote:

Is the buddy watch tag activated in yourmac-directory.xml file ?bw1/bw

item
lbSebastien/lb
fnSebastien/fn
lnThomas/ln
ct222/ct
sd1/sd
bw1/bw
/item

---
Sebastien Thomas
Amplisys Inc. - Digital Telephony Integration Specialists
T: 514.225.4141 x222 F: 514.225.4162 TF: 1-877-AMPLISYS


On 2011-01-13, at 1:32 AM, Mark Murawski wrote:


Would anyone happen to have some examples of polycom configs, specifically the 
650 with sidecar for blf.

I have the asterisk side all configured since I've set up blf with other types 
of phones, but I'm missing the polycom side.

I've put together amac-directory.xml, and the sidecar now lists numbers as 
speed dials but does not subscribe to blf.

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

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


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

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



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

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


Re: [asterisk-users] Polycom Blf / Directed Pickup

2011-01-13 Thread Mark Murawski

Thanks!  Blf is working now.   I forgot I had to set set subscribecontext.

When a phone is ringing, the blf light is solid red and the icon is a 
(/) type icon indicating unavailable.  I'm also interested in directed 
pickup.  I set up the following:


call.directedCallPickupString=*6 call.directedCallPickupMethod=legacy

Hitting the button next to the contact will speed dial the contact 
instead of pick up the ringing call.



On 01/13/2011 10:54 AM, Sebastien Thomas wrote:

Ok, that looks good.

We use FreePBX, and I know I had to modify a couple Asterisk files to
get the BLF working ... here are some of my mods but may also be used
for FOP2 (I dont recall which go for BLF and which go FOP2).

vi /etc/asterisk/sip_registrations_custom.conf
allowsubscribe=yes

vi /etc/asterisk/sip_custom.conf
callevents=yes
notifyringing=yes
limitonpeers=yes

I also override some of the sip.cfg settings in the polycom dir with:

feature
feature.1.enabled=1
feature.9.enabled=0
feature.18.enabled=1
/
pres
pres.reg=1
pres.idleSoftkeys=0
/


---
Sebastien Thomas
Amplisys Inc. - Digital Telephony Integration Specialists
T: 514.225.4141 x222 F: 514.225.4162 TF: 1-877-AMPLISYS

*** Need help? Contact supp...@amplisys.ca mailto:supp...@amplisys.ca ***



On 2011-01-13, at 10:29 AM, Mark Murawski wrote:


Yeah... My directory looks like this:

directory
item_list
item
ln6288/lnfn/fnct6288/ctsd1/sdrt2/rtdc/ad0/adar0/arbw1/bwbb0/bb
/item
item
ln6208/lnfn/fnct6208/ctsd2/sdrt2/rtdc/ad0/adar0/arbw1/bwbb0/bb
/item
item
ln6234/lnfn/fnct6234/ctsd3/sdrt2/rtdc/ad0/adar0/arbw1/bwbb0/bb
/item
item
ln6205/lnfn/fnct6205/ctsd4/sdrt2/rtdc/ad0/adar0/arbw1/bwbb0/bb
/item
item
ln6231/lnfn/fnct6231/ctsd5/sdrt2/rtdc/ad0/adar0/arbw1/bwbb0/bb
/item
/item_list
/directory



On 01/13/2011 10:20 AM, Sebastien Thomas wrote:

Is the buddy watch tag activated in yourmac-directory.xml file
?bw1/bw

item
lbSebastien/lb
fnSebastien/fn
lnThomas/ln
ct222/ct
sd1/sd
bw1/bw
/item

---
Sebastien Thomas
Amplisys Inc. - Digital Telephony Integration Specialists
T: 514.225.4141 x222 F: 514.225.4162 TF: 1-877-AMPLISYS


On 2011-01-13, at 1:32 AM, Mark Murawski wrote:


Would anyone happen to have some examples of polycom configs,
specifically the 650 with sidecar for blf.

I have the asterisk side all configured since I've set up blf with
other types of phones, but I'm missing the polycom side.

I've put together amac-directory.xml, and the sidecar now lists
numbers as speed dials but does not subscribe to blf.

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

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


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

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



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

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




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

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



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

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


[asterisk-users] Polycom Blf / Directed Pickup

2011-01-12 Thread Mark Murawski
Would anyone happen to have some examples of polycom configs, 
specifically the 650 with sidecar for blf.


I have the asterisk side all configured since I've set up blf with other 
types of phones, but I'm missing the polycom side.


I've put together a mac-directory.xml, and the sidecar now lists 
numbers as speed dials but does not subscribe to blf.


--
_
-- 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] Polarity Reverseal....with analog line

2011-01-05 Thread Mark Murawski
Looks like your telco is sending you polarity reversal on sending you a 
call.  Which is one of the types of setups for analog lines.l


From your console output it looks like the call was handled just fine 
other than the 'weird event' notification, which I'm not familiar with.




On 01/05/2011 11:50 AM, Edwin Quijada wrote:

Hi !
I ma having trouble with my PTSN line. When I call to my asterisk I get
this..

-- Executing [...@from-pstn:3] Hangup(Zap/5-1, ) in new stack
== Spawn extension (from-pstn, s, 3) exited non-zero on 'Zap/5-1'
-- Hungup 'Zap/5-1'
-- Starting simple switch on 'Zap/5-1'
[Jan 5 12:45:06] NOTICE[2893]: chan_dahdi.c:6869 ss_thread: Got event 17
(Polarity Reversal)...
[Jan 5 12:45:06] NOTICE[2893]: chan_dahdi.c:6869 ss_thread: Got event 17
(Polarity Reversal)...
[Jan 5 12:45:06] NOTICE[2893]: chan_dahdi.c:6869 ss_thread: Got event 17
(Polarity Reversal)...
-- Executing [...@from-pstn:1] Answer(Zap/5-1, ) in new stack
-- Executing [...@from-pstn:2] Playback(Zap/5-1, vm-intro) in new stack
-- Zap/5-1 Playing 'vm-intro' (language 'en')
[Jan 5 12:45:08] WARNING[2893]: chan_dahdi.c:4550 dahdi_handle_event:
Ring/Off-hook in strange state 6 on channel 5
-- Executing [...@from-pstn:3] Hangup(Zap/5-1, ) in new stack
== Spawn extension (from-pstn, s, 3) exited non-zero on 'Zap/5-1'
-- Hungup 'Zap/5-1'

I am using 1.4.30 and zaptel 1.12.

Any cluess?
*---*
*-Edwin Quijada
*-Developer DataBase
*-JQ Microsistemas
*-Soporte PostgreSQL
*-www.jqmicrosistemas.com
*-809-849-8087
*---*





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

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



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

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


Re: [asterisk-users] VoIP PoE phones for restaurant (kitchen)

2011-01-05 Thread Mark Murawski

On 01/05/2011 01:51 PM, Tom Rymes wrote:

On 01/05/2011 7:50 AM, Andy Graybeal wrote:


We've got two noisy kitchens that need to talk back and forth.


Andy,

Why, exactly, are you trying to combine an inter-kitchen intercom and
your phone system? Might it make more sense to have a non-phone-based
intercom system, plus a phone for making phone calls?

Tom

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



Phones make great intercoms when the volume gets loud enough.  The 
polycom 321/331 doesn't have a very loud speakerphone.  You may be 
interested in a paging system.


--
_
-- 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] Issues with Local Channel

2010-11-16 Thread Mark Murawski
Local channels behave like an endpoint.  So instead of a sip phone 
picking up the call, asterisk is picking up the call.

Instead of someone speaking into a sip phone, asterisk can play tracks, 
or record digits, etc.

You need to make sure that the call does not end before you're done with 
your local channel.  Your current use is incorrect and your call is 
going to hang up before it does much of anything.

Channel: Local/1...@dtmf
Application: NoOp

This is guaranteed to not work... asterisk will spawn the local channel 
one one leg, lets call it the source leg, and it will run the 
application NoOp on the destination leg.  The NoOp will run, there is 
then no more dialplan to run, so the call will be hung up.

Also... using the G option to dial, is probably not what you want.  You 
must think of a local channel as an end point.

I'm not sure if this will get you exactly what you want, but it should 
get you further along the path.

# destination dialplan
[read]
exten = 1,1,Answer()
exten = 1,n,Read(data,play-msg,4,,2,15)
exten = 1,n,Verbose(${data})
exten = 1,n,AGI(send_data.py,${data})
exten = 1,n,Hangup()

-- Note that timeout is in milliseconds

Action: Originate
Channel: DAHDI/1/
Context: read
Exten: 1
Priority: 1
Timeout: 12


This isn't using the local channel, but instead uses straight dialplan. 
  Asterisk will wait for the source leg,  to answer, and once 
it does, it will execute [read]


Here's how to do it with local channels.

# source leg
[dialout]
exten = 1,1,Dial(dahdi/1/,120)
exten = 1,n,Hangup()

# destination leg
[read]
exten = 1,1,Answer()
exten = 1,n,Read(data,play-msg,4,,2,15)
exten = 1,n,Verbose(${data})
exten = 1,n,AGI(send_data.py,${data})
exten = 1,n,Hangup()

Action: Originate
Channel: Local/1...@dialout
Context: read
Exten: 1
Priority: 1
Timeout: 12

Note, that the timeout applies to waiting for the Channel source leg, 
endpoint to pick up.  If you put the timeout to say 1000, (1 second), 
asterisk will kill the call before the Dial() timeout of 120 seconds hit.



On 11/16/2010 07:57 AM, Sidarta Aguiar de Oliveira wrote:
 Hello,

 I don't really understand how channel Local works. I need that asterisk
 initiate a call and get some data (DTMF).

 So to do that I've created this dialplan :

 ; extensions.conf - the Asterisk dial plan
 ;
 [general]
 static=yes
 writeprotect=no
 clearglobalvars=no

 [dtmf]
 exten = 1,1,Verbose(Get User ID)
 exten = 1,n,Dial(dahdi/1/,120,G(read^1^1))
 exten = 1,n,Hangup()

 [read]
 exten = 1,1,Hangup()
 exten = 1,n,Read(data,play-msg,4,,2,15)
 exten = 1,n,Verbose(${data})
 exten = 1,n,AGI(send_data.py,${data})
 exten = 1,n,Hangup()

 File: test.call

 Channel: Local/1...@dtmf
 Application: NoOp

 I've create a file name test.call and then move the call file to the dir
 /var/spool/asterisk/outgoing/. Some issues I've had, the option G, in
 the Dial function don't wait the user answer the call to follow the
 dialplan. Is this rigth? Is this because I have used a Local Channel?
 Are better way to do that?

 Regards,
 *
 *
 *Sidarta Oliveira*



-- 
_
-- 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] Issues with Local Channel

2010-11-16 Thread Mark Murawski
You can definitely use the local channel and dialplan combination to put 
all the work inside dialplan.  See my second example on using a local 
channel on one side, and dialplan on the other.

In your source leg (dialout) you can write up any logic for handling the 
call, you can dial out dahdi, or sip, or iax, or anything else.  You can 
do db lookups or dialplan logic, or anything else that dialplan allows.



On 11/16/2010 12:48 PM, Sidarta Aguiar de Oliveira wrote:
 Thanks Mark for your reply.

 I understand all you explained and I agree . All I want to do is
 abstract for my app how handle channels (DAHDI or SIP). That's is the
 main reason, I try to use Local Channels and NoOp Application so the
 dial plan should do all the heavy work (channels avaliable).
 My app , in the first idea, will create the same call file.
 There is a better way to treat this issue?

 Until now, we use asterisk for routes call in our office. Now we are
 thinking in integrate asterisk with our app.

 Thanks once again!

 Regards

 *Sidarta Oliveira*


 
 *De: *Mark Murawski markm-li...@intellasoft.net
 *Para: *asterisk-us...@lists.digium.com
 *Enviadas: *Terça-feira, 16 de Novembro de 2010 15:15:16
 *Assunto: *Re: [asterisk-users] Issues with Local Channel

 Local channels behave like an endpoint. So instead of a sip phone
 picking up the call, asterisk is picking up the call.

 Instead of someone speaking into a sip phone, asterisk can play tracks,
 or record digits, etc.

 You need to make sure that the call does not end before you're done with
 your local channel. Your current use is incorrect and your call is
 going to hang up before it does much of anything.

 Channel: Local/1...@dtmf
 Application: NoOp

 This is guaranteed to not work... asterisk will spawn the local channel
 one one leg, lets call it the source leg, and it will run the
 application NoOp on the destination leg. The NoOp will run, there is
 then no more dialplan to run, so the call will be hung up.

 Also... using the G option to dial, is probably not what you want. You
 must think of a local channel as an end point.

 I'm not sure if this will get you exactly what you want, but it should
 get you further along the path.

 # destination dialplan
 [read]
 exten = 1,1,Answer()
 exten = 1,n,Read(data,play-msg,4,,2,15)
 exten = 1,n,Verbose(${data})
 exten = 1,n,AGI(send_data.py,${data})
 exten = 1,n,Hangup()

 -- Note that timeout is in milliseconds

 Action: Originate
 Channel: DAHDI/1/
 Context: read
 Exten: 1
 Priority: 1
 Timeout: 12


 This isn't using the local channel, but instead uses straight dialplan.
 Asterisk will wait for the source leg,  to answer, and once
 it does, it will execute [read]


 Here's how to do it with local channels.

 # source leg
 [dialout]
 exten = 1,1,Dial(dahdi/1/,120)
 exten = 1,n,Hangup()

 # destination leg
 [read]
 exten = 1,1,Answer()
 exten = 1,n,Read(data,play-msg,4,,2,15)
 exten = 1,n,Verbose(${data})
 exten = 1,n,AGI(send_data.py,${data})
 exten = 1,n,Hangup()

 Action: Originate
 Channel: Local/1...@dialout
 Context: read
 Exten: 1
 Priority: 1
 Timeout: 12

 Note, that the timeout applies to waiting for the Channel source leg,
 endpoint to pick up. If you put the timeout to say 1000, (1 second),
 asterisk will kill the call before the Dial() timeout of 120 seconds hit.



 On 11/16/2010 07:57 AM, Sidarta Aguiar de Oliveira wrote:
   Hello,
  
   I don't really understand how channel Local works. I need that asterisk
   initiate a call and get some data (DTMF).
  
   So to do that I've created this dialplan :
  
   ; extensions.conf - the Asterisk dial plan
   ;
   [general]
   static=yes
   writeprotect=no
   clearglobalvars=no
  
   [dtmf]
   exten = 1,1,Verbose(Get User ID)
   exten = 1,n,Dial(dahdi/1/,120,G(read^1^1))
   exten = 1,n,Hangup()
  
   [read]
   exten = 1,1,Hangup()
   exten = 1,n,Read(data,play-msg,4,,2,15)
   exten = 1,n,Verbose(${data})
   exten = 1,n,AGI(send_data.py,${data})
   exten = 1,n,Hangup()
  
   File: test.call
  
   Channel: Local/1...@dtmf
   Application: NoOp
  
   I've create a file name test.call and then move the call file to the dir
   /var/spool/asterisk/outgoing/. Some issues I've had, the option G, in
   the Dial function don't wait the user answer the call to follow the
   dialplan. Is this rigth? Is this because I have used a Local Channel?
   Are better way to do that?
  
   Regards,
   *
   *
   *Sidarta Oliveira*
  


 --
 _
 -- 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] SIP calls destroyed after 1:20

2010-11-15 Thread Mark Murawski
Are you using originate?  Check your originate timeout.
Are you limiting your call length on Dial()... check your L options.

Asterisk will send a BYE if it hits an internal timer that's set to 
destroy the call at a specific time.

For instance... this is almost guaranteed to cause problems

Action: Originate
Timeout: 30

Timeout is in milliseconds if I remember correctly, so after 30 
milliseconds, which isn't nearly enough time to establish a call, 
asterisk will kill the call.



On 11/15/2010 03:11 PM, Jeremy Kister wrote:
 After upgrading to Asterisk 1.8.0, I am finding that my outbound SIP
 calls are being destroyed after 1 minute and 20 seconds (80 seconds).

 Asterisk is sending a BYE message - I have no idea why.

 http://jeremy.kister.net/tmp/20101115/sip.txt for a sip debug.

 can anyone suggest how i can further deal with this?





-- 
_
-- 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] Audiocodes firmware

2010-10-14 Thread Mark Murawski


  
  
Oh right...

MP-118

Thanks.



On 10/14/2010 03:38 PM, Bryant Zimmerman wrote:
For which device models?



  
  From: "Mark Murawski"
  markm-li...@intellasoft.net
  Sent: Thursday, October 14, 2010 3:26 PM
  To: asterisk-users@lists.digium.com
  Subject: [asterisk-users] Audiocodes firmware

Does anyone have links to the
  most recent audiocodes firmware?
  

  


  


-- 
_
-- 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] Audiocodes firmware

2010-10-14 Thread Mark Murawski
  Because audiocodes does not provide support to end users and will tell 
you to contact your vendor that sold you the box.

The problem is, the vendor that sold me the box is really hard to deal 
with and has been brushing me off all week on getting firmware.



On 10/14/2010 05:14 PM, Paul Belanger wrote:
 On Thu, Oct 14, 2010 at 3:25 PM, Mark Murawski
 markm-li...@intellasoft.net  wrote:
 Does anyone have links to the most recent audiocodes firmware?

 Why not contact Audiocodes?



-- 
_
-- 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] Audiocodes firmware

2010-10-14 Thread Mark Murawski


  
  
Crazy. What do you plan on using for an ATA now?

The problems I'm having are getting 500 "Server Internal Error" on
just about every other call placed out of this mp-118. The box has
been installed and in use for quite some time and recently started
having problems. Reboots, etc don't make a difference. I noticed
it had newer firmware than what I had on some other boxes that had
no issues whatsoever. I do have a 5.80 firmware I had downloaded a
while back and put that on. Now the internal server errors are
happening on 70-80% of sip-pstn calls. pstn-sip calls seem
to be coming in just fine.

Ever since I did the firmware downgrade, now my ssh sessions to the
box get disconnected after about 30 seconds with invalid packet
errors.

I've had problems with earlier firmware as well... once the 5.x
firmware started shipping on audiocodes it seemed they were just
about DOA. The web interface worked but nothing else worked right.
Perfectly working configurations on other boxes that were copied to
the new boxes with new firmware would just fail in various ways...
disconnect supervision not working, internal routing not working.
Finally I managed to get a hold of the 5.80 firmware which got rid
of all those problems.

Now I'm stuck again. I have a box in service that's having problems
and I can't get new firmware.




On 10/14/2010 07:17 PM, Bryant Zimmerman wrote:
We are being forced to move away from audiocodes ATA's
because they refuse to fix a few minor bugs unless we commit to
a 1000 piece order. This is on their 2 port ATA's. Their
response to us is that ATA's are intended for serious carriers
that are using them in conjunction with their higher end
gateways. And we use their PRI gateways and a few of their 4 and
8 port gateways but we can't user their 2 ports.

NetVanta 6330
  
  From: "Paul Belanger"
  paul.belan...@polybeacon.com
  Sent: Thursday, October 14, 2010 6:43 PM
  To: "Asterisk Users Mailing List - Non-Commercial
  Discussion" asterisk-users@lists.digium.com
  Subject: Re: [asterisk-users] Audiocodes firmware

On Thu, Oct 14, 2010 at 5:27 PM, Mark Murawski
markm-li...@intellasoft.net wrote:
 Because audiocodes does not provide support to end users
and will tell
 you to contact your vendor that sold you the box.

That is ridiculous, how hard is it to provide a download link
and
disclaimer about no support. Unless Audiocodec's simply wants to
charge you more money.

-- 
Paul Belanger | dCAP
Polybeacon | Consultant
Jabber: paul.belan...@polybeacon.com | IRC: pabelanger
(Freenode)
blog.polybeacon.com

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