Re: [asterisk-users] RES: Can I use PJSIP_HEADER to read the SIP 183 message header?

2015-07-20 Thread Rodrigo Pimenta Carvalho
Ok.


Thank you!


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979   (Brasil)

De: asterisk-users-boun...@lists.digium.com 
asterisk-users-boun...@lists.digium.com em nome de Yaron Nachum 
nachum.ya...@gmail.com
Enviado: segunda-feira, 20 de julho de 2015 02:53
Para: Asterisk Users Mailing List - Non-Commercial Discussion
Assunto: Re: [asterisk-users] RES: Can I use PJSIP_HEADER to read the SIP 183 
message header?

One way to do it is to use Transfer. This will cause the callee to send 302 
redirect to the caller. The caller then will jump to the extension specified in 
the contact. You will have to dial again to the callee in the new extension.

This solution will increase the traffic on your asterisk and you have to be 
careful from loops.



??? ??? ??, 10 ? 2015 ?-21:37 ??? ?Rodrigo Pimenta Carvalho?? 
?pime...@inatel.brmailto:pime...@inatel.br??:?
Ok Mark Michelson.

Thank you very much! You answer tells me that I was in the wrong path trying to 
access information from SIP 183 message.

I need to find a way to let the callee pass information/data to the caller, 
even before accepting the call. That is, send data during the ringing time. And 
in my case, there will be more than one callee ringing at same time. As 
ASTERISK will not forward each SIP 183 message to the caller, I intend to get 
data from callees in dialplan by some another way before the call being 
accepted.

1- Is there any way to do that?

2 - SIP MESSAGE, if sent by the calle, enters the dialplan?

 Any hint will be very helpful!

 Best regards.



RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9300 (Brasil)

De: 
asterisk-users-boun...@lists.digium.commailto:asterisk-users-boun...@lists.digium.com
 
[asterisk-users-boun...@lists.digium.commailto:asterisk-users-boun...@lists.digium.com]
 em Nome de Mark Michelson [mmichel...@digium.commailto:mmichel...@digium.com]
Enviado: sexta-feira, 10 de julho de 2015 15:14
Para: Asterisk Users Mailing List - Non-Commercial Discussion
Assunto: Re: [asterisk-users] Can I use PJSIP_HEADER to read the SIP 183 
message header?

On 07/10/2015 11:53 AM, Rodrigo Pimenta Carvalho wrote:
 Hi.

 The ASTERISK wiki has a page showing the function PJSIP_HEADER(). However, it 
 doesn't explain if such function works only over SIP INVITE messages or if it 
 can be use, for example, to read headers from others types of SIP messages 
 too.

 So, can I use PJSIP_HEADER to read the SIP 183 message header?

 Any hint will be very helpful!

 Best regards.


 RODRIGO PIMENTA CARVALHO
 Inatel Competence Center
 Software
 Ph: +55 35 3471 9200 RAMAL 979 (Brasil)
Unfortunately, PJSIP_HEADER() cannot be used on responses because SIP
responses do not enter the dialplan.

--
_
-- 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] How to dial extensions asynchronous-sequentially ?

2015-07-16 Thread Rodrigo Pimenta Carvalho
Hi Pete.


No problem!


Maybe I will use only OpenSIPS, because it may be enough for me. But I still 
have to investigate some points.

As I was learning the past few days, due to the fact that Asterisk is not a SIP 
Proxy, it might cause some more difficult  in my project.


Best regards.


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979(Brasil)

De: asterisk-users-boun...@lists.digium.com 
asterisk-users-boun...@lists.digium.com em nome de Pete Mundy 
p...@fiberphone.co.nz
Enviado: quarta-feira, 15 de julho de 2015 18:35
Para: Asterisk Users Mailing List - Non-Commercial Discussion
Assunto: Re: [asterisk-users] How to dial extensions asynchronous-sequentially ?

Heya Rodrigo

My apologies for the misunderstanding re the delay.

I think the 183 messages problem stems from Asterisk being a B2BUA not a proxy 
and therefore not the tool or this job. But others have more skill around that 
area than I do so please confirm that before accepting it as fact!

Hope you get it resolved. Sorry to muddy the waters :)

Pete


On 16/07/2015, at 9:24 AM, Rodrigo Pimenta Carvalho 
pime...@inatel.brmailto:pime...@inatel.br wrote:


Hi Sammy and Pete.

Sammy, you are correct. But your example doesn't allow Asterisk forward every 
SIP 183 message to the caller.

Pete, in fact, I'm not looking for a delayed ring. All extensions must ring at 
same time. I got  a kind of solution by using:

exten = _6XXX,1,Dial(${PJSIP_DIAL_CONTACTS(${EXTEN})}, 60)

However, the Asterisk is rewriting the SDP content of SIP 183 messages, before 
forwarding it to the caller. That is the new question I would like to solve, 
because in my project the caller must receive the SIP 183 from callee as it was 
originally wrote.

Thanks and regards.

RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979   (Brasil)

De: 
asterisk-users-boun...@lists.digium.commailto:asterisk-users-boun...@lists.digium.com
 
asterisk-users-boun...@lists.digium.commailto:asterisk-users-boun...@lists.digium.com
 em nome de Pete Mundy p...@fiberphone.co.nzmailto:p...@fiberphone.co.nz
Enviado: quarta-feira, 15 de julho de 2015 18:16
Para: Asterisk Users Mailing List - Non-Commercial Discussion
Assunto: Re: [asterisk-users] How to dial extensions asynchronous-sequentially ?

Heya Rodrigo

Not sure, but this expansion on Sammy's concept may help you achieve the 
delayed ring on the secondary extensions you were looking for.

exten = _600.,1,Dial(PJSIP/${EXTEN})
exten = _600.,n,Hangup

exten = _600.wait5,1,Wait(5)
exten = _600.wait5,n,Dial(PJSIP/${EXTEN:0:4})
exten = _600.wait5,n,Hangup

exten = 555,1,Dial(LOCAL/6001LOCAL/6002.wait5)
exten = 555,n,Hangup

So you dial '555' and it rings 6001, then 5 second later (assuming 6001 isn't 
answered yet) 6002 starts ringing too (first to answer gets it).

Pete


On 14/07/2015, at 7:24 AM, SamyGo 
govoi...@gmail.commailto:govoi...@gmail.com wrote:

Anyway here's one way of how I think you can do.

Have a context created to dial the individual user

[dial_user]
exten = _600X.,1,Dial(PJSIP/${EXTEN})
...

and in your code change it to.

same = n,Dial(local/6001@dial_user/nlocal/6002@dial_user/n)
same = n,Hangup()
--
_
-- Bandwidth and Colocation Provided by 
http://www.api-digital.comhttp://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] How to create direct media with PJSIP.conf configurations in Asterisk 13?

2015-07-16 Thread Rodrigo Pimenta Carvalho
Dear Asterisk-Users,


By means of Asterisk 11 and sip.conf, I got success implementing early media. 
That is, all information that come from callee (SIP 183 message/ SDP) is passed 
to the caller without any modification in the SDP body.


However, in Asterisk 13 and using pjsip.conf I'm still failing to do the same 
thing. See:




Softphojne1  Asterisk 
---Softphone2


|  --SIP INVITE |


| SIP INVITE|



.   
 .

.   
 .

.   
 .

.   
 .


  |--SIP 183 -|


   SDP : Media Description, name and address (m): audio 4000 
RTP/AVP 8 96


   Media Description, name and address (m): video 
5000 RTP/AVP 97

|--SIP 183-|

   SDP :Media Description, name and address (m): audio 13258 RTP/AVP 8 
96

  Media Description, name and address (m): video 16002 
RTP/AVP 97



So, there is bit modification in SDP body, caused by Asterisk. As long as I'm 
intending to implement direct media, I believe that Asterisk 13 has some 
special configuration to be done in PJSIP.conf file, that will allow things 
work very well again, as in Asterisk 11 and sip.conf.


How to configure pjsip.con file or Asterisk, to run direct-media? Or , where to 
find a tutorial about it on Internet?


Any hint will be very helpful!


Thanks a lot.






RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAl 979   (Brasil)
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] How to create direct media with PJSIP.conf configurations in Asterisk 13?

2015-07-16 Thread Rodrigo Pimenta Carvalho
Thank you Joshua!
In this case I finally decide to use SIP Proxy. I have to start testing the SIP 
Proxy today.

Best Regards.

RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979   (Brasil)

