[asterisk-users] I think this is a bug (video call file) 11.25.1 and 13.13.1

2016-12-19 Thread Jerry Geis
I can create an audio call file and specify Application: Playback and
Data: a path to the audio file, it calls the phone and plays the audio
message just fine.

I am trying to do the same with a video file. I specify Application:
Playback and Data: the path to the video file (no ending of course),
and I do specify also the Codecs: h264,h263 etc...

Asterisk reports:

*File /tmp/video does not exist in any format
*>* Unable to open /tmp/video (format ulaw|h263|h264)*


Looking then at the code and attaching with the debugger.
the ast_openstream_full() function has this condition:

if (!fileexists_core(filename, NULL, preflang, buf, buflen,
file_fmt_cap) || !ast_format_cap_has_type(file_fmt_cap, AST_MEDIA_TYPE_AUDIO)) {

}


So fileexists_core() returns 1 but the next call to
ast_format_cap_has_type() fails. because its looking for
AST_MEDIA_TYPE_AUDIO and the file is a video file. Nowhere is the an
AST_MEDIA_TYPE_VIDEO.


I can use the call file to setup a video call between two video
softphones just fine. However using the call file to call a phone and
play a video is not working at all for me.

Am I on the right track?

Is this supposed to work? if so how since there is no check of the
AST_MEDIA_TYPE_VIDEO?

Thanks,

Jerry
-- 
_
-- 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] Polycom SoundStation IP 6000 does not register

2016-12-19 Thread Mark Wiater



On 12/19/2016 10:26 AM, Yves wrote:
There are no SIP Packets arriving at my asterisk at all... and it has 
nothing to do with a firewall or similar...



I can ping the phone from the asterisk,


If both of these items are true, then I'd look at the phone 
configurations. Does the provisioning file contain an address for the 
phone to contact?


Mine has voIpProt.server.1.address, but I think you can also use a 
reg.x.address in the provisioning files too.


Mark

--
_
-- 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] Polycom SoundStation IP 6000 does not register

2016-12-19 Thread Motty Cruz
can you provide the configuration on sip.conf file? Do you have the following 
settings under the account number or ext number? 

 

host=dynamic

nat=yes

 

for instance my configuration sip.conf file is as follow: 

[1005]

type=friend

context=sip-phone

call-limit=1

trustrpid=no

callerid="iuser 1005"

disallow=all

allow=ulaw

allow=alaw

username=1005

auth=md5

secret=819c8ebd2d1525235235325235

dtmfmode=rfc2833

host=dynamic

nat=yes

canreinvite=no

 

Thanks, 
Motty

 

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Olivier
Sent: Monday, December 19, 2016 9:51 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Polycom SoundStation IP 6000 does not register

 

 

 

2016-12-19 16:26 GMT+01:00 Yves :

Hi,

I am pulling my hair for days now...

I can´t get a PolyCom SoundStation IP 6000 (Conferencephone) to register with 
my Asterisk.

There are no SIP Packets arriving at my asterisk at all... and it has nothing 
to do with a firewall or similar...

Simple Question:
Does anybody have a running SoundStation IP 6000 registerd with asterisk?

 

yes, I've got several of them running.
 

If so... would you please be so kind to tell me whats wrong with my setup?

AsteriskServer: 192.168.1.211
SIP-user: 165

(the SIP-Settings on asterisk-side are OK, tested with a normal Softphone... 
registering and placing calls is no problem...)

The phone-log only says: "Registration failed User: 165, Error Code:480 
Temporarily not available"

I tried with newest firmware, resetting to factory 100 times, using a 
provisionig file (which the SoundStation correctly downloads)
but it is always the same... the SoundStation does not contact the asterisk for 
registering...


1. Do you have any switch able to mirror traffic sent and received by Polycom 
phone ?

Capturing such traffic would help to understand what's happening.

2. Some phones support zero touch config with which they download their config 
files from the Internet.

Are you sure this doesn't happen ?

3. Is SNTP/NTP correctly configured on the phone ?



 

 


Phoneversion:


Telefoninformationen 


Telefonmodell 

SoundStation IP 6000 


