[asterisk-users] Handoff dial control to dialplan after AMI Originate

2013-06-19 Thread Grant Bagdasarian
Hello,

I'd like to use the AMI interface to originate a call to a context in a 
dialplan, and handoff the dial control to the context.

Whenever I execute the below action, the recipient does ring, but when I answer 
it dials the recipient again. I believe this is because once answered the 
system is going to execute the Context/Exten/Prio in the Originate action?

Action: Originate
Channel: Local/outbound1@originateDialContext
CallerID: 00311234567
Context: originateDialContext
Exten: outbound1
Priority: 1
Variable: recipient=0031612345678
Timeout: 1

[originateDialContext]
exten = outbound1,1,Wait(1)
exten = outbound1,n,Set(recipient=${recipient})
exten = outbound1,n,Dial(SIP/${recipient}@originateChannel)

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

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

Re: [asterisk-users] Handoff dial control to dialplan after AMI Originate

2013-06-19 Thread Lenz Emilitri
Looks correct to me


2013/6/19 Grant Bagdasarian g...@cm.nl

 Hello,

 ** **

 I’d like to use the AMI interface to originate a call to a context in a
 dialplan, and handoff the dial control to the context.

 ** **

 Whenever I execute the below action, the recipient does ring, but when I
 answer it dials the recipient again. I believe this is because once
 answered the system is going to execute the Context/Exten/Prio in the
 Originate action?

 ** **

 Action: Originate

 Channel: Local/outbound1@originateDialContext

 CallerID: 00311234567

 Context: originateDialContext

 Exten: outbound1

 Priority: 1

 Variable: recipient=0031612345678

 Timeout: 1

 ** **

 [originateDialContext]

 exten = outbound1,1,Wait(1)

 exten = outbound1,n,Set(recipient=${recipient})

 exten = outbound1,n,Dial(SIP/${recipient}@originateChannel)

 ** **

 Anyone have an idea how to fix this?

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

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




-- 
Loway - home of QueueMetrics - http://queuemetrics.com
Test-drive WombatDialer beta @ http://wombatdialer.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

Re: [asterisk-users] Handoff dial control to dialplan after AMI Originate

2013-06-19 Thread Grant Bagdasarian
I fixed it. The problem is just as I assumed; once the call is answered the 
dialplan goes into what’s defined in Context/Exten/Prio of the Originate action.

I changed the Context/Exten/Prio in the action and pointed it to something 
else. Now it works.

Action: Originate
Channel: Local/outbound1@originateDialContext
CallerID: 00311234567
Context: originateDialProcessor
Exten: outbound1
Priority: 1
Variable: recipient=0031612345678
Timeout: 1

[originateDialContext]
exten = outbound1,1,Wait(1)
exten = outbound1,n,Set(recipient=${recipient})
exten = outbound1,n,Dial(SIP/${recipient}@originateChannel)

[originateDialProcessor]
exten = outbound1,1,Wait(1)
exten = outbound1,n,NoOp(${DIALSTATUS})
exten = outbound1,n,Hangup

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Lenz Emilitri
Sent: Wednesday, June 19, 2013 10:10 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Handoff dial control to dialplan after AMI 
Originate

Looks correct to me

2013/6/19 Grant Bagdasarian g...@cm.nlmailto:g...@cm.nl
Hello,

I’d like to use the AMI interface to originate a call to a context in a 
dialplan, and handoff the dial control to the context.

Whenever I execute the below action, the recipient does ring, but when I answer 
it dials the recipient again. I believe this is because once answered the 
system is going to execute the Context/Exten/Prio in the Originate action?

Action: Originate
Channel: Local/outbound1@originateDialContext
CallerID: 00311234567
Context: originateDialContext
Exten: outbound1
Priority: 1
Variable: recipient=0031612345678
Timeout: 1

[originateDialContext]
exten = outbound1,1,Wait(1)
exten = outbound1,n,Set(recipient=${recipient})
exten = outbound1,n,Dial(SIP/${recipient}@originateChannel)

Anyone have an idea how to fix this?

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

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



--
Loway - home of QueueMetrics - http://queuemetrics.com
Test-drive WombatDialer beta @ http://wombatdialer.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

Re: [asterisk-users] Handoff dial control to dialplan after AMI Originate

2013-06-19 Thread Grant Bagdasarian
Why can’t I execute any more dialplan after the Dial application? The scenario 
is when the Dial application dials the recipient but the recipient doesn’t 
answer. The AMI will never go into the originateDialProcessor because the call 
was never answered. So I expect the Dialplan to continue after the Dial 
application has reached its timeout.

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Grant Bagdasarian
Sent: Wednesday, June 19, 2013 11:24 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Handoff dial control to dialplan after AMI 
Originate

I fixed it. The problem is just as I assumed; once the call is answered the 
dialplan goes into what’s defined in Context/Exten/Prio of the Originate action.

I changed the Context/Exten/Prio in the action and pointed it to something 
else. Now it works.

Action: Originate
Channel: Local/outbound1@originateDialContext
CallerID: 00311234567
Context: originateDialProcessor
Exten: outbound1
Priority: 1
Variable: recipient=0031612345678
Timeout: 1

[originateDialContext]
exten = outbound1,1,Wait(1)
exten = outbound1,n,Set(recipient=${recipient})
exten = outbound1,n,Dial(SIP/${recipient}@originateChannel)

[originateDialProcessor]
exten = outbound1,1,Wait(1)
exten = outbound1,n,NoOp(${DIALSTATUS})
exten = outbound1,n,Hangup

From: 
asterisk-users-boun...@lists.digium.commailto:asterisk-users-boun...@lists.digium.com
 [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Lenz Emilitri
Sent: Wednesday, June 19, 2013 10:10 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Handoff dial control to dialplan after AMI 
Originate

Looks correct to me

2013/6/19 Grant Bagdasarian g...@cm.nlmailto:g...@cm.nl
Hello,

I’d like to use the AMI interface to originate a call to a context in a 
dialplan, and handoff the dial control to the context.

Whenever I execute the below action, the recipient does ring, but when I answer 
it dials the recipient again. I believe this is because once answered the 
system is going to execute the Context/Exten/Prio in the Originate action?

Action: Originate
Channel: Local/outbound1@originateDialContext
CallerID: 00311234567
Context: originateDialContext
Exten: outbound1
Priority: 1
Variable: recipient=0031612345678
Timeout: 1

[originateDialContext]
exten = outbound1,1,Wait(1)
exten = outbound1,n,Set(recipient=${recipient})
exten = outbound1,n,Dial(SIP/${recipient}@originateChannel)

Anyone have an idea how to fix this?

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

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



--
Loway - home of QueueMetrics - http://queuemetrics.com
Test-drive WombatDialer beta @ http://wombatdialer.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

Re: [asterisk-users] Handoff dial control to dialplan after AMI Originate

2013-06-19 Thread jg

Did you specify a timeout value?

jg

--
_
-- 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] Handoff dial control to dialplan after AMI Originate