De: asterisk-users-boun...@lists.digium.com 
asterisk-users-boun...@lists.digium.com em nome de Joshua Colp 
jc...@digium.com
Enviado: quinta-feira, 16 de julho de 2015 10:54:56
Para: Asterisk Users Mailing List - Non-Commercial Discussion
Assunto: Re: [asterisk-users] How to create direct media with PJSIP.conf 
configurations in Asterisk 13?

Rodrigo Pimenta Carvalho wrote:
 Dear Asterisk-Users,


 By means of Asterisk 11 and sip.conf, I got success implementing early
 media. That is, all information that come from callee (SIP 183 message/
 SDP) is passed to the caller without any modification in the SDP body.

PJSIP does not support early direct media. It is only once the call has
been established that it will be done.

--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com  www.asterisk.org

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
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] How to call a group of peers all registered with the same login?

2015-07-15 Thread Rodrigo Pimenta Carvalho

Dear Asterisk-Users,


We have one Asterisk end N softphones that will be registered on it.

We need to configure the Asterisk to get the following scenario working well:


Some softphones (N -1) is to be registered using the same login 6001. So, there 
will be N-1 users 6001 registered in the SIP REGISTRAR (Asterisk). One 
softphone is to be registered with the login 6000.


The softphone 6000 must call the others N-1 peers. So, the sofphone 6000 will 
dial 6001 and all the others N-1 peers must ring.


For that, I suspect that some special configuration must be done in the 
pjsip.conf file, for the N users.

But, what exactly must be configured in Asterisk to make it run well?

By the way, is there some special dial plan extension to be used? Just to use 
Dial(SIP/6001) is not enough.


Any hint will be very helpful!


Best regards.




RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979   (Brasil)
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] How to dial extensions asynchronous-sequentially ?

2015-07-15 Thread Rodrigo Pimenta Carvalho
Hi Sammy and Pete.


Sammy, you are correct. But your example doesn't allow Asterisk forward every 
SIP 183 message to the caller.


Pete, in fact, I'm not looking for a delayed ring. All extensions must ring at 
same time. I got  a kind of solution by using:


exten = _6XXX,1,Dial(${PJSIP_DIAL_CONTACTS(${EXTEN})}, 60)


However, the Asterisk is rewriting the SDP content of SIP 183 messages, before 
forwarding it to the caller. That is the new question I would like to solve, 
because in my project the caller must receive the SIP 183 from callee as it was 
originally wrote.


Thanks and regards.


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979   (Brasil)

De: asterisk-users-boun...@lists.digium.com 
asterisk-users-boun...@lists.digium.com em nome de Pete Mundy 
p...@fiberphone.co.nz
Enviado: quarta-feira, 15 de julho de 2015 18:16
Para: Asterisk Users Mailing List - Non-Commercial Discussion
Assunto: Re: [asterisk-users] How to dial extensions asynchronous-sequentially ?

Heya Rodrigo

Not sure, but this expansion on Sammy's concept may help you achieve the 
delayed ring on the secondary extensions you were looking for.

exten = _600.,1,Dial(PJSIP/${EXTEN})
exten = _600.,n,Hangup

exten = _600.wait5,1,Wait(5)
exten = _600.wait5,n,Dial(PJSIP/${EXTEN:0:4})
exten = _600.wait5,n,Hangup

exten = 555,1,Dial(LOCAL/6001LOCAL/6002.wait5)
exten = 555,n,Hangup

So you dial '555' and it rings 6001, then 5 second later (assuming 6001 isn't 
answered yet) 6002 starts ringing too (first to answer gets it).

Pete


On 14/07/2015, at 7:24 AM, SamyGo 
govoi...@gmail.commailto:govoi...@gmail.com wrote:

Anyway here's one way of how I think you can do.

Have a context created to dial the individual user

[dial_user]
exten = _600X.,1,Dial(PJSIP/${EXTEN})
...

and in your code change it to.

same = n,Dial(local/6001@dial_user/nlocal/6002@dial_user/n)
same = n,Hangup()
-- 
_
-- 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] RES: RES: RES: How to dial extensions asynchronous-sequentially ?

2015-07-14 Thread Rodrigo Pimenta Carvalho
Hi Sammy.

Thank you very much for you help!

Answering your questions:

a. I don't know almost anything about SIP Proxies. I just knew about Asterisk. 
But, I will investigate about SIP Proxies today, thankful your citation.
b. We have already built a system that uses Asterisk, RTSP and provide early 
media (only video) very well. But, for such system we don't have a kind of ring 
group implementation where users are dialed and first one to answer will get 
the call.
b. According to some simple requirements from my current project, I thought 
that Asterisk could be the best choice.

Let me ask you (about the requirements of my project):

1 - Can those SIP proxies take care of SIP REGISTER messages? Is it possible to 
a peer to register itself in a SIP Proxy?


2 - Does a SIP proxy have some kind of script, as an Asterisk dialplan, to let 
the programmer handle calls and SIP messages, even in a simpler way?


3- Does a SIP proxy provide a way of recording information about SIP messages 
into a Database?


4 - Can those SIP proxies communicate with a peer (softphone for example) using 
some security schema (TLS, SSL, etc)?


I guess these are my last questions about the case and then I will go ahead on 
my own.

Any hint will be very helpful !


Best Regards.



RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979  (Brasil)

De: asterisk-users-boun...@lists.digium.com 
[asterisk-users-boun...@lists.digium.com] em Nome de SamyGo [govoi...@gmail.com]
Enviado: segunda-feira, 13 de julho de 2015 18:57
Para: Asterisk Users Mailing List - Non-Commercial Discussion
Assunto: Re: [asterisk-users] RES: RES: How to dial extensions 
asynchronous-sequentially ?

If that is the case, why are you trying asterisk ? I suggest use SIP proxy like 
Kamailio or OpenSIPS. When Call is initiated, create different branches to 
different callee destination - this will place calls simultaneously to the 
destination sides and will let everything coming from the callee sides to the 
caller (multiple 100s,180, 183).

At that point you can extract all the info you need. Now regarding establishing 
a video session and sending a video message before call gets accepted is a 
whole new story.



On Mon, Jul 13, 2015 at 5:32 PM, Rodrigo Pimenta Carvalho 
pime...@inatel.brmailto:pime...@inatel.br wrote:
Hi Sammy.

After answering your last message (please, see my last message), I was thinking 
about conferences and my main objective.
Conferences will not work well for my case, because I it will allows more than 
one called party answering the call.  But, after one answers the call, I need 
cancel the others ringing callees.


In this case, maybe the best thing to do is to let the called party sends a SIP 
MESSAGE to the caller or to the Asterisk,  even before any call being answered. 
Then, get the message body content and handle it via Asterisk or directly in 
the caller.

What do you think?

Best regards.


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200tel:%2B55%2035%203471%209200 RAMAL 979(Brasil)

De: 
asterisk-users-boun...@lists.digium.commailto:asterisk-users-boun...@lists.digium.com
 
[asterisk-users-boun...@lists.digium.commailto:asterisk-users-boun...@lists.digium.com]
 em Nome de SamyGo [govoi...@gmail.commailto:govoi...@gmail.com]
Enviado: segunda-feira, 13 de julho de 2015 17:43
Para: Asterisk Users Mailing List - Non-Commercial Discussion
Assunto: Re: [asterisk-users] RES: How to dial extensions 
asynchronous-sequentially ?

All I can focus now is the objective is to see if there is an way to deliver 
more than one SIP 183 message to the caller

6001 has a song playing in 183 and 6002 has a service unavailable message, do 
you intend to deliver both of them simultaneously to the caller? I've seen 
multiple 183 Session Progress messages getting delivered to caller but what is 
your end game ? Play all sort of messages to the caller together ?

Whoever told you about Asterisk not letting 183 go to the caller with this 
dialstring was right. If you want all 183 msgs coming from all parties to be 
heard by the caller then I suggest you create a conference, and call the 6001, 
and 6002 as its participant. Thats the only place where I believe the audio 
from different channel is mixed and streamed to users.

From SIP protocol perspective even if multiple 183 Session Progress messages 
reach to the Caller with each message pointing to different sources, the 
caller's UAC should ideally pick only one of them, the latest one I believe.

BR,
Sammy


On Mon, Jul 13, 2015 at 3:51 PM, Rodrigo Pimenta Carvalho 
pime...@inatel.brmailto:pime...@inatel.brmailto:pime...@inatel.brmailto:pime...@inatel.br
 wrote:
Hi SamyGo.

Thank you for the replay. So, let me explain it better:

I knew that I could use something like  same = n,Dial(PJSIP/6001PJSIP/6002)  
.
While every extension (called phones

[asterisk-users] How to dial extensions asynchronous-sequentially ?

2015-07-13 Thread Rodrigo Pimenta Carvalho

Hi.


I my dialplan I have :

same = n,Dial(PJSIP/6001,10)
same = n,Dial(PJSIP/6002,30)
same = n,Hangup()


The extension 6002 will not be invited  until the called party 6001 hangs up or 
until 10 seconds if nobody answers the call in 6001.

How to call 6001 and immediately call 6002, having 2 phones ringing at same 
time, but without doing something like this : same = 
n,Dial(PJSIP/6001PJSIP/6002) ?
What I'm asking is if it is possible to call 6001 in an asynchronous way and 
then call 6002 too. Is it possible?

Any hint will be very helpful!



Best regards.



RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979
-- 
_
-- 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] RES: How to dial extensions asynchronous-sequentially ?

2015-07-13 Thread Rodrigo Pimenta Carvalho
Hi SamyGo.

Thank you for the replay. So, let me explain it better:

I knew that I could use something like  same = n,Dial(PJSIP/6001PJSIP/6002)  
.
While every extension (called phones) rings and before anyone answers, SIP 183 
messages will be sent to Asterisk from callees. If a called phone answer, the 
others will be hanged up. It is ok for me. I want to connect the caller just to 
the first called party that answers.
Yes, it is some sort of ring group implementation where users are dialled and 
just the first one to answer will get the call.

If I just do  same = n,Dial(PJSIP/6001) , there will be a SIP 183 message 
from 6001 to the caller. The caller will really receive that SIP 183 message. 
In this case, Asterisk seems to work as a proxy.
However, if I do  same = n,Dial(PJSIP/6001PJSIP/6002)  , the caller will not 
receive those SIP 183 messages from 6001 and 6002. In this case asterisk seems 
to work different of a proxy, as someone told me in this list.

So, if I dial 6001 and 6002, but in asynchronous and sequentially way, I will 
have a chance to see if the caller will receive the SIP 183 messages from 6001 
and 6002. That it, the objective is to see if there is an way to deliver more 
than one SIP 183 message to the caller, in a kind of  ring group implementation.

Any hint will be very helpful!!

Thanks a lot!


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979

De: asterisk-users-boun...@lists.digium.com 
[asterisk-users-boun...@lists.digium.com] em Nome de SamyGo [govoi...@gmail.com]
Enviado: segunda-feira, 13 de julho de 2015 16:24
Para: Asterisk Users Mailing List - Non-Commercial Discussion
Assunto: Re: [asterisk-users] How to dial extensions
asynchronous-sequentially ?

Hi,
Even you achieve that, what would be the objective? Do you want to just call 
the user and Hangup ? or Dial two users and connect them together ? Is this 
some sort of ring group implementation where users are dialled and first one to 
answer will get the call ??

Anyway here's one way of how I think you can do.

Have a context created to dial the individual user

[dial_user]
exten = _600X.,1,Dial(PJSIP/${EXTEN})
...

and in your code change it to.

same = n,Dial(local/6001@dial_user/nlocal/6002@dial_user/n)
same = n,Hangup()



On Mon, Jul 13, 2015 at 2:28 PM, Rodrigo Pimenta Carvalho 
pime...@inatel.brmailto:pime...@inatel.br wrote:

Hi.


I my dialplan I have :

same = n,Dial(PJSIP/6001,10)
same = n,Dial(PJSIP/6002,30)
same = n,Hangup()


The extension 6002 will not be invited  until the called party 6001 hangs up or 
until 10 seconds if nobody answers the call in 6001.

How to call 6001 and immediately call 6002, having 2 phones ringing at same 
time, but without doing something like this : same = 
n,Dial(PJSIP/6001PJSIP/6002) ?
What I'm asking is if it is possible to call 6001 in an asynchronous way and 
then call 6002 too. Is it possible?

Any hint will be very helpful!



Best regards.



RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200tel:%2B55%2035%203471%209200 RAMAL 979
--
_
-- 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] RES: RES: How to dial extensions asynchronous-sequentially ?

2015-07-13 Thread Rodrigo Pimenta Carvalho
Hi Sammy.

Thank you again for discussing about my subject!

The objective is really to see if there is an way to deliver more than one SIP 
183 message to the caller. 
For my current project, there is no intention to deliver sounds to the caller. 
I just want let the caller knows about some IPs, video codecs and ports from 
each callee side. But, all about video, not sounds. So, I don't intend to 
deliver two or more different sounds simultaneously to the caller.
However, if the caller gets data about each callee (IP, port, video codecs, 
where callees listen about video), it will be possible to provide video from 
the caller to each callee (using RTSP), even before some call being answered. 
That is, early media (only video) from the caller to each callee.
 

You told me If you want all 183 msgs coming from all parties to be heard by 
the caller then I suggest you create a conference. So, I would like to try 
this. Do you know where can i find a tutorial explaining how to create a 
conference in dialplan?

And you told me From SIP protocol perspective even if multiple 183 Session 
Progress messages reach to the Caller with each message pointing to different 
sources, the caller's UAC should ideally pick only one of them, the latest one 
I believe. I will check it to confirm.

If even after trying all of this I will fail, so I will look for a way of 
passing data from every callee to the caller, maybe using SIP MESSAGE, before 
any call being answered.

Comment, please.

Best regards.

RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979   (Brasil)

De: asterisk-users-boun...@lists.digium.com 
[asterisk-users-boun...@lists.digium.com] em Nome de SamyGo [govoi...@gmail.com]
Enviado: segunda-feira, 13 de julho de 2015 17:43
Para: Asterisk Users Mailing List - Non-Commercial Discussion
Assunto: Re: [asterisk-users] RES: How to dial extensions 
asynchronous-sequentially ?

All I can focus now is the objective is to see if there is an way to deliver 
more than one SIP 183 message to the caller

6001 has a song playing in 183 and 6002 has a service unavailable message, do 
you intend to deliver both of them simultaneously to the caller? I've seen 
multiple 183 Session Progress messages getting delivered to caller but what is 
your end game ? Play all sort of messages to the caller together ?

Whoever told you about Asterisk not letting 183 go to the caller with this 
dialstring was right. If you want all 183 msgs coming from all parties to be 
heard by the caller then I suggest you create a conference, and call the 6001, 
and 6002 as its participant. Thats the only place where I believe the audio 
from different channel is mixed and streamed to users.

From SIP protocol perspective even if multiple 183 Session Progress messages 
reach to the Caller with each message pointing to different sources, the 
caller's UAC should ideally pick only one of them, the latest one I believe.

BR,
Sammy


On Mon, Jul 13, 2015 at 3:51 PM, Rodrigo Pimenta Carvalho 
pime...@inatel.brmailto:pime...@inatel.br wrote:
Hi SamyGo.

Thank you for the replay. So, let me explain it better:

I knew that I could use something like  same = n,Dial(PJSIP/6001PJSIP/6002)  
.
While every extension (called phones) rings and before anyone answers, SIP 183 
messages will be sent to Asterisk from callees. If a called phone answer, the 
others will be hanged up. It is ok for me. I want to connect the caller just to 
the first called party that answers.
Yes, it is some sort of ring group implementation where users are dialled and 
just the first one to answer will get the call.

If I just do  same = n,Dial(PJSIP/6001) , there will be a SIP 183 message 
from 6001 to the caller. The caller will really receive that SIP 183 message. 
In this case, Asterisk seems to work as a proxy.
However, if I do  same = n,Dial(PJSIP/6001PJSIP/6002)  , the caller will not 
receive those SIP 183 messages from 6001 and 6002. In this case asterisk seems 
to work different of a proxy, as someone told me in this list.

So, if I dial 6001 and 6002, but in asynchronous and sequentially way, I will 
have a chance to see if the caller will receive the SIP 183 messages from 6001 
and 6002. That it, the objective is to see if there is an way to deliver more 
than one SIP 183 message to the caller, in a kind of  ring group implementation.

Any hint will be very helpful!!

Thanks a lot!


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200tel:%2B55%2035%203471%209200 RAMAL 979

De: 
asterisk-users-boun...@lists.digium.commailto:asterisk-users-boun...@lists.digium.com
 
[asterisk-users-boun...@lists.digium.commailto:asterisk-users-boun...@lists.digium.com]
 em Nome de SamyGo [govoi...@gmail.commailto:govoi...@gmail.com]
Enviado: segunda-feira, 13 de julho de 2015 16:24
Para: Asterisk Users Mailing List - Non-Commercial Discussion
Assunto

[asterisk-users] RES: RES: How to dial extensions asynchronous-sequentially ?

2015-07-13 Thread Rodrigo Pimenta Carvalho
Hi Sammy.