Teilenummer 

3111-15600-001 Rev:W 


MAC-Adresse 

00:04:F2:07:0C:D3 


IP-Adresse 

192.168.0.13 


UC-Softwareversion 

4.0.11.0583 


BootROM-Softwareversion 

5.0.5.2324 


I can ping the phone from the asterisk, the phone can reach the asterisk server 
(as it downloads the tftp files, if used with
a provisioning profile), so the route and everything is correct... I even 
connected another Hardphone on the same cable
that stuck in the Polycom... no problem... the other phone can register and 
works, so there is really no cable or firewall
related problem here... it must be a setting!

thank you





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

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

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

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

 

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

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

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

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

Re: [asterisk-users] Polycom SoundStation IP 6000 does not register

2016-12-19 Thread Olivier
2016-12-19 16:26 GMT+01:00 Yves :

> Hi,
>
> I am pulling my hair for days now...
>
> I can´t get a PolyCom SoundStation IP 6000 (Conferencephone) to register
> with my Asterisk.
>
> There are no SIP Packets arriving at my asterisk at all... and it has
> nothing to do with a firewall or similar...
>
> Simple Question:
> Does anybody have a running SoundStation IP 6000 registerd with asterisk?
>

yes, I've got several of them running.


> If so... would you please be so kind to tell me whats wrong with my setup?
>
> AsteriskServer: 192.168.1.211
> SIP-user: 165
>
> (the SIP-Settings on asterisk-side are OK, tested with a normal
> Softphone... registering and placing calls is no problem...)
>
> The phone-log only says: "Registration failed User: 165, Error Code:480
> Temporarily not available"
>
> I tried with newest firmware, resetting to factory 100 times, using a
> provisionig file (which the SoundStation correctly downloads)
> but it is always the same... the SoundStation does not contact the
> asterisk for registering...
>

1. Do you have any switch able to mirror traffic sent and received by
Polycom phone ?
Capturing such traffic would help to understand what's happening.

2. Some phones support zero touch config with which they download their
config files from the Internet.
Are you sure this doesn't happen ?

3. Is SNTP/NTP correctly configured on the phone ?





>
> Phoneversion:
> Telefoninformationen
> Telefonmodell SoundStation IP 6000
> Teilenummer 3111-15600-001 Rev:W
> MAC-Adresse 00:04:F2:07:0C:D3
> IP-Adresse 192.168.0.13
> UC-Softwareversion 4.0.11.0583
> BootROM-Softwareversion 5.0.5.2324
> I can ping the phone from the asterisk, the phone can reach the asterisk
> server (as it downloads the tftp files, if used with
> a provisioning profile), so the route and everything is correct... I even
> connected another Hardphone on the same cable
> that stuck in the Polycom... no problem... the other phone can register
> and works, so there is really no cable or firewall
> related problem here... it must be a setting!
>
> thank you
>
>
>
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at: https://community.asterisk.
> org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
>
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

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

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

Re: [asterisk-users] Asterisk installation script on CentOS7 with systemd [SOLVED]

2016-12-19 Thread Jean Aunis

Le 19/12/2016 à 17:10, Olivier a écrit :



2016-12-19 16:11 GMT+01:00 Jean Aunis >:


Le 19/12/2016 à 15:54, Olivier a écrit :



Running systemctl start asterisk fails with :
Dec 19 15:43:08 foobar systemd: PID file
/var/run/asterisk/asterisk.pid not readable (yet?) after start.
Dec 19 15:43:09 foobar systemd: asterisk.service: main process
exited, code=exited, status=1/FAILURE
Dec 19 15:43:09 foobar asterisk: Unable to connect to remote
asterisk (does /var/run/asterisk/asterisk.ctl exist?)
Dec 19 15:43:09 foobar systemd: asterisk.service: control process
exited, code=exited status=1
Dec 19 15:43:09 foobar systemd: Unit asterisk.service entered
failed state.
Dec 19 15:43:09 foobar systemd: asterisk.service failed.