2013-06-19 Thread Satish Barot
On Wed, Jun 19, 2013 at 4:00 PM, Grant Bagdasarian g...@cm.nl wrote:

 Why can’t I execute any more dialplan after the Dial application? The
 scenario is when the Dial application dials the recipient but the recipient
 doesn’t answer. The AMI will never go into the originateDialProcessor
 because the call was never answered. So I expect the Dialplan to continue
 after the Dial application has reached its timeout.

 ** **

 *From:* asterisk-users-boun...@lists.digium.com [mailto:
 asterisk-users-boun...@lists.digium.com] *On Behalf Of *Grant Bagdasarian
 *Sent:* Wednesday, June 19, 2013 11:24 AM

 *To:* Asterisk Users Mailing List - Non-Commercial Discussion
 *Subject:* Re: [asterisk-users] Handoff dial control to dialplan after
 AMI Originate

 ** **

 I fixed it. The problem is just as I assumed; once the call is answered
 the dialplan goes into what’s defined in Context/Exten/Prio of the
 Originate action.

 ** **

 I changed the Context/Exten/Prio in the action and pointed it to something
 else. Now it works.

 ** **

 Action: Originate

 Channel: Local/outbound1@originateDialContext

 CallerID: 00311234567

 Context: originateDialProcessor

 Exten: outbound1

 Priority: 1

 Variable: recipient=0031612345678

 Timeout: 1

 ** **

 [originateDialContext]

 exten = outbound1,1,Wait(1)

 exten = outbound1,n,Set(recipient=${recipient})

 exten = outbound1,n,Dial(SIP/${recipient}@originateChannel)

 ** **

 [originateDialProcessor]

 exten = outbound1,1,Wait(1)

 exten = outbound1,n,NoOp(${DIALSTATUS})

 exten = outbound1,n,Hangup

 ** **

 *From:* asterisk-users-boun...@lists.digium.com [
 mailto:asterisk-users-boun...@lists.digium.comasterisk-users-boun...@lists.digium.com]
 *On Behalf Of *Lenz Emilitri
 *Sent:* Wednesday, June 19, 2013 10:10 AM
 *To:* Asterisk Users Mailing List - Non-Commercial Discussion
 *Subject:* Re: [asterisk-users] Handoff dial control to dialplan after
 AMI Originate

 ** **

 Looks correct to me

 ** **

 2013/6/19 Grant Bagdasarian g...@cm.nl

 Hello,

  

 I’d like to use the AMI interface to originate a call to a context in a
 dialplan, and handoff the dial control to the context.

  

 Whenever I execute the below action, the recipient does ring, but when I
 answer it dials the recipient again. I believe this is because once
 answered the system is going to execute the Context/Exten/Prio in the
 Originate action?

  

 Action: Originate

 Channel: Local/outbound1@originateDialContext

 CallerID: 00311234567

 Context: originateDialContext

 Exten: outbound1

 Priority: 1

 Variable: recipient=0031612345678

 Timeout: 1

  

 [originateDialContext]

 exten = outbound1,1,Wait(1)

 exten = outbound1,n,Set(recipient=${recipient})

 exten = outbound1,n,Dial(SIP/${recipient}@originateChannel)

  

 Anyone have an idea how to fix this?


 --


You need a special extension 'failed' in a context originateDialProcessor
to catch the control when call doesn't get answered in first leg.

[originateDialProcessor]

exten = outbound1,1,Wait(1)

exten = outbound1,n,NoOp(${DIALSTATUS})
exten = outbound1,n,Hangup

exten = failed,1,NoOp(- CALL DIDN'T GET ANSWERED IN FIRST LEG -)

--Satish Barot
--
_
-- 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] Handoff dial control to dialplan after AMI Originate

2013-06-19 Thread Grant Bagdasarian
I used a combination of failed and the h extension to get the dialplan to do 
what I want.

Thanks for the help guys!

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Satish Barot
Sent: Wednesday, June 19, 2013 1:25 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Handoff dial control to dialplan after AMI 
Originate


On Wed, Jun 19, 2013 at 4:00 PM, Grant Bagdasarian 
g...@cm.nlmailto:g...@cm.nl wrote:
Why can't I execute any more dialplan after the Dial application? The scenario 
is when the Dial application dials the recipient but the recipient doesn't 
answer. The AMI will never go into the originateDialProcessor because the call 
was never answered. So I expect the Dialplan to continue after the Dial 
application has reached its timeout.

From: 
asterisk-users-boun...@lists.digium.commailto:asterisk-users-boun...@lists.digium.com
 
[mailto:asterisk-users-boun...@lists.digium.commailto:asterisk-users-boun...@lists.digium.com]
 On Behalf Of Grant Bagdasarian
Sent: Wednesday, June 19, 2013 11:24 AM

To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Handoff dial control to dialplan after AMI 
Originate

I fixed it. The problem is just as I assumed; once the call is answered the 
dialplan goes into what's defined in Context/Exten/Prio of the Originate action.

I changed the Context/Exten/Prio in the action and pointed it to something 
else. Now it works.

Action: Originate
Channel: Local/outbound1@originateDialContext
CallerID: 00311234567
Context: originateDialProcessor
Exten: outbound1
Priority: 1
Variable: recipient=0031612345678
Timeout: 1

[originateDialContext]
exten = outbound1,1,Wait(1)
exten = outbound1,n,Set(recipient=${recipient})
exten = outbound1,n,Dial(SIP/${recipient}@originateChannel)

[originateDialProcessor]
exten = outbound1,1,Wait(1)
exten = outbound1,n,NoOp(${DIALSTATUS})
exten = outbound1,n,Hangup