After answering your last message (please, see my last message), I was thinking 
about conferences and my main objective.
Conferences will not work well for my case, because I it will allows more than 
one called party answering the call.  But, after one answers the call, I need 
cancel the others ringing callees.


In this case, maybe the best thing to do is to let the called party sends a SIP 
MESSAGE to the caller or to the Asterisk,  even before any call being answered. 
Then, get the message body content and handle it via Asterisk or directly in 
the caller.

What do you think?

Best regards.


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979(Brasil)

De: asterisk-users-boun...@lists.digium.com 
[asterisk-users-boun...@lists.digium.com] em Nome de SamyGo [govoi...@gmail.com]
Enviado: segunda-feira, 13 de julho de 2015 17:43
Para: Asterisk Users Mailing List - Non-Commercial Discussion
Assunto: Re: [asterisk-users] RES: How to dial extensions 
asynchronous-sequentially ?

All I can focus now is the objective is to see if there is an way to deliver 
more than one SIP 183 message to the caller

6001 has a song playing in 183 and 6002 has a service unavailable message, do 
you intend to deliver both of them simultaneously to the caller? I've seen 
multiple 183 Session Progress messages getting delivered to caller but what is 
your end game ? Play all sort of messages to the caller together ?

Whoever told you about Asterisk not letting 183 go to the caller with this 
dialstring was right. If you want all 183 msgs coming from all parties to be 
heard by the caller then I suggest you create a conference, and call the 6001, 
and 6002 as its participant. Thats the only place where I believe the audio 
from different channel is mixed and streamed to users.

From SIP protocol perspective even if multiple 183 Session Progress messages 
reach to the Caller with each message pointing to different sources, the 
caller's UAC should ideally pick only one of them, the latest one I believe.

BR,
Sammy


On Mon, Jul 13, 2015 at 3:51 PM, Rodrigo Pimenta Carvalho 
pime...@inatel.brmailto:pime...@inatel.br wrote:
Hi SamyGo.

Thank you for the replay. So, let me explain it better:

I knew that I could use something like  same = n,Dial(PJSIP/6001PJSIP/6002)  
.
While every extension (called phones) rings and before anyone answers, SIP 183 
messages will be sent to Asterisk from callees. If a called phone answer, the 
others will be hanged up. It is ok for me. I want to connect the caller just to 
the first called party that answers.
Yes, it is some sort of ring group implementation where users are dialled and 
just the first one to answer will get the call.

If I just do  same = n,Dial(PJSIP/6001) , there will be a SIP 183 message 
from 6001 to the caller. The caller will really receive that SIP 183 message. 
In this case, Asterisk seems to work as a proxy.
However, if I do  same = n,Dial(PJSIP/6001PJSIP/6002)  , the caller will not 
receive those SIP 183 messages from 6001 and 6002. In this case asterisk seems 
to work different of a proxy, as someone told me in this list.

So, if I dial 6001 and 6002, but in asynchronous and sequentially way, I will 
have a chance to see if the caller will receive the SIP 183 messages from 6001 
and 6002. That it, the objective is to see if there is an way to deliver more 
than one SIP 183 message to the caller, in a kind of  ring group implementation.

Any hint will be very helpful!!

Thanks a lot!


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200tel:%2B55%2035%203471%209200 RAMAL 979

De: 
asterisk-users-boun...@lists.digium.commailto:asterisk-users-boun...@lists.digium.com
 
[asterisk-users-boun...@lists.digium.commailto:asterisk-users-boun...@lists.digium.com]
 em Nome de SamyGo [govoi...@gmail.commailto:govoi...@gmail.com]
Enviado: segunda-feira, 13 de julho de 2015 16:24
Para: Asterisk Users Mailing List - Non-Commercial Discussion
Assunto: Re: [asterisk-users] How to dial extensions
asynchronous-sequentially ?

Hi,
Even you achieve that, what would be the objective? Do you want to just call 
the user and Hangup ? or Dial two users and connect them together ? Is this 
some sort of ring group implementation where users are dialled and first one to 
answer will get the call ??

Anyway here's one way of how I think you can do.

Have a context created to dial the individual user

[dial_user]
exten = _600X.,1,Dial(PJSIP/${EXTEN})
...

and in your code change it to.

same = n,Dial(local/6001@dial_user/nlocal/6002@dial_user/n)
same = n,Hangup()



On Mon, Jul 13, 2015 at 2:28 PM, Rodrigo Pimenta Carvalho 
pime...@inatel.brmailto:pime...@inatel.brmailto:pime...@inatel.brmailto:pime...@inatel.br
 wrote:

Hi.


I my dialplan I have :

same = n,Dial(PJSIP/6001,10)
same = n,Dial(PJSIP/6002,30)
same = n,Hangup

[asterisk-users] RES: Can I use PJSIP_HEADER to read the SIP 183 message header?

2015-07-10 Thread Rodrigo Pimenta Carvalho
Ok Mark Michelson.

Thank you very much! You answer tells me that I was in the wrong path trying to 
access information from SIP 183 message.

I need to find a way to let the callee pass information/data to the caller, 
even before accepting the call. That is, send data during the ringing time. And 
in my case, there will be more than one callee ringing at same time. As 
ASTERISK will not forward each SIP 183 message to the caller, I intend to get 
data from callees in dialplan by some another way before the call being 
accepted.

1- Is there any way to do that?

2 - SIP MESSAGE, if sent by the calle, enters the dialplan?

 Any hint will be very helpful!

 Best regards.



RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9300 (Brasil)

De: asterisk-users-boun...@lists.digium.com 
[asterisk-users-boun...@lists.digium.com] em Nome de Mark Michelson 
[mmichel...@digium.com]
Enviado: sexta-feira, 10 de julho de 2015 15:14
Para: Asterisk Users Mailing List - Non-Commercial Discussion
Assunto: Re: [asterisk-users] Can I use PJSIP_HEADER to read the SIP 183 
message header?

On 07/10/2015 11:53 AM, Rodrigo Pimenta Carvalho wrote:
 Hi.

 The ASTERISK wiki has a page showing the function PJSIP_HEADER(). However, it 
 doesn't explain if such function works only over SIP INVITE messages or if it 
 can be use, for example, to read headers from others types of SIP messages 
 too.

 So, can I use PJSIP_HEADER to read the SIP 183 message header?

 Any hint will be very helpful!

 Best regards.


 RODRIGO PIMENTA CARVALHO
 Inatel Competence Center
 Software
 Ph: +55 35 3471 9200 RAMAL 979 (Brasil)
Unfortunately, PJSIP_HEADER() cannot be used on responses because SIP
responses do not enter the dialplan.

--
_
-- 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] RES: Messages out of calls. Is it really possible?

2015-07-10 Thread Rodrigo Pimenta Carvalho
Hi Matthew Jordan

Thank you very very much!

Now it seems to me that I have a direction to follow!
My intention is to create a way of receiving data from callees, in asterisk, 
even before the call being accepted by one of them. In my project there will be 
more than one callee ringing at same time.

In my project, when more than one callee rings, all of them sends SIP 183 
message to asterisk. However, as long as asterisk doesn't forward every SIP 183 
message to the caller, I have to find a way to callees send some data to the 
asterisk, containing information about media, for example.
In asterisk I intend do collect those information and pass it to the caller, to 
work around those not forwarded SIP 183 messages.

If it can work, I will try to implement early media with video.

Can you comment about my idea? Do you think it sounds feasible?

Best regards!!



RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979   (Brasil)

De: asterisk-users-boun...@lists.digium.com 
[asterisk-users-boun...@lists.digium.com] em Nome de Matthew Jordan 
[mjor...@digium.com]
Enviado: sexta-feira, 10 de julho de 2015 15:29
Para: Asterisk Users Mailing List - Non-Commercial Discussion
Assunto: Re: [asterisk-users] Messages out of calls. Is it really possible?

On Fri, Jul 10, 2015 at 11:51 AM, Rodrigo Pimenta Carvalho
pime...@inatel.br wrote:

 Hi.

 I have read in some web sites that ASTERISK can support messages out of 
 calls. What does it exactly means?

 1 - Can a dialplan script accept and handle a message from a callee party, 
 even before the call be connected?

Since it is out of call, yes.

SIP MESSAGE requests are handled by the respective channel driver
(chan_sip or the res_pjsip stack) and passed to the dialplan using a
special hidden channel, Message. That channel caries the payload and
some meta information about the MESSAGE request, which can be accessed
using the generic out-of-call messaging functions [1].

Likewise, you can send an out of call SIP MESSAGE request using MessageSend [2].

Note that all of this has been supported since Asterisk 10.

 2 - Can a ringing callee send SIP MESSAGE to the ASTERISK even before answer 
 the call?