But /usr/sbin/asterisk -vvvgF -U asterisk -G asterisk -C
/etc/asterisk/asterisk.conf succeeds:
# rasterisk
Asterisk 13.13.1, Copyright (C) 1999 - 2014, Digium, Inc. and others.
...
=
Running as user 'asterisk'
Running under group 'asterisk'
Connected to Asterisk 13.13.1 currently running on ...

Any hint or help on how to debug this ?
(I tried with and without any /run/asterisk directory owned by
asterisk.asterisk)


Best regards




Hello,

Make sure that selinux is disabled, or in "permissive" mode.
Otherwise it will prevent asterisk from starting.


Thanks for the tip:
changing to permissive mode made it !

Using methods suggested in [1], do you think its possible and worth 
the effort to configure SELinux to work with Asterisk/Systemd in 
Enforcing mode ?

A quick look in various tuto all disable SELinux.



[1] https://wiki.centos.org/HowTos/SELinux



I never spent time to figure out how selinux should be configured for 
Asterisk, but it is certainly possible to do something clean about that. 
I noticed that, when I install Asterisk with a custom-made RPM package, 
SELinux will stop blocking it. I guess RPM has some magic embedded into 
it to configure SELinux with the proper rules.


Still, is it worth the effort ? Probably not if you consider Asterisk 
alone : as it is running with the unprivileged user asterisk, the 
standard Linux permissions will protect your system if Asterisk is attacked.
But considering your system as a whole, disabling selinux may not be a 
good idea : other processes may required to be secured with the selinux 
stuff.


I'm not an IT security expert, so please consider what I wrote above 
with caution.
-- 
_
-- 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 installation script on CentOS7 with systemd [SOLVED]

2016-12-19 Thread Olivier
2016-12-19 16:11 GMT+01:00 Jean Aunis :

> Le 19/12/2016 à 15:54, Olivier a écrit :
>
> Hello,
>
> For a new project, I'm adapting existing installation script to CentOS 7.
> I must admit I don't understand how to adapt things to systemd.
>
> Here are my questions:
>
> 1. I don't see any systemd sub-directory in asterisk-13.13.1/contrib.
> Do you think such directory and matching Makefile target could be useful ?
>
> 2. Should /run/asterisk directory creation be left to systemd or done by
> installation script before running "systemctl start asterisk"  ?
>
> 3. I edited the following /etc/systemd/system:asterisk.service file:
> [Unit]
> Description=Asterisk PBX and telephony daemon.
> After=network.target
>
> [Service]
> Type=forking
> PIDFile=/var/run/asterisk/asterisk.pid
> Environment=HOME=/var/lib/asterisk
> WorkingDirectory=/var/lib/asterisk
> ExecStart=/usr/sbin/asterisk -vvvgF -U asterisk -G asterisk -C
> /etc/asterisk/asterisk.conf
> #ExecStart=/usr/sbin/asterisk -vvvgF -C /etc/asterisk/asterisk.conf
> ExecStop=/usr/sbin/asterisk -rx 'core stop now'
> ExecReload=/usr/sbin/asterisk -rx 'core reload'
>
>
> [Install]
> WantedBy=multi-user.target
>
> Running systemctl start asterisk fails with :
> Dec 19 15:43:08 foobar systemd: PID file /var/run/asterisk/asterisk.pid
> not readable (yet?) after start.
> Dec 19 15:43:09 foobar systemd: asterisk.service: main process exited,
> code=exited, status=1/FAILURE
> Dec 19 15:43:09 foobar asterisk: Unable to connect to remote asterisk
> (does /var/run/asterisk/asterisk.ctl exist?)
> Dec 19 15:43:09 foobar systemd: asterisk.service: control process exited,
> code=exited status=1
> Dec 19 15:43:09 foobar systemd: Unit asterisk.service entered failed state.
> Dec 19 15:43:09 foobar systemd: asterisk.service failed.
>
>
> But /usr/sbin/asterisk -vvvgF -U asterisk -G asterisk -C
> /etc/asterisk/asterisk.conf succeeds:
> # rasterisk
> Asterisk 13.13.1, Copyright (C) 1999 - 2014, Digium, Inc. and others.
> ...
> =
> Running as user 'asterisk'
> Running under group 'asterisk'
> Connected to Asterisk 13.13.1 currently running on ...
>
> Any hint or help on how to debug this ?
> (I tried with and without any /run/asterisk directory owned by
> asterisk.asterisk)
>
>
> Best regards
>
>
>
> Hello,
>
> Make sure that selinux is disabled, or in "permissive" mode. Otherwise it
> will prevent asterisk from starting.
>