From: 
asterisk-users-boun...@lists.digium.commailto:asterisk-users-boun...@lists.digium.com
 [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Lenz Emilitri
Sent: Wednesday, June 19, 2013 10:10 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Handoff dial control to dialplan after AMI 
Originate

Looks correct to me

2013/6/19 Grant Bagdasarian g...@cm.nlmailto:g...@cm.nl
Hello,

I'd like to use the AMI interface to originate a call to a context in a 
dialplan, and handoff the dial control to the context.

Whenever I execute the below action, the recipient does ring, but when I answer 
it dials the recipient again. I believe this is because once answered the 
system is going to execute the Context/Exten/Prio in the Originate action?

Action: Originate
Channel: Local/outbound1@originateDialContext
CallerID: 00311234567
Context: originateDialContext
Exten: outbound1
Priority: 1
Variable: recipient=0031612345678
Timeout: 1

[originateDialContext]
exten = outbound1,1,Wait(1)
exten = outbound1,n,Set(recipient=${recipient})
exten = outbound1,n,Dial(SIP/${recipient}@originateChannel)

Anyone have an idea how to fix this?

--

You need a special extension 'failed' in a context originateDialProcessor to 
catch the control when call doesn't get answered in first leg.
[originateDialProcessor]
exten = outbound1,1,Wait(1)
exten = outbound1,n,NoOp(${DIALSTATUS})
exten = outbound1,n,Hangup

exten = failed,1,NoOp(- CALL DIDN'T GET ANSWERED IN FIRST LEG -)
--Satish Barot
--
_
-- 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] Queue Limit Callers

2013-06-19 Thread Shanavaz E A

Thanks all for the inputs... Let me work on it and come back again with some 
results...






 From: Ioan Indreias indre...@gmail.com
To: Asterisk Users Mailing List - Non-Commercial Discussion 
asterisk-users@lists.digium.com 
Sent: Tuesday, June 18, 2013 1:43 PM
Subject: Re: [asterisk-users] Queue Limit Callers
 


Hello Shanavaz.,



Please find some quick thoughts:

* 2 main queues
* agents logged on one or on both main queues
* before sending a new call to one of the main queues check the number of 
waiting callers (QUEUE_WAITING_COUNT function) and divert (for example for 30 
sec) the call on a empty members queue/parking slot/music-on-hold if the queue 
threshold is reached.

The threshold could be read from a database, internal astdb or could be set as 
a global variable updated when agents login/logout/pause/unpause or could be 
dynamically computed based on QUEUE_MEMBER_COUNT / QUEUE_MEMBER_LIST

After the divert period is ended the call will return and the threshold is 
checked again, etc.

This method have some negative impacts (the entry position number for calls 
over the threshold //origposition// will have no meaning, a newer call could be 
served before an older one, etc.) but you could manipulate the call flow 
exactly how you want.

HTH,
Ioan
http://www.modulo.ro


On Tue, Jun 18, 2013 at 12:05 PM, Lenz Emilitri lenz.lo...@gmail.com wrote:

You should have different sets of agents logged in to different queues and you 
should have a monitor to move them from one queue to the other based on 
incoming traffic.

l.



2013/6/17 Shanavaz E A shanava...@yahoo.com

Hi,


I have a requirement, which I am not sure whether it can be implemented. I 
had done some searches but didnt find an answer to this. Kindly let me know 
if some one has an idea to implement this:


I have two Queues - Sales  Booking
I have 12 Agents who are added to both the queues



Suppose there are 12 calls in the Booking Queue, and 6 calls in the Sales 
Queue.


Only 8 calls in the Booking Queue should hit the Agents and the other 4 calls 
should remain in hold.
4 calls in the Sales Queue should hit the other 4 agents and the other 2 call 
should be in hold.


Means at a time a maximum of 8 Booking calls only should hit the agents and 4 
Sales Calls only should hit the agents.


If number of logged in agents are less, proportionally the number of call 
limit should be reduced. For example, if there are only 10 agents, 7 Booking 
Calls should hit and 3 Sales calls should hit. The idea is that all agents 
should be able to answer calls in both queues in rotation. Otherwise its 
possible to add some agents to booking queue and other agents to sales queue. 
But thats not what is required.



Kindly help if there is some idea to implement this.


RegardsShanavaz.

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



-- 

Loway - home of QueueMetrics - http://queuemetrics.com

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

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


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

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users--
_
-- 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] Handoff dial control to dialplan after AMI Originate

2013-06-19 Thread Muhammad Faheem
Your both channels legs are identical strings. It should be like this.

Action: Originate

Channel: Local/outbound1@originateDialContext

CallerID: 00311234567

Context: originateDialContext2

Exten: outbound1

Priority: 1

Variable: recipient=0031612345678,callerid1=00311234567

Timeout: 1

** **

[originateDialContext]

exten = outbound1,1,Wait(1)

exten = outbound1,n,Set(recipient=${recipient})

exten = outbound1,n,Dial(SIP/${recipient}@originateChannel)

[originateDialContext2]

exten = outbound1,1,Wait(1)

exten = outbound1,n,Dial(SIP/${callerid1}@originateChannel)



On Wed, Jun 19, 2013 at 11:20 AM, Grant Bagdasarian g...@cm.nl wrote:

 Hello,

 ** **

 I’d like to use the AMI interface to originate a call to a context in a
 dialplan, and handoff the dial control to the context.

 ** **

 Whenever I execute the below action, the recipient does ring, but when I
 answer it dials the recipient again. I believe this is because once
 answered the system is going to execute the Context/Exten/Prio in the
 Originate action?

 ** **

 Action: Originate

 Channel: Local/outbound1@originateDialContext

 CallerID: 00311234567

 Context: originateDialContext

 Exten: outbound1

 Priority: 1

 Variable: recipient=0031612345678

 Timeout: 1

 ** **

 [originateDialContext]

 exten = outbound1,1,Wait(1)

 exten = outbound1,n,Set(recipient=${recipient})

 exten = outbound1,n,Dial(SIP/${recipient}@originateChannel)

 ** **

 Anyone have an idea how to fix this?

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

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

--
_
-- 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] SIP Simple support on Asterisk 11

2013-06-19 Thread Eloi Bail
Hi all,


I am trying to enable SIP SIMPLE communication in my test environment.

I have the following env :

- one server (192.168.50.126) with Asterisk 11
- 2 clients using pidgin : demo-bob and demo-alice on my 192.168.50.143

I successfully had a phone call between clients.

I used the following link to enable SIMPLE messaging between my clients :
http://highsecurity.blogspot.ca/2012/03/asterisk-10-110-sms-messaging-or-sip.html

Both users managed to register.

Adding verbose on the server, I have the following traces when I send the
message MESSAGE FROM ALICE TO BOB from demo-alice to demo-bob

http://paste.fedoraproject.org/19489/37158861/

As you can see I succeed to have the message sent from alice to Asterisk.

When the server is trying to transmitting, I see a 401 error message.
According to this post (http://forums.digium.com/viewtopic.php?f=1t=72814)
the first 401 should be normal as authentication is requested.

Afterwards the server emit 202 message.

But demo-bob never receives a message.
I ran wireshark on server and client. It confirms that no message is sent
from Asterisk to demo-bob.

Could you please give me advice ?


Here are my extensions.conf and sip.conf according to the link I mentioned.
http://paste.fedoraproject.org/19626/16493741/
http://paste.fedoraproject.org/19627/49423137/


Thanks a lot,

Eloi
--
_
-- 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] PCI Passthrough of T1 cards

2013-06-19 Thread James Sharp

On Jun 16, 2013, at 4:27 PM, Nick Khamis sym...@gmail.com wrote:

 Anyone try this? I saw a post here:
 
 http://www.elastix.org/index.php/en/component/kunena/1-installation-issues/94041-setup-of-sangoma-a101-in-my-elastix.html
 
 But not sure if it's possible. What I am asking is if there are any T1
 cards with virtual functions implemented in their drivers to allow
 pci-passthrough?

PCI pass through is a function of the virtual machine's host system, not with 
the t1 card drivers. 
--
_
-- 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] PCI Passthrough of T1 cards