Yes, hence the term out-of-call.

 3- Could I use dialplan function MESSAGE() to receive SIP messages from 
 callees, even before the call be connected?

It does not receive messages; it accesses data on the message
currently being serviced by the executing Message channel.

chan_sip/res_pjsip will receive and dispatch MESSAGE requests at any
point in time. They have nothing to do with your normal SIP or PJSIP
channels, and hence nothing to do with whatever INVITE request derived
channels are currently executing in the dialplan.

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Function_MESSAGE
and https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Function_MESSAGE_DATA
[2] 
https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_MessageSend

--
Matthew Jordan
Digium, Inc. | Director of Technology
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com  http://asterisk.org

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

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

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

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


[asterisk-users] Messages out of calls. Is it really possible?

2015-07-10 Thread Rodrigo Pimenta Carvalho

Hi.

I have read in some web sites that ASTERISK can support messages out of calls. 
What does it exactly means?

1 - Can a dialplan script accept and handle a message from a callee party, even 
before the call be connected?

2 - Can a ringing callee send SIP MESSAGE to the ASTERISK even before answer 
the call?

3- Could I use dialplan function MESSAGE() to receive SIP messages from 
callees, even before the call be connected?

Any hint will  be very helpful!

Best regards.

RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979(Brasil)
-- 
_
-- 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] What Dial Plan function can access the contents of the SDP ?

2015-07-09 Thread Rodrigo Pimenta Carvalho


Dear ASTERISK-users,

What Dial Plan function can access the contents of the SDP ?
If there is no Dial Plan Function for that, is there some another way to access 
contents of the SDP? Maybe via ARI ou AGI?
If there is, how to access the SDP that comes with the SIP 183 response?

Any hint will be very helpful!

Best regards.

RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979   (Brasil)
-- 
_
-- 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] RES: How many SIP 183 messages a caller receives when many callee rings?

2015-07-08 Thread Rodrigo Pimenta Carvalho

Hi Joshua Colp.

Thank you very much for alerting me about the impossibility of forwarding the 
SIP 183 messages from callees to caller, via Asterisk, when more than 1 callee 
ring at same time.

In my project the caller software (a proprietary softphone) needs to know some 
information about the callees, while they are still all ringing. Such 
information will be used to create early media (only video) from caller to all 
callees. For example, the caller softphone should receive the IPs and ports 
where each callee will listen to video data. The caller softphone will use RTSP 
to create such early media. That is why I was investigating an way of passing 
SIP 183 messages from callees to the caller.

However, as you told me about such impossibility, now I have to discover a way 
of collecting such callees' media information and deliver it to the proprietary 
caller software.
So, I ask you:

1 - Is there a way of collecting information from SIP messages that arrives in 
Asterisk, in dial plan (by means of application  or functions)?  If yes, I 
could pass it to a external software.

2-  Is there a way of handling SIP 183 or SIP 180 messages in dial plan and 
forward such messages to another destiny, as in a proxy?

3 - Should I use Asterisk REST Interface to collect information from SIP 
messages that pass in the current channel of a call, whether I need collect it 
and pass to a proprietary software? I was reading about ARI today.

4 - By the way, can an external application, using ARI, send requests to the 
Asterisk, even when such application is not invoked by a dial plan? That is, 
can an external application decide by itself to contact a Asterisk REST 
interface?

Any hint about early media (video) with asterisk will be very helpful to me, as 
I'm completely beginner in this field.

Thanks a lot!


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979  (Brasil)

De: asterisk-users-boun...@lists.digium.com 
[asterisk-users-boun...@lists.digium.com] em Nome de Joshua Colp 
[jc...@digium.com]
Enviado: quarta-feira, 8 de julho de 2015 11:53
Para: Asterisk Users Mailing List - Non-Commercial Discussion
Assunto: Re: [asterisk-users] How may SIP 183 messages a caller receives when 
many callee rings?

Rodrigo Pimenta Carvalho wrote:
 Hi.

 I have a beginner conceptual question about Asterisk:

 Let's suppose that there are 4 softphones registered in my Asterisk
 and all of them are currently online. In addiction , there is no
 call.

 Suddenly, one of these softphones  sends a SIP message to the
 Asterisk. In this case the dialplan will execute the instruction  '
 exten =  2005,1,Dial(SIP/2000SIP/2001SIP/2002, 30) '

 All softphones (2000, 2001 and 2002) will ring. These are proprietary
 softphones and all of then will reply with SIP 183 message. SIP 183
 will contain SDP with media information.

 The question is:

 Will the caller receive SIP 183  from each callee? That is, will it
 receive 3 SIP 183 messages? It is important to the caller receives a
 SIP 183 message from each callee, because this caller needs to send
 early media (video) to every callee.

 Or, will Asterisk send just one message SIP 183 to the caller, with
 some kind of generic SDP message?

Asterisk isn't a proxy, so it won't forward all 3 and it won't forward
media from all 3. Right now the Dial application is simple and just
doesn't forward media in this scenario.

--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com  www.asterisk.org

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
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] RES: Fwd: What database should I use, for simple data storing? SQLite or the buitin one?

2015-07-07 Thread Rodrigo Pimenta Carvalho
Hi.

Thank you for your instruction!
What I need is simplicity. That is, a simple solution (no relational data base) 
will fit very well now. In this case I will start investigating about how to 
use the Asterisk (version 13 or later) builtin database.

Is it SQLite?
How to access it via dial plan, etc?
What must I configure in my asterisk?
What must i install to use the builtin database?
Where to find a tutorial with explanations about such questions?

Best regards.

 


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979(Brasil)

De: asterisk-users-boun...@lists.digium.com 
[asterisk-users-boun...@lists.digium.com] em Nome de Technical Support 
[supp...@telium.ca]
Enviado: terça-feira, 7 de julho de 2015 11:51
Para: asterisk-users@lists.digium.com
Assunto: Re: [asterisk-users] Fwd:  What database should I use, for simple data 
storing? SQLite or the buitin one?

To some extent the answer depends on how you want to use it overall, and
what you already have installed.


We did something similar on a project where we created a simple app
accessible via AGI, and it stored/retrieved data to/from anXML file.  If
your access frequency is low enough that might be a good solution.  On
the other hand if you need complex query capability you should stay on
the SQL side.


  If you already have MySQL installed for other Asterisk features (eg:
CDR, or if you use FreePBX) then you might as well use that.

​


--
_
-- 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] RES: What database should I use, for simple data storing? SQLite or the buitin one?

2015-07-07 Thread Rodrigo Pimenta Carvalho
Hi Antony.

Thank you for your replay. I have decided to use the builtin database, 
according to others help that I have kindly received in this discussion list. 
What I need is a simple solution, not a relational database one.

Best regards.

RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979   (Brasil)

De: asterisk-users-boun...@lists.digium.com 
[asterisk-users-boun...@lists.digium.com] em Nome de Антон Сацкий 
[satski...@gmail.com]
Enviado: terça-feira, 7 de julho de 2015 11:32
Para: Asterisk Users Mailing List - Non-Commercial Discussion
Assunto: Re: [asterisk-users] What database should I use, for simple data 
storing? SQLite or the buitin one?

Propose U to use Mysql

2015-07-07 17:26 GMT+03:00 Rodrigo Pimenta Carvalho 
pime...@inatel.brmailto:pime...@inatel.br:


Hi.

I was studying about how to use databases in Asterisk, accessing it from the 
dial plan.
In my project, my dial plan will have to store simple data (ex: IP number, port 
number, device name, etc) in a persistent way, so that it will be possible to 
retrieve such information in future moments, still via dial plan.

For this case, I would like to know?

1. What is the best choice for storing and retrieving simple data , with dial 
plan instructions: SQLite or the builtin database option? Consider that I'm 
worried about installation, configuration and use difficulties.

2. Does Asterisk 13 come with SQLite ready for use or have I to install this 
database separately and configure it to be accessible in dial plan?

3. Where can I find tutorials about using SQLite or the builtin database for 
storing simple that?

P.S.: I'm not interested in storing CDR data.

Any hint will be very helpful!

Thanks a lot!


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200tel:%2B55%2035%203471%209200 RAMAL 979(Brasil)
--
_
-- 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



--
Best regards
Antony
моб (066) 919-75-33
моб (063) 656-43-40
satski...@gmail.commailto:mail%3asatski...@gmail.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

[asterisk-users] RES: What database should I use, for simple data storing? SQLite or the buitin one?

2015-07-07 Thread Rodrigo Pimenta Carvalho

Hi John.