Thanks for the tip:
changing to permissive mode made it !

Using methods suggested in [1], do you think its possible and worth the
effort to configure SELinux to work with Asterisk/Systemd in Enforcing mode
?
A quick look in various tuto all disable SELinux.



[1] https://wiki.centos.org/HowTos/SELinux



> Best regards
>
> Jean Aunis
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at: https://community.asterisk.
> org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
>
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

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

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

[asterisk-users] Polycom SoundStation IP 6000 does not register

2016-12-19 Thread Yves

Hi,

I am pulling my hair for days now...

I can´t get a PolyCom SoundStation IP 6000 (Conferencephone) to register 
with my Asterisk.


There are no SIP Packets arriving at my asterisk at all... and it has 
nothing to do with a firewall or similar...


Simple Question:
Does anybody have a running SoundStation IP 6000 registerd with asterisk?
If so... would you please be so kind to tell me whats wrong with my setup?

AsteriskServer: 192.168.1.211
SIP-user: 165

(the SIP-Settings on asterisk-side are OK, tested with a normal 
Softphone... registering and placing calls is no problem...)


The phone-log only says: "Registration failed User: 165, Error Code:480 
Temporarily not available"


I tried with newest firmware, resetting to factory 100 times, using a 
provisionig file (which the SoundStation correctly downloads)
but it is always the same... the SoundStation does not contact the 
asterisk for registering...


Phoneversion:
Telefoninformationen
Telefonmodell   SoundStation IP 6000
Teilenummer 3111-15600-001 Rev:W
MAC-Adresse 00:04:F2:07:0C:D3
IP-Adresse  192.168.0.13
UC-Softwareversion  4.0.11.0583
BootROM-Softwareversion 5.0.5.2324


I can ping the phone from the asterisk, the phone can reach the asterisk 
server (as it downloads the tftp files, if used with
a provisioning profile), so the route and everything is correct... I 
even connected another Hardphone on the same cable
that stuck in the Polycom... no problem... the other phone can register 
and works, so there is really no cable or firewall

related problem here... it must be a setting!

thank you



-- 
_
-- 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 installation script on CentOS7 with systemd

2016-12-19 Thread Jean Aunis

Le 19/12/2016 à 15:54, Olivier a écrit :

Hello,

For a new project, I'm adapting existing installation script to CentOS 7.
I must admit I don't understand how to adapt things to systemd.

Here are my questions:

1. I don't see any systemd sub-directory in asterisk-13.13.1/contrib.
Do you think such directory and matching Makefile target could be useful ?

2. Should /run/asterisk directory creation be left to systemd or done 
by installation script before running "systemctl start asterisk"  ?


3. I edited the following /etc/systemd/system:asterisk.service file:
[Unit]
Description=Asterisk PBX and telephony daemon.
After=network.target

[Service]
Type=forking
PIDFile=/var/run/asterisk/asterisk.pid
Environment=HOME=/var/lib/asterisk
WorkingDirectory=/var/lib/asterisk
ExecStart=/usr/sbin/asterisk -vvvgF -U asterisk -G asterisk -C 
/etc/asterisk/asterisk.conf

#ExecStart=/usr/sbin/asterisk -vvvgF -C /etc/asterisk/asterisk.conf
ExecStop=/usr/sbin/asterisk -rx 'core stop now'
ExecReload=/usr/sbin/asterisk -rx 'core reload'


[Install]
WantedBy=multi-user.target

Running systemctl start asterisk fails with :
Dec 19 15:43:08 foobar systemd: PID file 
/var/run/asterisk/asterisk.pid not readable (yet?) after start.
Dec 19 15:43:09 foobar systemd: asterisk.service: main process exited, 
code=exited, status=1/FAILURE
Dec 19 15:43:09 foobar asterisk: Unable to connect to remote asterisk 
(does /var/run/asterisk/asterisk.ctl exist?)
Dec 19 15:43:09 foobar systemd: asterisk.service: control process 
exited, code=exited status=1
Dec 19 15:43:09 foobar systemd: Unit asterisk.service entered failed 
state.