2013-06-19 Thread Nick Khamis
Hello James,

Thank you so much for your response. I should have chose my words
carefully. PCI pass-through in terms of virtualization of devices and
it's draw back are well know. I was leaning more towards near host
performance virtualization using SR-IOV.

This moves emphasis back to the production drivers of the interface
card using virtual functions etc., and can provide near host
performance. Rephrasing my question, are any of the T1 pci
manufactures providing support for virtualization using SR-IOV and
virutal functions?

Kind Regards,

Nick

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

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


Re: [asterisk-users] SIP Simple support on Asterisk 11

2013-06-19 Thread Matthew J. Roth
Eloi Bail wrote:

 I am trying to enable SIP SIMPLE communication in my test environment.

 I have the following env :

 - one server (192.168.50.126) with Asterisk 11
 - 2 clients using pidgin : demo-bob and demo-alice on my 192.168.50.143

 I successfully had a phone call between clients.

 I used the following link to enable SIMPLE messaging between my clients :
 http://highsecurity.blogspot.ca/2012/03/asterisk-10-110-sms-messaging-or-sip.html

 Both users managed to register.

 Adding verbose on the server, I have the following traces when I send the
 message MESSAGE FROM ALICE TO BOB from demo-alice to demo-bob

 http://paste.fedoraproject.org/19489/37158861/

 As you can see I succeed to have the message sent from alice to Asterisk.

 When the server is trying to transmitting, I see a 401 error message.
 According to this post ( http://forums.digium.com/viewtopic.php?f=1t=72814 )
 the first 401 should be normal as authentication is requested.

 Afterwards the server emit 202 message.

 But demo-bob never receives a message.
 I ran wireshark on server and client. It confirms that no message is sent from
 Asterisk to demo-bob.

 Could you please give me advice ?

 Here are my extensions.conf and sip.conf according to the link I mentioned.
 http://paste.fedoraproject.org/19626/16493741/

 http://paste.fedoraproject.org/19627/49423137/


Eloi,

The trace shows that the initial MESSAGE from Alice does not include an
Authorization header so Asterisk responds with a 401 Unauthorized.  Alice then
replies with a MESSAGE with an Authorization header, but reuses the same CSeq
header (CSeq: 6 MESSAGE) which causes Asterisk to ignore it as a retransmit:

 [Jun 18 16:49:35] DEBUG[16266] chan_sip.c: Ignoring SIP message because of
 retransmit (MESSAGE Seqno 6, ours 6)

I believe this is a bug in Pidgin because RFC 3261 [1] states:

   CSeq or Command Sequence contains an integer and a method name.  The
   CSeq number is incremented for each new request within a dialog and
   is a traditional sequence number.
   ...
   Requests within a dialog MUST contain strictly monotonically
   increasing and contiguous CSeq sequence numbers (increasing-by-one)
   in each direction (excepting ACK and CANCEL of course, whose numbers
   equal the requests being acknowledged or cancelled).

However, there is also a similar issue [2] that can be worked around by setting
pedantic=no in sip.conf.  If that doesn't work, you can give the following
(untested) patch to chan_sip.c a try:


--- chan_sip.c.orig 2013-06-19 11:44:38.0 -0400
+++ chan_sip.c  2013-06-19 11:47:22.0 -0400
@@ -28078,6 +28078,7 @@
} else if (p-icseq 
   p-icseq == seqno 
   req-method != SIP_ACK 
+  p-method != SIP_MESSAGE 
   (p-method != SIP_CANCEL || p-alreadygone)) {
/* ignore means don't do anything with it but still have to
   respond appropriately.  We do this if we receive a repeat of


Good luck and please let the list know how this works out.

[1] http://www.ietf.org/rfc/rfc3261.txt
[2] https://issues.asterisk.org/jira/browse/ASTERISK-19139

Regards,

Matthew Roth
InterMedia Marketing Solutions
Software Engineer and Systems Developer

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

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


Re: [asterisk-users] SIP Simple support on Asterisk 11

2013-06-19 Thread Anthony Messina
On Wednesday, June 19, 2013 11:11:17 AM Matthew J. Roth wrote:
 Eloi Bail wrote:
  I am trying to enable SIP SIMPLE communication in my test environment.

I use the following which semi-enables message broadcasting to multiple 
devices so a user who receives a message can reply from any of the devices.

http://messinet.com/trac/wiki/Asterisk/Message

-A

-- 
Anthony - http://messinet.com - http://messinet.com/~amessina/gallery
8F89 5E72 8DF0 BCF0 10BE 9967 92DC 35DC B001 4A4E


signature.asc
Description: This is a digitally signed message part.
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] SIP Simple support on Asterisk 11

2013-06-19 Thread Eloi Bail
Hi,

Thanks a lot for this detailed answer :

- I managed to have it working disabling auth message request
: auth_message_requests = no in sip.conf
- pedantic=no does not resolve the issue
- reenabling  auth_message_requests = yes and removing pedantic option,
your patch in chan_sip resolves the issues !

As it looks like pidgin has an issue, I guess that we can use it as a
workaround.

I would like know to enable presence notification between each users. To
fulfill it, I am using
http://asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/DeviceStates_id265377.html

Am I doing it in a good way ?

Thanks !

Eloi


On Wed, Jun 19, 2013 at 12:11 PM, Matthew J. Roth mr...@imminc.com wrote:

 Eloi Bail wrote:
 
  I am trying to enable SIP SIMPLE communication in my test environment.
 
  I have the following env :
 
  - one server (192.168.50.126) with Asterisk 11
  - 2 clients using pidgin : demo-bob and demo-alice on my 192.168.50.143
 
  I successfully had a phone call between clients.
 
  I used the following link to enable SIMPLE messaging between my clients :
 
 http://highsecurity.blogspot.ca/2012/03/asterisk-10-110-sms-messaging-or-sip.html
 
  Both users managed to register.
 
  Adding verbose on the server, I have the following traces when I send the
  message MESSAGE FROM ALICE TO BOB from demo-alice to demo-bob
 
  http://paste.fedoraproject.org/19489/37158861/
 
  As you can see I succeed to have the message sent from alice to Asterisk.
 
  When the server is trying to transmitting, I see a 401 error message.
  According to this post (
 http://forums.digium.com/viewtopic.php?f=1t=72814 )
  the first 401 should be normal as authentication is requested.
 
  Afterwards the server emit 202 message.
 
  But demo-bob never receives a message.
  I ran wireshark on server and client. It confirms that no message is
 sent from
  Asterisk to demo-bob.
 
  Could you please give me advice ?
 
  Here are my extensions.conf and sip.conf according to the link I
 mentioned.
  http://paste.fedoraproject.org/19626/16493741/
 
  http://paste.fedoraproject.org/19627/49423137/


 Eloi,

 The trace shows that the initial MESSAGE from Alice does not include an
 Authorization header so Asterisk responds with a 401 Unauthorized.  Alice
 then
 replies with a MESSAGE with an Authorization header, but reuses the same
 CSeq
 header (CSeq: 6 MESSAGE) which causes Asterisk to ignore it as a
 retransmit:

  [Jun 18 16:49:35] DEBUG[16266] chan_sip.c: Ignoring SIP message because
 of
  retransmit (MESSAGE Seqno 6, ours 6)

 I believe this is a bug in Pidgin because RFC 3261 [1] states:

CSeq or Command Sequence contains an integer and a method name.  The
CSeq number is incremented for each new request within a dialog and
is a traditional sequence number.
...
Requests within a dialog MUST contain strictly monotonically
increasing and contiguous CSeq sequence numbers (increasing-by-one)
in each direction (excepting ACK and CANCEL of course, whose numbers
equal the requests being acknowledged or cancelled).

 However, there is also a similar issue [2] that can be worked around by
 setting
 pedantic=no in sip.conf.  If that doesn't work, you can give the
 following
 (untested) patch to chan_sip.c a try:


 
 --- chan_sip.c.orig 2013-06-19 11:44:38.0 -0400
 +++ chan_sip.c  2013-06-19 11:47:22.0 -0400
 @@ -28078,6 +28078,7 @@
 } else if (p-icseq 
p-icseq == seqno 
req-method != SIP_ACK 
 +  p-method != SIP_MESSAGE 
(p-method != SIP_CANCEL || p-alreadygone)) {
 /* ignore means don't do anything with it but still have
 to
respond appropriately.  We do this if we receive a
 repeat of

 

 Good luck and please let the list know how this works out.

 [1] http://www.ietf.org/rfc/rfc3261.txt
 [2] https://issues.asterisk.org/jira/browse/ASTERISK-19139

 Regards,

 Matthew Roth
 InterMedia Marketing Solutions
 Software Engineer and Systems Developer

 --
 _
 -- 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] Mailing a fax with mutt does not succeed

2013-06-19 Thread Daniel - Asterisk
Hello everyone,

I'm trying to send a received fax with mutt, when I try it from the Linux
shel it works, but when trying with Asterisk's System command it doesn't.

Successful Linux command:
echo | mutt -s New fax earohua...@gmail.com -a /tmp/faxes/20130619.tif

Unsuccessful Asterisk Command:
same = n,System(mutt -s New fax elder.arohua...@gmail.com -a
${FAXDEST}/${tempfax}.tif)

I'm using Asterisk 1.8.19.0 on Debian 6.0.6, Asterisk was installed by root.

Any hint will be appreciated.

Elder D. Arohuanca
Lima - Peru
--
_
-- 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] Mailing a fax with mutt does not succeed

2013-06-19 Thread Andre Courchesne
Probably Asterisk does not know where mutt is, specify it's path in your System 
command.

On 2013-06-19, at 2:03 PM, Daniel - Asterisk earohua...@gmail.com wrote:

 Hello everyone,
  
 I'm trying to send a received fax with mutt, when I try it from the Linux 
 shel it works, but when trying with Asterisk's System command it doesn't.
  
 Successful Linux command:
 echo | mutt -s New fax earohua...@gmail.com -a /tmp/faxes/20130619.tif
  
 Unsuccessful Asterisk Command:
 same = n,System(mutt -s New fax elder.arohua...@gmail.com -a 
 ${FAXDEST}/${tempfax}.tif)
  
 I'm using Asterisk 1.8.19.0 on Debian 6.0.6, Asterisk was installed by root.
  
 Any hint will be appreciated.
  
 Elder D. Arohuanca
 Lima - Peru
 --
 _
 -- 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] Mailing a fax with mutt does not succeed

2013-06-19 Thread Steve Edwards

On Wed, 19 Jun 2013, Daniel - Asterisk wrote:

I'm trying to send a received fax with mutt, when I try it from the 
Linux shel it works, but when trying with Asterisk's System command it 
doesn't.


Successful Linux command:
echo | mutt -s New fax earohua...@gmail.com -a /tmp/faxes/20130619.tif

Unsuccessful Asterisk Command:
same = n,System(mutt -s New fax elder.arohua...@gmail.com -a 
${FAXDEST}/${tempfax}.tif)


1) Doesn't mutt expect the body on stdin? (Where's the 'echo' in the 
Asterisk command?)


2) Is Asterisk executing as root? Does the Asterisk user ID have read 
access to the TIFF?


3) If you use 'verbose()' instead of 'system()' does the command look like 
your shell command?


4) Is mutt in the Asterisk user ID's path?

5) If you redirect the output in the system() command to a file, does that 
yield any clues? I.e., system(foo /tmp/clue 21)


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000

--
_
-- 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] Mailing a fax with mutt does not succeed

2013-06-19 Thread Daniel - Asterisk
Hi Andre,

I've tried with:
System(echo | /usr/bin/mutt -s New fax earohua...@gmail.com -a
${FAXDEST}/${tempfax})

with no success, value of SYSTEMSTATUS variable is APPERROR

Again it works from Linux shell.

Thanks in advance

Elder


On Wed, Jun 19, 2013 at 1:08 PM, Andre Courchesne voipfor...@gmail.comwrote:

 Probably Asterisk does not know where mutt is, specify it's path in your
 System command.

 On 2013-06-19, at 2:03 PM, Daniel - Asterisk earohua...@gmail.com wrote:

 Hello everyone,

 I'm trying to send a received fax with mutt, when I try it from the Linux
 shel it works, but when trying with Asterisk's System command it doesn't.

 Successful Linux command:
 echo | mutt -s New fax earohua...@gmail.com -a
 /tmp/faxes/20130619.tif

 Unsuccessful Asterisk Command:
 same = n,System(mutt -s New fax elder.arohua...@gmail.com -a
 ${FAXDEST}/${tempfax}.tif)

 I'm using Asterisk 1.8.19.0 on Debian 6.0.6, Asterisk was installed by
 root.

 Any hint will be appreciated.

 Elder D. Arohuanca
 Lima - Peru
 --
 _
 -- 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] Mailing a fax with mutt does not succeed

2013-06-19 Thread Andre Courchesne
Why echo | ?

Alsy are you sire of the content of ${FAXDEST} and ${tempfax}.

Add some NoOp before.


On 2013-06-19, at 2:29 PM, Daniel - Asterisk earohua...@gmail.com wrote:

 Hi Andre,
  
 I've tried with:
 System(echo | /usr/bin/mutt -s New fax earohua...@gmail.com -a 
 ${FAXDEST}/${tempfax})
  
 with no success, value of SYSTEMSTATUS variable is APPERROR
  
 Again it works from Linux shell.
  
 Thanks in advance
  
 Elder
 
 
 On Wed, Jun 19, 2013 at 1:08 PM, Andre Courchesne voipfor...@gmail.com 
 wrote:
 Probably Asterisk does not know where mutt is, specify it's path in your 
 System command.
 
 On 2013-06-19, at 2:03 PM, Daniel - Asterisk earohua...@gmail.com wrote:
 
 Hello everyone,
  
 I'm trying to send a received fax with mutt, when I try it from the Linux 
 shel it works, but when trying with Asterisk's System command it doesn't.
  
 Successful Linux command:
 echo | mutt -s New fax earohua...@gmail.com -a /tmp/faxes/20130619.tif
  
 Unsuccessful Asterisk Command:
 same = n,System(mutt -s New fax elder.arohua...@gmail.com -a 
 ${FAXDEST}/${tempfax}.tif)
  
 I'm using Asterisk 1.8.19.0 on Debian 6.0.6, Asterisk was installed by root.
  
 Any hint will be appreciated.
  
 Elder D. Arohuanca
 Lima - Peru
 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
 
 
 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
 
 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

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

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

Re: [asterisk-users] Mailing a fax with mutt does not succeed

2013-06-19 Thread Daniel - Asterisk
Hi Andre:

I added echo to provide STDIN, I'm sure on variable contents, please see
bellow


Hello Steve,

1. I've just addd echo at my sentence, please see output bellow.
2. Asterisk is executing as root, I think Asterisk has access to read TIF
files since I've used ls, chmod, cp  mv from Asterisk's CLI with '!'
character.
3. I don't get you, please give some advice to try using Verbose instead
System
4. I don't know how to get this, but I'm using /usr/bin/mutt as you can see
bellow.
5. I have redirected output of System this way : System(echo |
/usr/bin/mutt -s New fax earohua...@gmail.com -a ${FAXDEST}/${tempfax} 
/tmp/ocurrencies.txt 21), ocurrencies.txt is empty.


DIALPLAN:
[ Context 'default' created by 'pbx_config' ]
  '*95' =  1. NoOp(trying to send a fax to an email)
2. Set(FAXDEST=/tmp/faxes)
3. Set(tempfax=${SHELL(ls /tmp/faxes/*.tif):11})
4. NoOp(file name is: ${tempfax})
5. Goto(incoming-fax,fax,7)

[ Context 'incoming-fax' created by 'pbx_config' ]
  'fax' =  1. Verbose(3,Incoming fax)
  ...
5. ReceiveFax(${FAXDEST}/${tempfax})
6. Verbose(3,- Fax receipt completed with status:
${FAXSTATUS})
7. System(echo | /usr/bin/mutt -s New fax
earohua...@gmail.com -a ${FAXDEST}/${tempfax})
8. NoOp(System command status is: ${SYSTEMSTATUS})
9. Hangup()

ASTERISK CLI OUTPUT:
-- Goto (default,*95,1)
-- Executing [*95@default:1] NoOp(SIP/40106-1ea1, trying to send
a fax to an email) in new stack
-- Executing [*95@default:2] Set(SIP/40106-1ea1,
FAXDEST=/tmp/faxes) in new stack
-- Executing [*95@default:3] Set(SIP/40106-1ea1,
tempfax=20130619.tif) in new stack
-- Executing [*95@default:4] NoOp(SIP/40106-1ea1, file name is:
20130619.tif) in new stack
-- Executing [*95@default:5] Goto(SIP/40106-1ea1,
incoming-fax,fax,7) in new stack
-- Goto (incoming-fax,fax,7)
-- Executing [fax@incoming-fax:7] System(SIP/40106-1ea1, echo |
/usr/bin/mutt -s New fax earohua...@gmail.com -a
/tmp/faxes/20130619.tif) in new stack
-- Executing [fax@incoming-fax:8] NoOp(SIP/40106-1ea1, System
command status is: APPERROR) in new stack
-- Executing [fax@incoming-fax:9] Hangup(SIP/40106-1ea1, ) in
new stack


Elder D. Arohuanca
Lima - Peru


On Wed, Jun 19, 2013 at 1:38 PM, Andre Courchesne voipfor...@gmail.comwrote:

 Why echo | ?

 Alsy are you sire of the content of ${FAXDEST} and ${tempfax}.

 Add some NoOp before.


 On 2013-06-19, at 2:29 PM, Daniel - Asterisk earohua...@gmail.com wrote:

 Hi Andre,

 I've tried with:
 System(echo | /usr/bin/mutt -s New fax earohua...@gmail.com -a
 ${FAXDEST}/${tempfax})

 with no success, value of SYSTEMSTATUS variable is APPERROR

 Again it works from Linux shell.

 Thanks in advance

 Elder


 On Wed, Jun 19, 2013 at 1:08 PM, Andre Courchesne voipfor...@gmail.comwrote:

 Probably Asterisk does not know where mutt is, specify it's path in your
 System command.

 On 2013-06-19, at 2:03 PM, Daniel - Asterisk earohua...@gmail.com
 wrote:

 Hello everyone,

 I'm trying to send a received fax with mutt, when I try it from the Linux
 shel it works, but when trying with Asterisk's System command it doesn't.

 Successful Linux command:
 echo | mutt -s New fax earohua...@gmail.com -a
 /tmp/faxes/20130619.tif

 Unsuccessful Asterisk Command:
 same = n,System(mutt -s New fax elder.arohua...@gmail.com -a
 ${FAXDEST}/${tempfax}.tif)

 I'm using Asterisk 1.8.19.0 on Debian 6.0.6, Asterisk was installed by
 root.

 Any hint will be appreciated.

 Elder D. Arohuanca
 Lima - Peru
 --
 _
 -- 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] Mailing a fax with mutt does not succeed

2013-06-19 Thread jg

More things to try:

(1) Is there any entry in /var/log/maillog (or equivalent log file)? If so, mutt basically works 
and the messages should give some clues.

(2) What happens if you call mutt without any attachments?

I am using mutt in exactly the same way and it works.

jg

Am 19.06.2013 21:50, schrieb Daniel - Asterisk:

Hi Andre:
I added echo to provide STDIN, I'm sure on variable contents, please see bellow
Hello Steve,
1. I've just addd echo at my sentence, please see output bellow.
2. Asterisk is executing as root, I think Asterisk has access to read TIF files since I've 
used ls, chmod, cp  mv from Asterisk's CLI with '!' character.

3. I don't get you, please give some advice to try using Verbose instead System
4. I don't know how to get this, but I'm using /usr/bin/mutt as you can see 
bellow.
5. I have redirected output of System this way : System(echo | /usr/bin/mutt -s New fax 
earohua...@gmail.com mailto:earohua...@gmail.com -a ${FAXDEST}/${tempfax}  
/tmp/ocurrencies.txt 21), ocurrencies.txt is empty.

DIALPLAN:
[ Context 'default' created by 'pbx_config' ]
  '*95' =  1. NoOp(trying to send a fax to an email)
2. Set(FAXDEST=/tmp/faxes)
3. Set(tempfax=${SHELL(ls /tmp/faxes/*.tif):11})
4. NoOp(file name is: ${tempfax})
5. Goto(incoming-fax,fax,7)
[ Context 'incoming-fax' created by 'pbx_config' ]
  'fax' =  1. Verbose(3,Incoming fax)
  ...
5. ReceiveFax(${FAXDEST}/${tempfax})
6. Verbose(3,- Fax receipt completed with status: 
${FAXSTATUS})
7. System(echo | /usr/bin/mutt -s New fax earohua...@gmail.com 
mailto:earohua...@gmail.com -a ${FAXDEST}/${tempfax})

8. NoOp(System command status is: ${SYSTEMSTATUS})
9. Hangup()
ASTERISK CLI OUTPUT:
-- Goto (default,*95,1)
-- Executing [*95@default:1] NoOp(SIP/40106-1ea1, trying to send a fax to an 
email) in new stack

-- Executing [*95@default:2] Set(SIP/40106-1ea1, 
FAXDEST=/tmp/faxes) in new stack
-- Executing [*95@default:3] Set(SIP/40106-1ea1, tempfax=20130619.tif) in new 
stack
-- Executing [*95@default:4] NoOp(SIP/40106-1ea1, file name is: 20130619.tif) 
in new stack

-- Executing [*95@default:5] Goto(SIP/40106-1ea1, 
incoming-fax,fax,7) in new stack
-- Goto (incoming-fax,fax,7)
-- Executing [fax@incoming-fax:7] System(SIP/40106-1ea1, echo | /usr/bin/mutt -s 
New fax earohua...@gmail.com mailto:earohua...@gmail.com -a /tmp/faxes/20130619.tif) 
in new stack
-- Executing [fax@incoming-fax:8] NoOp(SIP/40106-1ea1, System command status is: 
APPERROR) in new stack

-- Executing [fax@incoming-fax:9] Hangup(SIP/40106-1ea1, ) in new 
stack
Elder D. Arohuanca
Lima - Peru


On Wed, Jun 19, 2013 at 1:38 PM, Andre Courchesne voipfor...@gmail.com 
mailto:voipfor...@gmail.com wrote:


Why echo | ?

Alsy are you sire of the content of ${FAXDEST} and ${tempfax}.

Add some NoOp before.


On 2013-06-19, at 2:29 PM, Daniel - Asterisk earohua...@gmail.com
mailto:earohua...@gmail.com wrote:


Hi Andre,
I've tried with:
System(echo | /usr/bin/mutt -s New fax earohua...@gmail.com
mailto:earohua...@gmail.com -a ${FAXDEST}/${tempfax})
with no success, value of SYSTEMSTATUS variable is APPERROR
Again it works from Linux shell.
Thanks in advance
Elder


On Wed, Jun 19, 2013 at 1:08 PM, Andre Courchesne voipfor...@gmail.com
mailto:voipfor...@gmail.com wrote:

Probably Asterisk does not know where mutt is, specify it's path in 
your System command.

On 2013-06-19, at 2:03 PM, Daniel - Asterisk earohua...@gmail.com
mailto:earohua...@gmail.com wrote:


Hello everyone,
I'm trying to send a received fax with mutt, when I try it from the 
Linux shel it
works, but when trying with Asterisk's System command it doesn't.
Successful Linux command:
echo | mutt -s New fax earohua...@gmail.com 
mailto:earohua...@gmail.com -a
/tmp/faxes/20130619.tif
Unsuccessful Asterisk Command:
same = n,System(mutt -s New fax elder.arohua...@gmail.com
mailto:elder.arohua...@gmail.com -a ${FAXDEST}/${tempfax}.tif)
I'm using Asterisk 1.8.19.0 on Debian 6.0.6, Asterisk was installed by 
root.
Any hint will be appreciated.
Elder D. Arohuanca
Lima - Peru
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com
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] Mailing a fax with mutt does not succeed

2013-06-19 Thread Mikhail Lischuk
 

This worked for me: 

System(date | mutt -s FAX from
${CALLERID(num)} -a
/var/spool/asterisk/fax/${STRFTIME(,,%Y%m%d)}-${CALLERID(num)}.tiff
mail@domain) 

I don't see any difference with you (beside the echo
instead of date), so I guess you should look at the maillog to find out
what is happening. Or (as I did in the end) write AGI script to send the
goddamn mail using the language and method you like (I used Perl and
MIME::Lite::TT::HTML), and make Asterisk call that script. 

jg
писал 19.06.2013 23:12: 

 More things to try:
 
 (1) Is there
any entry in /var/log/maillog (or equivalent log file)? If so, mutt
basically works and the messages should give some clues.
 (2) What
happens if you call mutt without any attachments?
 
 I am using mutt
in exactly the same way and it works.
 
 jg
 
 Am 19.06.2013 21:50,
schrieb Daniel - Asterisk: 
 
 Hi Andre: 
 
 I added echo to
provide STDIN, I'm sure on variable contents, please see bellow 
 

Hello Steve, 
 
 1. I've just addd echo at my sentence, please see
output bellow. 
 2. Asterisk is executing as root, I think Asterisk
has access to read TIF files since I've used ls, chmod, cp  mv from
Asterisk's CLI with '!' character. 
 3. I don't get you, please give
some advice to try using Verbose instead System 
 4. I don't know how
to get this, but I'm using /usr/bin/mutt as you can see bellow. 
 5. I
have redirected output of System this way : System(echo | /usr/bin/mutt
-s New fax earohua...@gmail.com -a ${FAXDEST}/${tempfax} 
/tmp/ocurrencies.txt 21), ocurrencies.txt is empty. 
 
 DIALPLAN:

 [ Context 'default' created by 'pbx_config' ]
 '*95' = 1.
NoOp(trying to send a fax to an email) 
 2. Set(FAXDEST=/tmp/faxes)

 3. Set(tempfax=${SHELL(ls /tmp/faxes/*.tif):11}) 
 4. NoOp(file
name is: ${tempfax}) 
 5. Goto(incoming-fax,fax,7) 
 
 [ Context
'incoming-fax' created by 'pbx_config' ]
 'fax' = 1.
Verbose(3,Incoming fax) 
 ... 
 5. ReceiveFax(${FAXDEST}/${tempfax})

 6. Verbose(3,- Fax receipt completed with status: ${FAXSTATUS}) 

7. System(echo | /usr/bin/mutt -s New fax earohua...@gmail.com -a
${FAXDEST}/${tempfax}) 
 8. NoOp(System command status is:
${SYSTEMSTATUS}) 
 9. Hangup() 
 
 ASTERISK CLI OUTPUT:
 -- Goto
(default,*95,1)
 -- Executing [*95@default:1]
NoOp(SIP/40106-1ea1, trying to send a fax to an email) in new
stack
 -- Executing [*95@default:2] Set(SIP/40106-1ea1,
FAXDEST=/tmp/faxes) in new stack
 -- Executing [*95@default:3]
Set(SIP/40106-1ea1, tempfax=20130619.tif) in new stack
 --
Executing [*95@default:4] NoOp(SIP/40106-1ea1, file name is:
20130619.tif) in new stack
 -- Executing [*95@default:5]
Goto(SIP/40106-1ea1, incoming-fax,fax,7) in new stack
 -- Goto
(incoming-fax,fax,7)
 -- Executing [fax@incoming-fax:7]
System(SIP/40106-1ea1, echo | /usr/bin/mutt -s New fax
earohua...@gmail.com -a /tmp/faxes/20130619.tif) in new stack
 --
Executing [fax@incoming-fax:8] NoOp(SIP/40106-1ea1, System
command status is: APPERROR) in new stack
 -- Executing
[fax@incoming-fax:9] Hangup(SIP/40106-1ea1, ) in new stack


 Elder D. Arohuanca 
 Lima - Peru 
 
 On Wed, Jun 19, 2013 at
1:38 PM, Andre Courchesne voipfor...@gmail.com wrote:
 
 Why
echo | ? 
 
 Alsy are you sire of the content of ${FAXDEST} and
${tempfax}. 
 
 Add some NoOp before. 
 
 On 2013-06-19, at
2:29 PM, Daniel - Asterisk earohua...@gmail.com wrote: 
 
 Hi
Andre, 
 
 I've tried with: 
 System(echo | /usr/bin/mutt -s
New fax earohua...@gmail.com -a ${FAXDEST}/${tempfax}) 
 

with no success, value of SYSTEMSTATUS variable is APPERROR 
 

Again it works from Linux shell. 
 
 Thanks in advance 


 Elder 
 
 On Wed, Jun 19, 2013 at 1:08 PM, Andre
Courchesne voipfor...@gmail.com wrote:
 
 Probably Asterisk
does not know where mutt is, specify it's path in your System command.

 
 On 2013-06-19, at 2:03 PM, Daniel - Asterisk
earohua...@gmail.com wrote: 
 
 Hello everyone, 


 I'm trying to send a received fax with mutt, when I try it from
the Linux shel it works, but when trying with Asterisk's System command
it doesn't. 
 
 Successful Linux command: 
 echo |
mutt -s New fax earohua...@gmail.com -a /tmp/faxes/20130619.tif

 
 Unsuccessful Asterisk Command: 
 same =
n,System(mutt -s New fax elder.arohua...@gmail.com -a
${FAXDEST}/${tempfax}.tif) 
 
 I'm using Asterisk 1.8.19.0
on Debian 6.0.6, Asterisk was installed by root. 
 
 Any
hint will be appreciated. 
 
 Elder D. Arohuanca 

Lima - Peru --

_

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

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

_

-- Bandwidth and Colocation Provided by http://www.api-digital.com [1]
--
 New to Asterisk? Join us 

Re: [asterisk-users] Mailing a fax with mutt does not succeed

2013-06-19 Thread Steve Edwards

Please don't top-post.

On Wed, 19 Jun 2013, Steve Edwards wrote:

1) Doesn't mutt expect the body on stdin? (Where's the 'echo' in the 
Asterisk command?)


On Wed, 19 Jun 2013, Daniel - Asterisk wrote:


1. I've just addd echo at my sentence, please see output bellow.


Not that it's related to your issue...

Since mutt is expecting the body on stdin, why not put something in like 
Hey, you've got FAX.


2) Is Asterisk executing as root? Does the Asterisk user ID have read 
access to the TIFF?


2. Asterisk is executing as root, I think Asterisk has access to read 
TIF files since I've used ls, chmod, cp  mv from Asterisk's CLI with 
'!' character.


This is not conclusive. The Asterisk 'daemon' is a separate process from 
your CLI process (and your shell process spawned from the CLI process). 
They do not 'have to' be executing as the same user. If the Asterisk 
daemon is executing as root, permissions should not be an issue -- unless 
you're doing something weird with /tmp/ and NFS.


3) If you use 'verbose()' instead of 'system()' does the command look 
like your shell command?


3. I don't get you, please give some advice to try using Verbose instead 
System


If you replace system() with verbose(), does the command you are trying to 
execute look correct? If you 'copy' the command from the Asterisk CLI and 
'paste' it into a shell and execute it using sudo as the the user 
executing the Asterisk daemon, does it work?



4) Is mutt in the Asterisk user ID's path?


4. I don't know how to get this, but I'm using /usr/bin/mutt as you can 
see bellow.


Then that should be sufficient.

5) If you redirect the output in the system() command to a file, does 
that yield any clues? I.e., system(foo /tmp/clue 21)


5. I have redirected output of System this way : System(echo | 
/usr/bin/mutt -s New fax earohua...@gmail.com -a ${FAXDEST}/${tempfax}

/tmp/ocurrencies.txt 21), ocurrencies.txt is empty.


Sometimes the 'littlest' thing can trip you up. Usually it comes down to 
ownership, permissions, or environment variables.


Not that this is the proper way to figure this out, but this is what I 
would try next in desperation -- after crossing my fingers.


(Cut and paste each line from this email to a shell.)

AUSER=$(ps --no-heading -C asterisk --format user)

FILE=/tmp/faxes/20130619.tif

MUSER=earohua...@gmail.com

echo body /tmp/body

env --ignore sudo -u ${AUSER} /usr/bin/file ${FILE}

env --ignore sudo -u ${AUSER} /usr/bin/mutt -v

env --ignore sudo -u ${AUSER} /usr/bin/mutt -s in-body ${MUSER} /tmp/body

env --ignore sudo -u ${AUSER} /usr/bin/mutt -a /tmp/body -s as-attachment-and-body 
${MUSER} /tmp/body

env --ignore sudo -u ${AUSER} /usr/bin/mutt -a ${FILE} -s new-fax ${MUSER} 
/tmp/body

Good luck :)

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000

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

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


Re: [asterisk-users] Asterisk / PHP-AGI / pthreads

2013-06-19 Thread Satish Barot
On Mon, Jun 17, 2013 at 7:22 PM, Steve Edwards asterisk@sedwards.comwrote:

 On Mon, 17 Jun 2013, Thorsten Göllner wrote:

  does anyone have experience with Asterisk-AGI-Scripts in PHP while using
 pthreads in PHP? Are there any limitations or problems known?


 I've written 'pthread-ed' AGIs in C.

 The only 'pthread related' limitation I stumbled into is that you can only
 execute a single AGI request at a time -- which is kind of obvious if you
 understand the AGI protocol.

 My use case was playing a file ('Please wait while we authorize your
 credit card') while processing the credit request.

 Since our card processor almost always returned the credit response before
 the end of the file, the 'user experience' was that the credit request was
 instantaneous.

 --
 Thanks in advance,
 --**--**
 -
 Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
 Newline  Fax: +1-760-731-3000
 --

 Steve,

Would you mind sharing a sample of your pthread-ed C AGI?
This will help someone like me who has written AGI in Perl/PHP and now
exploring C AGI.

Thanks,
--Satish
--
_
-- 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