Thank you very much for you reply. It is exactly what I was needing to know. 
Now I will study about the use of SQLite + Asterisk, because MySQL will not be 
necessary in my solution. A relational database will not be necessary. 
I 'm needing simplicity.

Do you know where can I find a tutorial about accessing and using the asterisk 
builtin database, considering Asterisk 13 or later?

Any hint will be very helpful.

Thanks


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979 (Brasil)

De: asterisk-users-boun...@lists.digium.com 
[asterisk-users-boun...@lists.digium.com] em Nome de Tech Support 
[aster...@voipbusiness.us]
Enviado: terça-feira, 7 de julho de 2015 11:58
Para: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Assunto: Re: [asterisk-users] What database should I use,   for simple data 
storing? SQLite or the buitin one?

I believe that Asterisk 1.8 and older uses the BerkeleyDB for Asterisk's
internal database (AKA the Astdb) and in newer versions use SQLite. However,
the basic functionality is the same. Whether you use the Astdb or MySQL
really depends on what you want to do with it. The AstDB is not a relational
database like MySQL, it simply a key/value store. If you can get away with
that, and you need simplicity, then the AstDB is the way to go. If you need
MySQL you'll probably end up having to write AGI scripts to access it. Like
I said, it all depends on what your needs are.
Regards;
John

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Rodrigo
Pimenta Carvalho
Sent: Tuesday, July 07, 2015 10:26 AM
To: asterisk-users@lists.digium.com
Subject: [asterisk-users] What database should I use, for simple data
storing? SQLite or the buitin one?



Hi.

I was studying about how to use databases in Asterisk, accessing it from the
dial plan.
In my project, my dial plan will have to store simple data (ex: IP number,
port number, device name, etc) in a persistent way, so that it will be
possible to retrieve such information in future moments, still via dial
plan.

For this case, I would like to know?

1. What is the best choice for storing and retrieving simple data , with
dial plan instructions: SQLite or the builtin database option? Consider that
I'm worried about installation, configuration and use difficulties.

2. Does Asterisk 13 come with SQLite ready for use or have I to install this
database separately and configure it to be accessible in dial plan?

3. Where can I find tutorials about using SQLite or the builtin database for
storing simple that?

P.S.: I'm not interested in storing CDR data.

Any hint will be very helpful!

Thanks a lot!


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979(Brasil)
--
_
-- 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] Can I use ARI to update the builtin database, without executing the dial plan?

2015-07-07 Thread Rodrigo Pimenta Carvalho
Hi.

In my dial plan I can use the following commands to access and handle data from 
the builtin database.

DB
DB_DELETE
DB_EXISTS
DB_KEYS

It is OK for me. However, in my current project there will be an application 
responsible for recording new information in the builtin database. 
So, I need to know:

1.  Is it possible to access the builtin database, by means of ARI ?

2. If it is possible by ARI, where can I find a tutorial about it?

3. Can I do something like this?:

  My APP --sends data to a REST service Asterisk REST 
Interfacethe data is put into the builtin 
database The builtin database

That is, can I send data to the builtin database, using REST interfaces, but 
without executing any dial plan? If yes, my app will be able to update data 
without executing the dial plan.

Any hint will be very helpful!

Best Regards.


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979(Brasil)
-- 
_
-- 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] What database should I use, for simple data storing? SQLite or the buitin one?

2015-07-07 Thread Rodrigo Pimenta Carvalho


Hi.

I was studying about how to use databases in Asterisk, accessing it from the 
dial plan. 
In my project, my dial plan will have to store simple data (ex: IP number, port 
number, device name, etc) in a persistent way, so that it will be possible to 
retrieve such information in future moments, still via dial plan. 

For this case, I would like to know?

1. What is the best choice for storing and retrieving simple data , with dial 
plan instructions: SQLite or the builtin database option? Consider that I'm 
worried about installation, configuration and use difficulties.

2. Does Asterisk 13 come with SQLite ready for use or have I to install this 
database separately and configure it to be accessible in dial plan?

3. Where can I find tutorials about using SQLite or the builtin database for 
storing simple that?

P.S.: I'm not interested in storing CDR data.

Any hint will be very helpful!

Thanks a lot!


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979(Brasil)
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


[asterisk-users] How may SIP 183 messages a caller receives when many callee rings?

2015-07-06 Thread Rodrigo Pimenta Carvalho

Hi.

I have a beginner conceptual question about Asterisk:

Let's suppose that there are 4 softphones registered in my Asterisk and all of 
them are currently online. In addiction , there is no call.

Suddenly, one of these softphones  sends a SIP message to the Asterisk. In this 
case the dialplan will execute the instruction  ' exten = 
2005,1,Dial(SIP/2000SIP/2001SIP/2002, 30) ' 

All softphones (2000, 2001 and 2002) will ring. These are proprietary 
softphones and all of then will reply with SIP 183 message. SIP 183 will 
contain SDP with media information.

The question is:

Will the caller receive SIP 183  from each callee? That is, will it receive 3 
SIP 183 messages? It is important to the caller receives a SIP 183 message from 
each callee, because this caller needs to send early media (video) to every 
callee.

Or, will Asterisk send just one message SIP 183 to the caller, with some kind 
of generic SDP message?

Any hint will be very helpful!

Thanks a lot.


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979 (Brasil)
-- 
_
-- 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] RES: Banco de dados interno no Asterisk e variáveis em SIP HEADERS

2015-06-12 Thread Rodrigo Pimenta Carvalho


Prezado Fernando,

Muito obrigado por sua complementação na resposta!
Surgiram algumas dúvidas agora:

A única forma de retornar os dados num header field, como o Rafael dos Santos 
Saraiva sugeriu envolve criar outro channel?

Ou seja, o que eu preciso é que a mesma execução do dia plan obtenha um valor 
recebido do Sip Client, execute uma query num banco de dados e em seguida 
inclua a resposta como novo hearder field na mensagem a ser enviada de resposta 
ao mesmo SIP Client.
Tudo isso pode ser executado no mesmo channel? Ou seja, sem precisar fazer um 
Dial() para o Sip Client?

Por exemplo:
Suponha o seguinte, o SIP client envia um SIP INVITE para o Asterisk, contendo 
um novo header field na mensagem. O dia plan executa, faz o que tem que fazer, 
obtem um valor de um banco de dados e em seguida inclui esse valor como novo 
header field na mensagem de resposta SIP ACK 100. Ou talvez na mensagem de 
resposta SIP 180 (Ringing). Isso tudo seria feito num mesmo channel? O que 
estou imaginando é usar as mensagem padrões SIP, que o Asterisk já sabe 
manipular, e pegar 'carona' nelas para o transporte de pequenos dados.

Algo desse tipo é possível de ser feito?

No nosso projeto usaremos SIP com TCP, não com UDP, devido a outros requisitos. 
Isso facilitará o uso da ideia com Json, certo?

Atenciosamente,



RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979


--

Só complementando a resposta do amigo Rodrigo.

O Comando SIPAddHeader vai adicionar um cabeçalho SIP, porém no channel 
atual, e o Dial, criará outro channel, o qual não irá ter o cabeçalho 
que você adicionou:

Se quiser que o cabeçalho SIP customizado esteja disponivel e seja 
enviado para a Ponta B que o Dial está chamando, você terá que executar 
uma Macro utilizando o canal novo que será criado pelo comando Dial.

Algo do Tipo:

[header]
exten = cid,1,SIPAddHeader(X-My-Header=MYCUSTOMHEADER)
same=n,Return(1)

[meudial]
exten = _X.,Dial(SIP/X.X.X.X/${EXTEN},,b(header^cid^1))

Porém, UDP tem suas limitações, e tentar incomporar JSON a SIP Message, 
imagino que não consiga ter uma ambiente de fácil manutenção.
Uma ideia seria utilizar Kamailio ou OpenSIPs o que te da mais 
ferramentas para gerenciar o SIP Message.

Ou você pode utilizar seu próprio esquema utilizando um sistema de 
mensagens TCP como o ZeroMQ ou o GearmanD.

Atenciosamente / Best regards / Saludos,


P Antes de imprimir pense em sua responsabilidade e  compromisso com o 
Meio Ambiente!


-- Mensagem original --
De: Rafael dos Santos Saraiva rafaelsnsa em gmail.com
Para: asteriskbrasil em listas.asteriskbrasil.org 
asteriskbrasil em listas.asteriskbrasil.org
Enviado(s): 12/06/2015 14:53:42
Assunto: Re: [AsteriskBrasil] RES: Banco de dados interno no Asterisk e 
variáveis em SIP HEADERS

Rodrigo

Segue um exemplo de manipulação do SIP HEADER:

Servidor 1:
exten = _X.,1,Answer()
same  = n,SIPAddHeader(Custom-variable: valor da minha variavel)
same  = n,Dial(SIP/10.68.2.43/${EXTEN},30,tT)
same  = n,HangUp
Servidor 2:
exten = _X.,1,Answer()
exten = _X.,n,NoOp(${SIP_HEADER(Custom-variable)})
exten = _X.,n,goto(ura,s,1)
exten = _X.,n,HangUp

Você enviar quaisquer valores que possam ser definidos numa variável.

Neste sites você encontra maiores informações:
http://www.voip-info.org/wiki/view/Asterisk+cmd+SipAddHeader
https://wiki.asterisk.org/wiki/display/AST/Home

O Jabber trabalha com o protocolo XMPP, de mensagens instantâneas.
-- 
_
-- 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] Can dial plan handle new proprietary SIP HEADER fields? How?

2015-06-12 Thread Rodrigo Pimenta Carvalho

Dear asterisk-users,

I have listened that a diaplan on Asterisk can extract information from 
proprietary SIP messages header fields. That is, if Asterisk receives a SIP 
message with a modified HEADER (containing proprietary fields) , is it possible 
to program the dial plan to make Asterisk extract the values of such fields, 
being possible to handle such values in diaplan, isn't it?

If it is true, is it also possible to use dial plan to make Asterisk include 
proprietary SIP HEADER fields in a specific SIP message?

Any hint will be very helpful!


Best regards.

RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200  RAMAL 979
-- 
_
-- 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] Can Asterisk help me with some requeriments of my current project?

2015-06-08 Thread Rodrigo Pimenta Carvalho

Hi Asterisk-user.

I'm starting in a soft-phone project with lots of requirements and some of then 
caused me some doubts about Asterisk. Could someone tell me if Asterisk can 
help me with some requirements? See below:

1 - My SIP server (Asterisk) will have some SIP clients registered in its SIP 
registrar. Let's say 6 SIP clients. In my project I have to implement a way of 
a SIP client making a call to a number and all others 5 SIP clients ring. That 
is, the others 5 SIP clients must receive the SIP INVITE. Can Asterisk help me 
with such functionality?

2 - When several SIP client ring, if one answer the call first, the others will 
have to stop ringing immediately. Can Asterisk help me with this requirement?

3 - How to avoid one of the SIP clients receiving SIP INVITES? That is, one of 
the SIP clients is forbidden to receive calls. Is there a way to program it in 
Asterisk, maybe via dial plan?

4- Let's suppose that I have a data base (let's say SQLite) in my SIP server 
(Asterisk) and I need implement a way of SIP Clients executing queries in such 
database. Could such queries be done/sent via SIP messages to Asterisk? Is 
there a way of accessing a database by meas of Asterisk, during a call, for 
example to collect information about others SIP Clients?  Here I'm intending to 
create a software to be a kind of interface between Asterisk and the database, 
if necessary.

5 - If I need to send SIP messages all encrypted, using SSL or TLS , to the 
Asterisk, will this SIP server be able to interpret all messages correctly? Is 
there a way of let Asterisk talk with SIP clients in a secure way, using SSL, 
for example? Can Asterisk help me with this?

Any hint will be very helpful!!

Best regards.


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979
-- 
_
-- 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] RES: RES: RES: How to invoke a binary file from the dial plan?

2015-06-03 Thread Rodrigo Pimenta Carvalho
Hi Kevin.

Thank you again for help me!

In my case,  in the final application for smartphones or in a softphone for 
PCs, there will be a button on the GUI and the user will have just to touch it, 
and the door or gate will open. I mean, during an ongoing call, the callee will 
see a button in the interface of its SIP application. For example, we can use 
the lib of Linphone and implement a GUI over it, having a new button to open 
doors and gates. So, the callee will not have to remember about codes, because 
there will be a button in someplace to be touched.

When the button be touched, during an ongoing call, the software (SIP client) 
will sends a request to Asterisk executes the gate = 
9,self/callee,System,insert command here , for example. So, it will works 
like the user pressing number 9.

I will take a look at applicationmap in features.conf to understand what 
exactly can be done.

But, let me ask you:
This idea seems to be good to run during ongoing calls. What about moments when 
there is no ongoing call? That is, can Asterisk execute a dial plan (maybe by 
means of some kind of SIP request received from the SIP client) even without 
establishing a call?

Regards.


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979

De: asterisk-users-boun...@lists.digium.com 
[asterisk-users-boun...@lists.digium.com] em Nome de Kevin Larsen 
[kevin.lar...@pioneerballoon.com]
Enviado: quarta-feira, 3 de junho de 2015 10:29
Para: Asterisk Users Mailing List - Non-Commercial Discussion
Assunto: Re: [asterisk-users] RES: RES: How to invoke a binary file from the 
dial plan?

 Hi Kevin.

 Thank you very much for the hint! It worked very well!

 Your example ' exten = 1234,1,System(echo This is a test  /
 var/log/asterisk/test.txt) ' executes when the SIP client (my
 softphone Jitsi) sends  a SIP INVITE to asterisk.  So, the softphone
 tries to establish a session with target 1234.

 Now, lets suppose my softphone rings and I answer a call. During the
 call, the caller asks me to execute a command (ex: to open a door or
 gate). In this case, what have I to program in dial plan to Asterisk
 execute System() again? Is it possible to execute a dial plan even
 during an ongoing call?

 Finally, lets suppose I want to use my softphone to execute a dial
 plan, even without establishing a call (no session with target
 1234). For example, If I decide to open a dor or gate using my
 softphone, without existing an ongoing call, what have I to program
 in dial plan to Asterisk executes System(). Is this idea possible?

 Any hint will be very hepful!

I love this question, simply because it allows me to talk about one of the 
neatest features I programmed into my system that barely anyone knows exists. 
Plus it lines up pretty much exactly with what you are trying to do.

We have our gate control system tied into our Asterisk phone system so it is 
possible to dial a code on the phone and open the entrance gate to let someone 
in after hours. Only problem is this happens so rarely that no one (myself 
included) ever remembered the code. Thus a search for a better way.

Now, when someone uses the gate phone to request entry, I change the caller ID 
on the display of the person who answers to read Press 9 to open gate. During 
the call, they can hit 9 at any time and the gate will open for them. Up until 
they answer, the caller ID reads Gate Phone, but when they answer, it changes 
to that text.

The part about opening the gate is the magic piece you want to look into. Read 
up on applicationmap in features.conf. It's pretty simple and very effective. 
Here is what mine looks like. I am going to replace my actual command with 
insert command here.

gate = 9,self/callee,System,insert command here ; Custom application to open 
the gate.

This says that this feature is active in the 'gate' context of my dialplan. The 
dialing pattern it is looking for is a 9. 'self' tells it to activate on the 
channel that dialed it and callee says that the person receiving the call is 
the only one that can activate it (otherwise the person at the gate phone could 
hit 9 to open it). I am running the System dialplan application and passing it 
the insert command here value. Everything after the ';' is a comment as 
normal. The insert command here is equivalent to what you would put inside 
the '()' if it were in the dialplan (i.e. 'System(insert command here)').

Pretty straightforward to get it working once you know what to look for. Let me 
know if you want to know how I manipulate the Caller ID upon answering the call 
to give the instructions to the callee on how to open the gate/door.

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

[asterisk-users] RES: RES: RES: How to invoke a binary file from the dial plan?

2015-06-03 Thread Rodrigo Pimenta Carvalho
Hi Kevin.

Thank you!
I will examine it.
Regards.


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979

De: asterisk-users-boun...@lists.digium.com 
[asterisk-users-boun...@lists.digium.com] em Nome de Kevin Larsen 
[kevin.lar...@pioneerballoon.com]
Enviado: quarta-feira, 3 de junho de 2015 10:34
Para: Asterisk Users Mailing List - Non-Commercial Discussion
Assunto: Re: [asterisk-users] RES: RES: How to invoke a binary file from the 
dial plan?

 I love this question, simply because it allows me to talk about one
 of the neatest features I programmed into my system that barely
 anyone knows exists. Plus it lines up pretty much exactly with what
 you are trying to do.

 We have our gate control system tied into our Asterisk phone system
 so it is possible to dial a code on the phone and open the entrance
 gate to let someone in after hours. Only problem is this happens so
 rarely that no one (myself included) ever remembered the code. Thus
 a search for a better way.

 Now, when someone uses the gate phone to request entry, I change the
 caller ID on the display of the person who answers to read Press 9
 to open gate. During the call, they can hit 9 at any time and the
 gate will open for them. Up until they answer, the caller ID reads
 Gate Phone, but when they answer, it changes to that text.

 The part about opening the gate is the magic piece you want to look
 into. Read up on applicationmap in features.conf. It's pretty simple
 and very effective. Here is what mine looks like. I am going to
 replace my actual command with insert command here.

 gate = 9,self/callee,System,insert command here ; Custom
 application to open the gate.

 This says that this feature is active in the 'gate' context of my
 dialplan. The dialing pattern it is looking for is a 9. 'self' tells
 it to activate on the channel that dialed it and callee says that
 the person receiving the call is the only one that can activate it
 (otherwise the person at the gate phone could hit 9 to open it). I
 am running the System dialplan application and passing it the
 insert command here value. Everything after the ';' is a comment
 as normal. The insert command here is equivalent to what you would
 put inside the '()' if it were in the dialplan (i.e. 'System(insert
 command here)').

 Pretty straightforward to get it working once you know what to look
 for. Let me know if you want to know how I manipulate the Caller ID
 upon answering the call to give the instructions to the callee on
 how to open the gate/door.