Dec 19 15:43:09 foobar systemd: asterisk.service failed.


But /usr/sbin/asterisk -vvvgF -U asterisk -G asterisk -C 
/etc/asterisk/asterisk.conf succeeds:

# rasterisk
Asterisk 13.13.1, Copyright (C) 1999 - 2014, Digium, Inc. and others.
...
=
Running as user 'asterisk'
Running under group 'asterisk'
Connected to Asterisk 13.13.1 currently running on ...

Any hint or help on how to debug this ?
(I tried with and without any /run/asterisk directory owned by 
asterisk.asterisk)



Best regards




Hello,

Make sure that selinux is disabled, or in "permissive" mode. Otherwise 
it will prevent asterisk from starting.


Best regards

Jean Aunis

-- 
_
-- 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] Asterisk installation script on CentOS7 with systemd

2016-12-19 Thread Olivier
Hello,

For a new project, I'm adapting existing installation script to CentOS 7.
I must admit I don't understand how to adapt things to systemd.

Here are my questions:

1. I don't see any systemd sub-directory in asterisk-13.13.1/contrib.
Do you think such directory and matching Makefile target could be useful ?

2. Should /run/asterisk directory creation be left to systemd or done by
installation script before running "systemctl start asterisk"  ?

3. I edited the following /etc/systemd/system:asterisk.service file:
[Unit]
Description=Asterisk PBX and telephony daemon.
After=network.target

[Service]
Type=forking
PIDFile=/var/run/asterisk/asterisk.pid
Environment=HOME=/var/lib/asterisk
WorkingDirectory=/var/lib/asterisk
ExecStart=/usr/sbin/asterisk -vvvgF -U asterisk -G asterisk -C
/etc/asterisk/asterisk.conf
#ExecStart=/usr/sbin/asterisk -vvvgF -C /etc/asterisk/asterisk.conf
ExecStop=/usr/sbin/asterisk -rx 'core stop now'
ExecReload=/usr/sbin/asterisk -rx 'core reload'


[Install]
WantedBy=multi-user.target

Running systemctl start asterisk fails with :
Dec 19 15:43:08 foobar systemd: PID file /var/run/asterisk/asterisk.pid not
readable (yet?) after start.
Dec 19 15:43:09 foobar systemd: asterisk.service: main process exited,
code=exited, status=1/FAILURE
Dec 19 15:43:09 foobar asterisk: Unable to connect to remote asterisk (does
/var/run/asterisk/asterisk.ctl exist?)
Dec 19 15:43:09 foobar systemd: asterisk.service: control process exited,
code=exited status=1
Dec 19 15:43:09 foobar systemd: Unit asterisk.service entered failed state.
Dec 19 15:43:09 foobar systemd: asterisk.service failed.


But /usr/sbin/asterisk -vvvgF -U asterisk -G asterisk -C
/etc/asterisk/asterisk.conf succeeds:
# rasterisk
Asterisk 13.13.1, Copyright (C) 1999 - 2014, Digium, Inc. and others.
...
=
Running as user 'asterisk'
Running under group 'asterisk'
Connected to Asterisk 13.13.1 currently running on ...

Any hint or help on how to debug this ?
(I tried with and without any /run/asterisk directory owned by
asterisk.asterisk)


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

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

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

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

[asterisk-users] Opening video file to play

2016-12-19 Thread Jerry Geis
I am trying to play a video file.
It is failing saying

*File /tmp/video does not exist in any format
*>* Unable to open /tmp/video (format ulaw|h263|h264)*


I am setting the video codec h263 in the call file. File exists and is
readable by all.

looking at the code and attaching with the debugger.
The last line below is where its failing. Its passing the file exists part
and seems like its checking for AST_MEDIA_TYPE_AUDIO and of course its h263
video - so its failing.

Then I do not see any case for a AST_MEDIA_TYPE_VIDEO.

What am I missing here to call a softphone and play a video file?

Thanks,

Jerry

struct ast_filestream *ast_openstream_full(struct ast_channel *chan, const
char *filename, const char *preflang, int asis)
{
/*
 * Use fileexists_core() to find a file in a compatible
 * language and format, set up a suitable translator,
 * and open the stream.
 */
struct ast_format_cap *file_fmt_cap;
int res;
int buflen;
char *buf;

if (!asis) {
/* do this first, otherwise we detect the wrong writeformat
*/
ast_stopstream(chan);
if (ast_channel_generator(chan))
ast_deactivate_generator(chan);
}
if (preflang == NULL)
preflang = "";
buflen = strlen(preflang) + strlen(filename) + 4;
buf = ast_alloca(buflen);

if (!(file_fmt_cap =
ast_format_cap_alloc(AST_FORMAT_CAP_FLAG_DEFAULT))) {
return NULL;
}
if (!fileexists_core(filename, NULL, preflang, buf, buflen,
file_fmt_cap) ||
!ast_format_cap_has_type(file_fmt_cap,
AST_MEDIA_TYPE_AUDIO)) {
-- 
_
-- 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] 183 Session in Progress. Disconnecting channel for lack of RTP activity

2016-12-19 Thread Dmitriy Serov

Yes, this means the remote end was not sending any audio stream.
But it shouldn't.
According to [1] before remote end send OK or ACK there is one way SDP, 
no any audio stream.

PJSIP channel (option rtp_timeout) does not take this one.

Isn't it a mistake? What could be workarounds?

19.12.2016 11:33, Jean Aunis пишет:


This means the remote end was not sending any audio stream, or the 
audio stream was not received by Asterisk. The problem may have many 
different reasons, but often it is a network-related issue.



Le 16/12/2016 à 21:19, Dmitriy Serov a écrit :

Today I faced a problem. Please help to solve this problem.

Asterisk 13.7 (chan_pjsip) & Zyxel Keenetic Plus DECT, firmware 
v2.06(AAGJ.9)C1


Outbound call from Zyxel Keenetic (pjsip endpoint) to PSTN (pjsip 
trunk).

Call using early media (183 Session in progress) and rtp_timeout=10.
After 10 seconds: [2016-12-16 13:53:15] NOTICE[6654] 
res_pjsip_sdp_rtp.c: Disconnecting channel 'PJSIP/xxx-027b' for 
lack of RTP activity in 10 seconds


SIP dump is attached.

According to [1] before called user agent send OK or ACK there is one 
way SDP.
In sip dump (attached) i didn't find such SIP packets. Whether that 
call was canceled due to RTP inactivity?


Any help is welcome.

[1] https://www.ietf.org/proceedings/46/I-D/draft-ietf-sip-183-00.txt









-- 
_
-- 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] 183 Session in Progress. Disconnecting channel for lack of RTP activity

2016-12-19 Thread Jean Aunis
This means the remote end was not sending any audio stream, or the audio 
stream was not received by Asterisk. The problem may have many different 
reasons, but often it is a network-related issue.



Le 16/12/2016 à 21:19, Dmitriy Serov a écrit :

Today I faced a problem. Please help to solve this problem.

Asterisk 13.7 (chan_pjsip) & Zyxel Keenetic Plus DECT, firmware 
v2.06(AAGJ.9)C1


Outbound call from Zyxel Keenetic (pjsip endpoint) to PSTN (pjsip trunk).
Call using early media (183 Session in progress) and rtp_timeout=10.
After 10 seconds: [2016-12-16 13:53:15] NOTICE[6654] 
res_pjsip_sdp_rtp.c: Disconnecting channel 'PJSIP/xxx-027b' for 
lack of RTP activity in 10 seconds


SIP dump is attached.

According to [1] before called user agent send OK or ACK there is one 
way SDP.
In sip dump (attached) i didn't find such SIP packets. Whether that 
call was canceled due to RTP inactivity?


Any help is welcome.

[1] https://www.ietf.org/proceedings/46/I-D/draft-ietf-sip-183-00.txt





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