I just realized I said one piece wrong in this. 'gate' is not the context, it 
is the dynamic feature designator. I can illustrate this better by posting my 
front gate context.

[front_gate]
exten = number gate dials goes here,1,Set(__DYNAMIC_FEATURES=gate)
  same = n,Goto(frontgate_queue,${EXTEN},1)


-- 
_
-- 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] RES: RES: How to invoke a binary file from the dial plan?

2015-06-03 Thread Rodrigo Pimenta Carvalho
Hi Kevin.

Thank you very much for the hint! It worked very well!

Your example ' exten = 1234,1,System(echo This is a test  
/var/log/asterisk/test.txt) ' executes when the SIP client (my softphone 
Jitsi) sends  a SIP INVITE to asterisk.  So, the softphone tries to establish a 
session with target 1234.

Now, lets suppose my softphone rings and I answer a call. During the call, the 
caller asks me to execute a command (ex: to open a door or gate). In this case, 
what have I to program in dial plan to Asterisk execute System() again? Is it 
possible to execute a dial plan even during an ongoing call?

Finally, lets suppose I want to use my softphone to execute a dial plan, even 
without establishing a call (no session with target 1234). For example, If I 
decide to open a dor or gate using my softphone, without existing an ongoing 
call, what have I to program in dial plan to Asterisk executes System(). Is 
this idea possible?

Any hint will be very hepful!

Best regards.


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979

De: asterisk-users-boun...@lists.digium.com 
[asterisk-users-boun...@lists.digium.com] em Nome de Kevin Larsen 
[kevin.lar...@pioneerballoon.com]
Enviado: terça-feira, 2 de junho de 2015 17:50
Para: Asterisk Users Mailing List - Non-Commercial Discussion
Assunto: Re: [asterisk-users] RES: How to invoke a binary file from the dial
plan?

 Ok. Thanks for the hint.

 But, what exactly is a System() dialplan application? Is it a kind
 of command that i can call in dial plan?

 I will look for System() related to dial plans.

From the Asterisk CLI type:
core show application System

It will print out the syntax for the command. One of the easier dialplan 
applications.

exten = 1234,1,System(echo This is a test  /var/log/asterisk/test.txt)

That line would use the Linux echo command to place the text This is a test 
into a file named test.txt located in the /var/log/asterisk directory.

-- 
_
-- 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] RES: RES: RES: RES: How to invoke a binary file from the dial plan?

2015-06-03 Thread Rodrigo Pimenta Carvalho
Ok Kevin.

Thank you for the information.
Now, I will try to build a prototype to see how everything works. If I have a 
new doubt, I will post it here.

Best regards.

RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979

De: asterisk-users-boun...@lists.digium.com 
[asterisk-users-boun...@lists.digium.com] em Nome de Kevin Larsen 
[kevin.lar...@pioneerballoon.com]
Enviado: quarta-feira, 3 de junho de 2015 12:26
Para: Asterisk Users Mailing List - Non-Commercial Discussion
Assunto: Re: [asterisk-users] RES: RES: RES: How to invoke a binary file from 
the dial plan?

 Hi Kevin.

 Thank you again for help me!

 In my case,  in the final application for smartphones or in a
 softphone for PCs, there will be a button on the GUI and the user
 will have just to touch it, and the door or gate will open. I mean,
 during an ongoing call, the callee will see a button in the
 interface of its SIP application. For example, we can use the lib of
 Linphone and implement a GUI over it, having a new button to open
 doors and gates. So, the callee will not have to remember about
 codes, because there will be a button in someplace to be touched.

 When the button be touched, during an ongoing call, the software
 (SIP client) will sends a request to Asterisk executes the gate =
 9,self/callee,System,insert command here , for example. So, it
 will works like the user pressing number 9.

 I will take a look at applicationmap in features.conf to understand
 what exactly can be done.

 But, let me ask you:
 This idea seems to be good to run during ongoing calls. What about
 moments when there is no ongoing call? That is, can Asterisk execute
 a dial plan (maybe by means of some kind of SIP request received
 from the SIP client) even without establishing a call?

The way I would probably approach what you want to do is that the button action 
state would be dependent on if you are in a call or not. If you are in a call, 
it sends whatever DTMF digits you want to use for this feature. If you are not 
in a call, it could dial an extension whose purpose is to do the same thing.

I have an outside number that when dialed checks that your caller id number is 
in an approved list and if it is, sends the gate open signal. This is the same 
gate open signal that the feature code uses (the call to System()), it is just 
reached by making a sip call. Nothing says a call has to connect two phones 
together. You can answer the call inside of Asterisk and do stuff based on what 
number you called or what digits the caller enters with their keypads. Lot's of 
opportunity to make the system do exactly what you want.

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

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


[asterisk-users] How to invoke a binary file from the dial plan?

2015-06-02 Thread Rodrigo Pimenta Carvalho
Hi everyone.

I'm new with Asterisk and I have to create a dial plan that will invoke a 
binary code. That is, asterisk will execute a program in the same machine. How 
to do it?

Let me explain what I have to do:

In the project that I am currently working, there is smartphones, SIP servers 
and doors/gates to be unlocked remotely. When the user executes an application 
on his/her phone, it will presents a button to unlock a remote gate or door.
By  pressing such button, the application will send a SIP INVITE to the SIP 
server (Asterisk). In this moment, a existing dial plan should call an 
executable hosted in the current machine. In this case I need to know how to 
program my extensions.conf to let Asterisk invoke another software to me.
The another software is the one responsible for unlocking a gate or door.

So, how to codify my extensions.conf in order to make Asterisk invoke another 
software?
Is another better way (idea) to implement my project using Asterisk and SIP? If 
so, comment, please!

Any hint will be very helpful!

Best regards.

RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979
-- 
_
-- 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] RES: How to invoke a binary file from the dial plan?

2015-06-02 Thread Rodrigo Pimenta Carvalho
Ok. Thanks for the hint.

But, what exactly is a System() dialplan application? Is it a kind of command 
that i can call in dial plan? 

I will look for System() related to dial plans.

Thanks.

RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979

De: asterisk-users-boun...@lists.digium.com 
[asterisk-users-boun...@lists.digium.com] em Nome de Kevin Larsen 
[kevin.lar...@pioneerballoon.com]
Enviado: terça-feira, 2 de junho de 2015 17:31
Para: Asterisk Users Mailing List - Non-Commercial Discussion
Assunto: Re: [asterisk-users] How to invoke a binary file from the dial plan?

 Hi everyone.

 I'm new with Asterisk and I have to create a dial plan that will
 invoke a binary code. That is, asterisk will execute a program in
 the same machine. How to do it?

 Let me explain what I have to do:

 In the project that I am currently working, there is smartphones,
 SIP servers and doors/gates to be unlocked remotely. When the user
 executes an application on his/her phone, it will presents a button
 to unlock a remote gate or door.
 By  pressing such button, the application will send a SIP INVITE to
 the SIP server (Asterisk). In this moment, a existing dial plan
 should call an executable hosted in the current machine. In this
 case I need to know how to program my extensions.conf to let
 Asterisk invoke another software to me.
 The another software is the one responsible for unlocking a gate or door.

 So, how to codify my extensions.conf in order to make Asterisk
 invoke another software?
 Is another better way (idea) to implement my project using Asterisk
 and SIP? If so, comment, please!

 Any hint will be very helpful!

Look into the System() dialplan application. It will execute a command on the 
system for you. Be aware that it will execute it as the user your Asterisk 
instance is running as, so permissions can sometimes be a bit finicky to get 
correct. I do something similar to pop my gate open. It is using nc to make a 
connection to the device, but same general idea as what you are doing.

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