Re: [asterisk-dev] [Code Review] 4577: res_pjsip_t38: T38 fax fails when using authentication with PJSIP sender

2015-04-08 Thread Jonathan Rose

---
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4577/
---

(Updated April 8, 2015, 1:15 p.m.)


Status
--

This change has been marked as submitted.


Review request for Asterisk Developers and Joshua Colp.


Changes
---

Committed in revision 434425


Bugs: ASTERISK-24933
https://issues.asterisk.org/jira/browse/ASTERISK-24933


Repository: Asterisk


Description
---

Description:
Two Asterisk boxes each have the other as endpoints with authentication set.
First Asterisk box originates a call to the second using the PJSIP endpoint.
The first Asterisk box uses an extension with sendfax, the second uses
an extension with receivefax.

The session starts fairly normally, but resolution never appears in fax show
session output. After a while (~25 seconds) the call drops and the fax fails.
Error messages shown are as follows:
Sender: The call dropped prematurely
Receiver: Disconnected after permitted retries

Note that when not using authentication, the FAX will complete as expected.
When using chan_sip as the sender to a receiver of chan_pjsip, the FAX will
also complete as expected with authentication, but if chan_pjsip is the sender
it will fail regardless of whether the recipient is chan_sip or chan_pjsip.

The problem is caused by duplication of a framehook in res_pjsip_t38 which
occurs on the second invite sent out when responding to the auth challenge.

Fix:
In order to fix this, I added a simple flag to the pjsip session struct that 
would
be raised when the framehook is first attached to prevent duplication. I 
wouldn't
be surprised if there were a better way to do this.


Diffs
-

  /certified/branches/13.1/res/res_pjsip_t38.c 433316 

Diff: https://reviewboard.asterisk.org/r/4577/diff/


Testing
---

I've duplicated and modified the t38 PJSIP fax test in the testsuite to include 
authentication. It fails without the patch and passes with the patch. I also 
tested this locally with my two Asterisk machines in the above scenario. I'll 
be linking the test after putting it on Gerrit.


Thanks,

Jonathan Rose

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

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

Re: [asterisk-dev] [Code Review] 4577: res_pjsip_t38: T38 fax fails when using authentication with PJSIP sender

2015-04-07 Thread Matt Jordan

---
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4577/#review15089
---

Ship it!



/certified/branches/13.1/res/res_pjsip_t38.c
https://reviewboard.asterisk.org/r/4577/#comment25766

Bike shedding!

For readability purposes - and to match the pattern you use later when you 
allocate the datastore - I'd do the look up on its own line, then test to see 
if you found it:

datastore = ast_channel_datastore_find(...);
if (datastore) {

}


- Matt Jordan


On April 6, 2015, 1:16 p.m., Jonathan Rose wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviewboard.asterisk.org/r/4577/
 ---
 
 (Updated April 6, 2015, 1:16 p.m.)
 
 
 Review request for Asterisk Developers and Joshua Colp.
 
 
 Bugs: ASTERISK-24933
 https://issues.asterisk.org/jira/browse/ASTERISK-24933
 
 
 Repository: Asterisk
 
 
 Description
 ---
 
 Description:
 Two Asterisk boxes each have the other as endpoints with authentication set.
 First Asterisk box originates a call to the second using the PJSIP endpoint.
 The first Asterisk box uses an extension with sendfax, the second uses
 an extension with receivefax.
 
 The session starts fairly normally, but resolution never appears in fax show
 session output. After a while (~25 seconds) the call drops and the fax fails.
 Error messages shown are as follows:
 Sender: The call dropped prematurely
 Receiver: Disconnected after permitted retries
 
 Note that when not using authentication, the FAX will complete as expected.
 When using chan_sip as the sender to a receiver of chan_pjsip, the FAX will
 also complete as expected with authentication, but if chan_pjsip is the sender
 it will fail regardless of whether the recipient is chan_sip or chan_pjsip.
 
 The problem is caused by duplication of a framehook in res_pjsip_t38 which
 occurs on the second invite sent out when responding to the auth challenge.
 
 Fix:
 In order to fix this, I added a simple flag to the pjsip session struct that 
 would
 be raised when the framehook is first attached to prevent duplication. I 
 wouldn't
 be surprised if there were a better way to do this.
 
 
 Diffs
 -
 
   /certified/branches/13.1/res/res_pjsip_t38.c 433316 
 
 Diff: https://reviewboard.asterisk.org/r/4577/diff/
 
 
 Testing
 ---
 
 I've duplicated and modified the t38 PJSIP fax test in the testsuite to 
 include authentication. It fails without the patch and passes with the patch. 
 I also tested this locally with my two Asterisk machines in the above 
 scenario. I'll be linking the test after putting it on Gerrit.
 
 
 Thanks,
 
 Jonathan Rose
 


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

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

Re: [asterisk-dev] [Code Review] 4577: res_pjsip_t38: T38 fax fails when using authentication with PJSIP sender

2015-04-06 Thread Jonathan Rose

---
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4577/
---

(Updated April 6, 2015, 1:16 p.m.)


Review request for Asterisk Developers and Joshua Colp.


Changes
---

Reduce paranoia, trust that all is well.


Bugs: ASTERISK-24933
https://issues.asterisk.org/jira/browse/ASTERISK-24933


Repository: Asterisk


Description
---

Description:
Two Asterisk boxes each have the other as endpoints with authentication set.
First Asterisk box originates a call to the second using the PJSIP endpoint.
The first Asterisk box uses an extension with sendfax, the second uses
an extension with receivefax.

The session starts fairly normally, but resolution never appears in fax show
session output. After a while (~25 seconds) the call drops and the fax fails.
Error messages shown are as follows:
Sender: The call dropped prematurely
Receiver: Disconnected after permitted retries

Note that when not using authentication, the FAX will complete as expected.
When using chan_sip as the sender to a receiver of chan_pjsip, the FAX will
also complete as expected with authentication, but if chan_pjsip is the sender
it will fail regardless of whether the recipient is chan_sip or chan_pjsip.

The problem is caused by duplication of a framehook in res_pjsip_t38 which
occurs on the second invite sent out when responding to the auth challenge.

Fix:
In order to fix this, I added a simple flag to the pjsip session struct that 
would
be raised when the framehook is first attached to prevent duplication. I 
wouldn't
be surprised if there were a better way to do this.


Diffs (updated)
-

  /certified/branches/13.1/res/res_pjsip_t38.c 433316 

Diff: https://reviewboard.asterisk.org/r/4577/diff/


Testing
---

I've duplicated and modified the t38 PJSIP fax test in the testsuite to include 
authentication. It fails without the patch and passes with the patch. I also 
tested this locally with my two Asterisk machines in the above scenario. I'll 
be linking the test after putting it on Gerrit.


Thanks,

Jonathan Rose

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

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

Re: [asterisk-dev] [Code Review] 4577: res_pjsip_t38: T38 fax fails when using authentication with PJSIP sender

2015-04-06 Thread Joshua Colp

---
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4577/#review15069
---



/certified/branches/13.1/res/res_pjsip_t38.c
https://reviewboard.asterisk.org/r/4577/#comment25749

I don't think you actually need this, I'll explain below.



/certified/branches/13.1/res/res_pjsip_t38.c
https://reviewboard.asterisk.org/r/4577/#comment25750

You aren't actually using the framehook id for anything. The sheer presence 
of the datastore itself is what you care about. As a result you don't need to 
create space to store the framehook id. You can just create the datastore and 
attach it.


- Joshua Colp


On April 3, 2015, 5:03 p.m., Jonathan Rose wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviewboard.asterisk.org/r/4577/
 ---
 
 (Updated April 3, 2015, 5:03 p.m.)
 
 
 Review request for Asterisk Developers and Joshua Colp.
 
 
 Bugs: ASTERISK-24933
 https://issues.asterisk.org/jira/browse/ASTERISK-24933
 
 
 Repository: Asterisk
 
 
 Description
 ---
 
 Description:
 Two Asterisk boxes each have the other as endpoints with authentication set.
 First Asterisk box originates a call to the second using the PJSIP endpoint.
 The first Asterisk box uses an extension with sendfax, the second uses
 an extension with receivefax.
 
 The session starts fairly normally, but resolution never appears in fax show
 session output. After a while (~25 seconds) the call drops and the fax fails.
 Error messages shown are as follows:
 Sender: The call dropped prematurely
 Receiver: Disconnected after permitted retries
 
 Note that when not using authentication, the FAX will complete as expected.
 When using chan_sip as the sender to a receiver of chan_pjsip, the FAX will
 also complete as expected with authentication, but if chan_pjsip is the sender
 it will fail regardless of whether the recipient is chan_sip or chan_pjsip.
 
 The problem is caused by duplication of a framehook in res_pjsip_t38 which
 occurs on the second invite sent out when responding to the auth challenge.
 
 Fix:
 In order to fix this, I added a simple flag to the pjsip session struct that 
 would
 be raised when the framehook is first attached to prevent duplication. I 
 wouldn't
 be surprised if there were a better way to do this.
 
 
 Diffs
 -
 
   /certified/branches/13.1/res/res_pjsip_t38.c 433316 
 
 Diff: https://reviewboard.asterisk.org/r/4577/diff/
 
 
 Testing
 ---
 
 I've duplicated and modified the t38 PJSIP fax test in the testsuite to 
 include authentication. It fails without the patch and passes with the patch. 
 I also tested this locally with my two Asterisk machines in the above 
 scenario. I'll be linking the test after putting it on Gerrit.
 
 
 Thanks,
 
 Jonathan Rose
 


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

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

Re: [asterisk-dev] [Code Review] 4577: res_pjsip_t38: T38 fax fails when using authentication with PJSIP sender

2015-04-06 Thread Joshua Colp

---
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4577/#review15075
---



/certified/branches/13.1/res/res_pjsip_t38.c
https://reviewboard.asterisk.org/r/4577/#comment25752

How could this occur?


- Joshua Colp


On April 6, 2015, 4:14 p.m., Jonathan Rose wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviewboard.asterisk.org/r/4577/
 ---
 
 (Updated April 6, 2015, 4:14 p.m.)
 
 
 Review request for Asterisk Developers and Joshua Colp.
 
 
 Bugs: ASTERISK-24933
 https://issues.asterisk.org/jira/browse/ASTERISK-24933
 
 
 Repository: Asterisk
 
 
 Description
 ---
 
 Description:
 Two Asterisk boxes each have the other as endpoints with authentication set.
 First Asterisk box originates a call to the second using the PJSIP endpoint.
 The first Asterisk box uses an extension with sendfax, the second uses
 an extension with receivefax.
 
 The session starts fairly normally, but resolution never appears in fax show
 session output. After a while (~25 seconds) the call drops and the fax fails.
 Error messages shown are as follows:
 Sender: The call dropped prematurely
 Receiver: Disconnected after permitted retries
 
 Note that when not using authentication, the FAX will complete as expected.
 When using chan_sip as the sender to a receiver of chan_pjsip, the FAX will
 also complete as expected with authentication, but if chan_pjsip is the sender
 it will fail regardless of whether the recipient is chan_sip or chan_pjsip.
 
 The problem is caused by duplication of a framehook in res_pjsip_t38 which
 occurs on the second invite sent out when responding to the auth challenge.
 
 Fix:
 In order to fix this, I added a simple flag to the pjsip session struct that 
 would
 be raised when the framehook is first attached to prevent duplication. I 
 wouldn't
 be surprised if there were a better way to do this.
 
 
 Diffs
 -
 
   /certified/branches/13.1/res/res_pjsip_t38.c 433316 
 
 Diff: https://reviewboard.asterisk.org/r/4577/diff/
 
 
 Testing
 ---
 
 I've duplicated and modified the t38 PJSIP fax test in the testsuite to 
 include authentication. It fails without the patch and passes with the patch. 
 I also tested this locally with my two Asterisk machines in the above 
 scenario. I'll be linking the test after putting it on Gerrit.
 
 
 Thanks,
 
 Jonathan Rose
 


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

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

Re: [asterisk-dev] [Code Review] 4577: res_pjsip_t38: T38 fax fails when using authentication with PJSIP sender

2015-04-06 Thread Joshua Colp


 On April 6, 2015, 4:16 p.m., Joshua Colp wrote:
  /certified/branches/13.1/res/res_pjsip_t38.c, lines 493-498
  https://reviewboard.asterisk.org/r/4577/diff/3/?file=73632#file73632line493
 
  How could this occur?
 
 Jonathan Rose wrote:
 As far as I know, it should never occur. I'm probably being paranoid.

You are. The only way that could happen is if the threading model for the PJSIP 
architecture was ignored. ^_^


- Joshua


---
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4577/#review15075
---


On April 6, 2015, 4:14 p.m., Jonathan Rose wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviewboard.asterisk.org/r/4577/
 ---
 
 (Updated April 6, 2015, 4:14 p.m.)
 
 
 Review request for Asterisk Developers and Joshua Colp.
 
 
 Bugs: ASTERISK-24933
 https://issues.asterisk.org/jira/browse/ASTERISK-24933
 
 
 Repository: Asterisk
 
 
 Description
 ---
 
 Description:
 Two Asterisk boxes each have the other as endpoints with authentication set.
 First Asterisk box originates a call to the second using the PJSIP endpoint.
 The first Asterisk box uses an extension with sendfax, the second uses
 an extension with receivefax.
 
 The session starts fairly normally, but resolution never appears in fax show
 session output. After a while (~25 seconds) the call drops and the fax fails.
 Error messages shown are as follows:
 Sender: The call dropped prematurely
 Receiver: Disconnected after permitted retries
 
 Note that when not using authentication, the FAX will complete as expected.
 When using chan_sip as the sender to a receiver of chan_pjsip, the FAX will
 also complete as expected with authentication, but if chan_pjsip is the sender
 it will fail regardless of whether the recipient is chan_sip or chan_pjsip.
 
 The problem is caused by duplication of a framehook in res_pjsip_t38 which
 occurs on the second invite sent out when responding to the auth challenge.
 
 Fix:
 In order to fix this, I added a simple flag to the pjsip session struct that 
 would
 be raised when the framehook is first attached to prevent duplication. I 
 wouldn't
 be surprised if there were a better way to do this.
 
 
 Diffs
 -
 
   /certified/branches/13.1/res/res_pjsip_t38.c 433316 
 
 Diff: https://reviewboard.asterisk.org/r/4577/diff/
 
 
 Testing
 ---
 
 I've duplicated and modified the t38 PJSIP fax test in the testsuite to 
 include authentication. It fails without the patch and passes with the patch. 
 I also tested this locally with my two Asterisk machines in the above 
 scenario. I'll be linking the test after putting it on Gerrit.
 
 
 Thanks,
 
 Jonathan Rose
 


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

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

Re: [asterisk-dev] [Code Review] 4577: res_pjsip_t38: T38 fax fails when using authentication with PJSIP sender

2015-04-06 Thread Jonathan Rose


 On April 6, 2015, 8:59 a.m., Joshua Colp wrote:
  /certified/branches/13.1/res/res_pjsip_t38.c, lines 514-524
  https://reviewboard.asterisk.org/r/4577/diff/2/?file=73560#file73560line514
 
  You aren't actually using the framehook id for anything. The sheer 
  presence of the datastore itself is what you care about. As a result you 
  don't need to create space to store the framehook id. You can just create 
  the datastore and attach it.

Yeah, I was fairly sure I didn't actually need the framehook id on the 
datastore... just felt like this was the common construct for this sort of 
thing and was a little cautious about having a datastore with no actual data in 
it. I suppose it's not a big deal though.


- Jonathan


---
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4577/#review15069
---


On April 3, 2015, 12:03 p.m., Jonathan Rose wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviewboard.asterisk.org/r/4577/
 ---
 
 (Updated April 3, 2015, 12:03 p.m.)
 
 
 Review request for Asterisk Developers and Joshua Colp.
 
 
 Bugs: ASTERISK-24933
 https://issues.asterisk.org/jira/browse/ASTERISK-24933
 
 
 Repository: Asterisk
 
 
 Description
 ---
 
 Description:
 Two Asterisk boxes each have the other as endpoints with authentication set.
 First Asterisk box originates a call to the second using the PJSIP endpoint.
 The first Asterisk box uses an extension with sendfax, the second uses
 an extension with receivefax.
 
 The session starts fairly normally, but resolution never appears in fax show
 session output. After a while (~25 seconds) the call drops and the fax fails.
 Error messages shown are as follows:
 Sender: The call dropped prematurely
 Receiver: Disconnected after permitted retries
 
 Note that when not using authentication, the FAX will complete as expected.
 When using chan_sip as the sender to a receiver of chan_pjsip, the FAX will
 also complete as expected with authentication, but if chan_pjsip is the sender
 it will fail regardless of whether the recipient is chan_sip or chan_pjsip.
 
 The problem is caused by duplication of a framehook in res_pjsip_t38 which
 occurs on the second invite sent out when responding to the auth challenge.
 
 Fix:
 In order to fix this, I added a simple flag to the pjsip session struct that 
 would
 be raised when the framehook is first attached to prevent duplication. I 
 wouldn't
 be surprised if there were a better way to do this.
 
 
 Diffs
 -
 
   /certified/branches/13.1/res/res_pjsip_t38.c 433316 
 
 Diff: https://reviewboard.asterisk.org/r/4577/diff/
 
 
 Testing
 ---
 
 I've duplicated and modified the t38 PJSIP fax test in the testsuite to 
 include authentication. It fails without the patch and passes with the patch. 
 I also tested this locally with my two Asterisk machines in the above 
 scenario. I'll be linking the test after putting it on Gerrit.
 
 
 Thanks,
 
 Jonathan Rose
 


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

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

Re: [asterisk-dev] [Code Review] 4577: res_pjsip_t38: T38 fax fails when using authentication with PJSIP sender

2015-04-06 Thread Jonathan Rose


 On April 6, 2015, 11:16 a.m., Joshua Colp wrote:
  /certified/branches/13.1/res/res_pjsip_t38.c, lines 493-498
  https://reviewboard.asterisk.org/r/4577/diff/3/?file=73632#file73632line493
 
  How could this occur?

As far as I know, it should never occur. I'm probably being paranoid.


- Jonathan


---
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4577/#review15075
---


On April 6, 2015, 11:14 a.m., Jonathan Rose wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviewboard.asterisk.org/r/4577/
 ---
 
 (Updated April 6, 2015, 11:14 a.m.)
 
 
 Review request for Asterisk Developers and Joshua Colp.
 
 
 Bugs: ASTERISK-24933
 https://issues.asterisk.org/jira/browse/ASTERISK-24933
 
 
 Repository: Asterisk
 
 
 Description
 ---
 
 Description:
 Two Asterisk boxes each have the other as endpoints with authentication set.
 First Asterisk box originates a call to the second using the PJSIP endpoint.
 The first Asterisk box uses an extension with sendfax, the second uses
 an extension with receivefax.
 
 The session starts fairly normally, but resolution never appears in fax show
 session output. After a while (~25 seconds) the call drops and the fax fails.
 Error messages shown are as follows:
 Sender: The call dropped prematurely
 Receiver: Disconnected after permitted retries
 
 Note that when not using authentication, the FAX will complete as expected.
 When using chan_sip as the sender to a receiver of chan_pjsip, the FAX will
 also complete as expected with authentication, but if chan_pjsip is the sender
 it will fail regardless of whether the recipient is chan_sip or chan_pjsip.
 
 The problem is caused by duplication of a framehook in res_pjsip_t38 which
 occurs on the second invite sent out when responding to the auth challenge.
 
 Fix:
 In order to fix this, I added a simple flag to the pjsip session struct that 
 would
 be raised when the framehook is first attached to prevent duplication. I 
 wouldn't
 be surprised if there were a better way to do this.
 
 
 Diffs
 -
 
   /certified/branches/13.1/res/res_pjsip_t38.c 433316 
 
 Diff: https://reviewboard.asterisk.org/r/4577/diff/
 
 
 Testing
 ---
 
 I've duplicated and modified the t38 PJSIP fax test in the testsuite to 
 include authentication. It fails without the patch and passes with the patch. 
 I also tested this locally with my two Asterisk machines in the above 
 scenario. I'll be linking the test after putting it on Gerrit.
 
 
 Thanks,
 
 Jonathan Rose
 


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

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

Re: [asterisk-dev] [Code Review] 4577: res_pjsip_t38: T38 fax fails when using authentication with PJSIP sender

2015-04-06 Thread Jonathan Rose

---
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4577/
---

(Updated April 6, 2015, 11:14 a.m.)


Review request for Asterisk Developers and Joshua Colp.


Changes
---

Remove framehook ID from datastore.  Now the datastore is just sort of... a 
boolean flag by means of existence I guess.


Bugs: ASTERISK-24933
https://issues.asterisk.org/jira/browse/ASTERISK-24933


Repository: Asterisk


Description
---

Description:
Two Asterisk boxes each have the other as endpoints with authentication set.
First Asterisk box originates a call to the second using the PJSIP endpoint.
The first Asterisk box uses an extension with sendfax, the second uses
an extension with receivefax.

The session starts fairly normally, but resolution never appears in fax show
session output. After a while (~25 seconds) the call drops and the fax fails.
Error messages shown are as follows:
Sender: The call dropped prematurely
Receiver: Disconnected after permitted retries

Note that when not using authentication, the FAX will complete as expected.
When using chan_sip as the sender to a receiver of chan_pjsip, the FAX will
also complete as expected with authentication, but if chan_pjsip is the sender
it will fail regardless of whether the recipient is chan_sip or chan_pjsip.

The problem is caused by duplication of a framehook in res_pjsip_t38 which
occurs on the second invite sent out when responding to the auth challenge.

Fix:
In order to fix this, I added a simple flag to the pjsip session struct that 
would
be raised when the framehook is first attached to prevent duplication. I 
wouldn't
be surprised if there were a better way to do this.


Diffs (updated)
-

  /certified/branches/13.1/res/res_pjsip_t38.c 433316 

Diff: https://reviewboard.asterisk.org/r/4577/diff/


Testing
---

I've duplicated and modified the t38 PJSIP fax test in the testsuite to include 
authentication. It fails without the patch and passes with the patch. I also 
tested this locally with my two Asterisk machines in the above scenario. I'll 
be linking the test after putting it on Gerrit.


Thanks,

Jonathan Rose

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

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

Re: [asterisk-dev] [Code Review] 4577: res_pjsip_t38: T38 fax fails when using authentication with PJSIP sender

2015-04-03 Thread Jonathan Rose

---
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4577/#review15046
---



/certified/branches/13.1/res/res_pjsip_t38.c
https://reviewboard.asterisk.org/r/4577/#comment25722

s/for the channel/for the endpoint/


- Jonathan Rose


On April 3, 2015, 12:03 p.m., Jonathan Rose wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviewboard.asterisk.org/r/4577/
 ---
 
 (Updated April 3, 2015, 12:03 p.m.)
 
 
 Review request for Asterisk Developers and Joshua Colp.
 
 
 Bugs: ASTERISK-24933
 https://issues.asterisk.org/jira/browse/ASTERISK-24933
 
 
 Repository: Asterisk
 
 
 Description
 ---
 
 Description:
 Two Asterisk boxes each have the other as endpoints with authentication set.
 First Asterisk box originates a call to the second using the PJSIP endpoint.
 The first Asterisk box uses an extension with sendfax, the second uses
 an extension with receivefax.
 
 The session starts fairly normally, but resolution never appears in fax show
 session output. After a while (~25 seconds) the call drops and the fax fails.
 Error messages shown are as follows:
 Sender: The call dropped prematurely
 Receiver: Disconnected after permitted retries
 
 Note that when not using authentication, the FAX will complete as expected.
 When using chan_sip as the sender to a receiver of chan_pjsip, the FAX will
 also complete as expected with authentication, but if chan_pjsip is the sender
 it will fail regardless of whether the recipient is chan_sip or chan_pjsip.
 
 The problem is caused by duplication of a framehook in res_pjsip_t38 which
 occurs on the second invite sent out when responding to the auth challenge.
 
 Fix:
 In order to fix this, I added a simple flag to the pjsip session struct that 
 would
 be raised when the framehook is first attached to prevent duplication. I 
 wouldn't
 be surprised if there were a better way to do this.
 
 
 Diffs
 -
 
   /certified/branches/13.1/res/res_pjsip_t38.c 433316 
 
 Diff: https://reviewboard.asterisk.org/r/4577/diff/
 
 
 Testing
 ---
 
 I've duplicated and modified the t38 PJSIP fax test in the testsuite to 
 include authentication. It fails without the patch and passes with the patch. 
 I also tested this locally with my two Asterisk machines in the above 
 scenario. I'll be linking the test after putting it on Gerrit.
 
 
 Thanks,
 
 Jonathan Rose
 


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

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

Re: [asterisk-dev] [Code Review] 4577: res_pjsip_t38: T38 fax fails when using authentication with PJSIP sender

2015-04-03 Thread Jonathan Rose

---
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4577/
---

(Updated April 3, 2015, 12:03 p.m.)


Review request for Asterisk Developers and Joshua Colp.


Changes
---

Convert flag to datastore


Bugs: ASTERISK-24933
https://issues.asterisk.org/jira/browse/ASTERISK-24933


Repository: Asterisk


Description
---

Description:
Two Asterisk boxes each have the other as endpoints with authentication set.
First Asterisk box originates a call to the second using the PJSIP endpoint.
The first Asterisk box uses an extension with sendfax, the second uses
an extension with receivefax.

The session starts fairly normally, but resolution never appears in fax show
session output. After a while (~25 seconds) the call drops and the fax fails.
Error messages shown are as follows:
Sender: The call dropped prematurely
Receiver: Disconnected after permitted retries

Note that when not using authentication, the FAX will complete as expected.
When using chan_sip as the sender to a receiver of chan_pjsip, the FAX will
also complete as expected with authentication, but if chan_pjsip is the sender
it will fail regardless of whether the recipient is chan_sip or chan_pjsip.

The problem is caused by duplication of a framehook in res_pjsip_t38 which
occurs on the second invite sent out when responding to the auth challenge.

Fix:
In order to fix this, I added a simple flag to the pjsip session struct that 
would
be raised when the framehook is first attached to prevent duplication. I 
wouldn't
be surprised if there were a better way to do this.


Diffs (updated)
-

  /certified/branches/13.1/res/res_pjsip_t38.c 433316 

Diff: https://reviewboard.asterisk.org/r/4577/diff/


Testing
---

I've duplicated and modified the t38 PJSIP fax test in the testsuite to include 
authentication. It fails without the patch and passes with the patch. I also 
tested this locally with my two Asterisk machines in the above scenario. I'll 
be linking the test after putting it on Gerrit.


Thanks,

Jonathan Rose

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

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

Re: [asterisk-dev] [Code Review] 4577: res_pjsip_t38: T38 fax fails when using authentication with PJSIP sender

2015-04-03 Thread Kevin Harwell


 On April 2, 2015, 6:13 p.m., Kevin Harwell wrote:
  It is probably always the case that framehooks should not be attached 
  twice. If this is true then it might be better to add a check in 
  'ast_framehook_attach' that first makes sure the hook is not already in the 
  list. If so don't add it again.
 
 rmudgett wrote:
 It is specific framehooks that cannot be attached twice.  It is not a 
 general requirement/property of the framehook concept.

Just curious, but what's a case where a framehook should be attached twice?


- Kevin


---
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4577/#review15034
---


On April 2, 2015, 2:08 p.m., Jonathan Rose wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviewboard.asterisk.org/r/4577/
 ---
 
 (Updated April 2, 2015, 2:08 p.m.)
 
 
 Review request for Asterisk Developers and Joshua Colp.
 
 
 Bugs: ASTERISK-24933
 https://issues.asterisk.org/jira/browse/ASTERISK-24933
 
 
 Repository: Asterisk
 
 
 Description
 ---
 
 Description:
 Two Asterisk boxes each have the other as endpoints with authentication set.
 First Asterisk box originates a call to the second using the PJSIP endpoint.
 The first Asterisk box uses an extension with sendfax, the second uses
 an extension with receivefax.
 
 The session starts fairly normally, but resolution never appears in fax show
 session output. After a while (~25 seconds) the call drops and the fax fails.
 Error messages shown are as follows:
 Sender: The call dropped prematurely
 Receiver: Disconnected after permitted retries
 
 Note that when not using authentication, the FAX will complete as expected.
 When using chan_sip as the sender to a receiver of chan_pjsip, the FAX will
 also complete as expected with authentication, but if chan_pjsip is the sender
 it will fail regardless of whether the recipient is chan_sip or chan_pjsip.
 
 The problem is caused by duplication of a framehook in res_pjsip_t38 which
 occurs on the second invite sent out when responding to the auth challenge.
 
 Fix:
 In order to fix this, I added a simple flag to the pjsip session struct that 
 would
 be raised when the framehook is first attached to prevent duplication. I 
 wouldn't
 be surprised if there were a better way to do this.
 
 
 Diffs
 -
 
   /certified/branches/13.1/res/res_pjsip_t38.c 433316 
   /certified/branches/13.1/include/asterisk/res_pjsip_session.h 433316 
 
 Diff: https://reviewboard.asterisk.org/r/4577/diff/
 
 
 Testing
 ---
 
 I've duplicated and modified the t38 PJSIP fax test in the testsuite to 
 include authentication. It fails without the patch and passes with the patch. 
 I also tested this locally with my two Asterisk machines in the above 
 scenario. I'll be linking the test after putting it on Gerrit.
 
 
 Thanks,
 
 Jonathan Rose
 


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

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

Re: [asterisk-dev] [Code Review] 4577: res_pjsip_t38: T38 fax fails when using authentication with PJSIP sender

2015-04-03 Thread Jonathan Rose


 On April 2, 2015, 6:13 p.m., Kevin Harwell wrote:
  It is probably always the case that framehooks should not be attached 
  twice. If this is true then it might be better to add a check in 
  'ast_framehook_attach' that first makes sure the hook is not already in the 
  list. If so don't add it again.
 
 rmudgett wrote:
 It is specific framehooks that cannot be attached twice.  It is not a 
 general requirement/property of the framehook concept.
 
 Kevin Harwell wrote:
 Just curious, but what's a case where a framehook should be attached 
 twice?
 
 Jonathan Rose wrote:
 You could have multiple mixmonitors attached by separate parts of the 
 dialplan saving to different files as an example.

Well, that might be audiohooks instead of framehooks actually... but it's the 
same concept.


- Jonathan


---
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4577/#review15034
---


On April 2, 2015, 2:08 p.m., Jonathan Rose wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviewboard.asterisk.org/r/4577/
 ---
 
 (Updated April 2, 2015, 2:08 p.m.)
 
 
 Review request for Asterisk Developers and Joshua Colp.
 
 
 Bugs: ASTERISK-24933
 https://issues.asterisk.org/jira/browse/ASTERISK-24933
 
 
 Repository: Asterisk
 
 
 Description
 ---
 
 Description:
 Two Asterisk boxes each have the other as endpoints with authentication set.
 First Asterisk box originates a call to the second using the PJSIP endpoint.
 The first Asterisk box uses an extension with sendfax, the second uses
 an extension with receivefax.
 
 The session starts fairly normally, but resolution never appears in fax show
 session output. After a while (~25 seconds) the call drops and the fax fails.
 Error messages shown are as follows:
 Sender: The call dropped prematurely
 Receiver: Disconnected after permitted retries
 
 Note that when not using authentication, the FAX will complete as expected.
 When using chan_sip as the sender to a receiver of chan_pjsip, the FAX will
 also complete as expected with authentication, but if chan_pjsip is the sender
 it will fail regardless of whether the recipient is chan_sip or chan_pjsip.
 
 The problem is caused by duplication of a framehook in res_pjsip_t38 which
 occurs on the second invite sent out when responding to the auth challenge.
 
 Fix:
 In order to fix this, I added a simple flag to the pjsip session struct that 
 would
 be raised when the framehook is first attached to prevent duplication. I 
 wouldn't
 be surprised if there were a better way to do this.
 
 
 Diffs
 -
 
   /certified/branches/13.1/res/res_pjsip_t38.c 433316 
   /certified/branches/13.1/include/asterisk/res_pjsip_session.h 433316 
 
 Diff: https://reviewboard.asterisk.org/r/4577/diff/
 
 
 Testing
 ---
 
 I've duplicated and modified the t38 PJSIP fax test in the testsuite to 
 include authentication. It fails without the patch and passes with the patch. 
 I also tested this locally with my two Asterisk machines in the above 
 scenario. I'll be linking the test after putting it on Gerrit.
 
 
 Thanks,
 
 Jonathan Rose
 


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

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

Re: [asterisk-dev] [Code Review] 4577: res_pjsip_t38: T38 fax fails when using authentication with PJSIP sender

2015-04-03 Thread Jonathan Rose


 On April 2, 2015, 6:13 p.m., Kevin Harwell wrote:
  It is probably always the case that framehooks should not be attached 
  twice. If this is true then it might be better to add a check in 
  'ast_framehook_attach' that first makes sure the hook is not already in the 
  list. If so don't add it again.
 
 rmudgett wrote:
 It is specific framehooks that cannot be attached twice.  It is not a 
 general requirement/property of the framehook concept.
 
 Kevin Harwell wrote:
 Just curious, but what's a case where a framehook should be attached 
 twice?

You could have multiple mixmonitors attached by separate parts of the dialplan 
saving to different files as an example.


- Jonathan


---
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4577/#review15034
---


On April 2, 2015, 2:08 p.m., Jonathan Rose wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviewboard.asterisk.org/r/4577/
 ---
 
 (Updated April 2, 2015, 2:08 p.m.)
 
 
 Review request for Asterisk Developers and Joshua Colp.
 
 
 Bugs: ASTERISK-24933
 https://issues.asterisk.org/jira/browse/ASTERISK-24933
 
 
 Repository: Asterisk
 
 
 Description
 ---
 
 Description:
 Two Asterisk boxes each have the other as endpoints with authentication set.
 First Asterisk box originates a call to the second using the PJSIP endpoint.
 The first Asterisk box uses an extension with sendfax, the second uses
 an extension with receivefax.
 
 The session starts fairly normally, but resolution never appears in fax show
 session output. After a while (~25 seconds) the call drops and the fax fails.
 Error messages shown are as follows:
 Sender: The call dropped prematurely
 Receiver: Disconnected after permitted retries
 
 Note that when not using authentication, the FAX will complete as expected.
 When using chan_sip as the sender to a receiver of chan_pjsip, the FAX will
 also complete as expected with authentication, but if chan_pjsip is the sender
 it will fail regardless of whether the recipient is chan_sip or chan_pjsip.
 
 The problem is caused by duplication of a framehook in res_pjsip_t38 which
 occurs on the second invite sent out when responding to the auth challenge.
 
 Fix:
 In order to fix this, I added a simple flag to the pjsip session struct that 
 would
 be raised when the framehook is first attached to prevent duplication. I 
 wouldn't
 be surprised if there were a better way to do this.
 
 
 Diffs
 -
 
   /certified/branches/13.1/res/res_pjsip_t38.c 433316 
   /certified/branches/13.1/include/asterisk/res_pjsip_session.h 433316 
 
 Diff: https://reviewboard.asterisk.org/r/4577/diff/
 
 
 Testing
 ---
 
 I've duplicated and modified the t38 PJSIP fax test in the testsuite to 
 include authentication. It fails without the patch and passes with the patch. 
 I also tested this locally with my two Asterisk machines in the above 
 scenario. I'll be linking the test after putting it on Gerrit.
 
 
 Thanks,
 
 Jonathan Rose
 


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

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

Re: [asterisk-dev] [Code Review] 4577: res_pjsip_t38: T38 fax fails when using authentication with PJSIP sender

2015-04-02 Thread rmudgett


 On April 2, 2015, 6:13 p.m., Kevin Harwell wrote:
  It is probably always the case that framehooks should not be attached 
  twice. If this is true then it might be better to add a check in 
  'ast_framehook_attach' that first makes sure the hook is not already in the 
  list. If so don't add it again.

It is specific framehooks that cannot be attached twice.  It is not a general 
requirement/property of the framehook concept.


- rmudgett


---
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4577/#review15034
---


On April 2, 2015, 2:08 p.m., Jonathan Rose wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviewboard.asterisk.org/r/4577/
 ---
 
 (Updated April 2, 2015, 2:08 p.m.)
 
 
 Review request for Asterisk Developers and Joshua Colp.
 
 
 Bugs: ASTERISK-24933
 https://issues.asterisk.org/jira/browse/ASTERISK-24933
 
 
 Repository: Asterisk
 
 
 Description
 ---
 
 Description:
 Two Asterisk boxes each have the other as endpoints with authentication set.
 First Asterisk box originates a call to the second using the PJSIP endpoint.
 The first Asterisk box uses an extension with sendfax, the second uses
 an extension with receivefax.
 
 The session starts fairly normally, but resolution never appears in fax show
 session output. After a while (~25 seconds) the call drops and the fax fails.
 Error messages shown are as follows:
 Sender: The call dropped prematurely
 Receiver: Disconnected after permitted retries
 
 Note that when not using authentication, the FAX will complete as expected.
 When using chan_sip as the sender to a receiver of chan_pjsip, the FAX will
 also complete as expected with authentication, but if chan_pjsip is the sender
 it will fail regardless of whether the recipient is chan_sip or chan_pjsip.
 
 The problem is caused by duplication of a framehook in res_pjsip_t38 which
 occurs on the second invite sent out when responding to the auth challenge.
 
 Fix:
 In order to fix this, I added a simple flag to the pjsip session struct that 
 would
 be raised when the framehook is first attached to prevent duplication. I 
 wouldn't
 be surprised if there were a better way to do this.
 
 
 Diffs
 -
 
   /certified/branches/13.1/res/res_pjsip_t38.c 433316 
   /certified/branches/13.1/include/asterisk/res_pjsip_session.h 433316 
 
 Diff: https://reviewboard.asterisk.org/r/4577/diff/
 
 
 Testing
 ---
 
 I've duplicated and modified the t38 PJSIP fax test in the testsuite to 
 include authentication. It fails without the patch and passes with the patch. 
 I also tested this locally with my two Asterisk machines in the above 
 scenario. I'll be linking the test after putting it on Gerrit.
 
 
 Thanks,
 
 Jonathan Rose
 


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

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

Re: [asterisk-dev] [Code Review] 4577: res_pjsip_t38: T38 fax fails when using authentication with PJSIP sender

2015-04-02 Thread rmudgett

---
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4577/#review15036
---



/certified/branches/13.1/include/asterisk/res_pjsip_session.h
https://reviewboard.asterisk.org/r/4577/#comment25715

Beware ABI compatibility when adding to this struct.  There have already 
been other items added to this struct on the v13 branch.  You could add the 
flag as a bit field and put it right after defer_terminate without altering the 
struct byte layout.


A datastore could be used to record if the framehook is attached.


- rmudgett


On April 2, 2015, 2:08 p.m., Jonathan Rose wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviewboard.asterisk.org/r/4577/
 ---
 
 (Updated April 2, 2015, 2:08 p.m.)
 
 
 Review request for Asterisk Developers and Joshua Colp.
 
 
 Bugs: ASTERISK-24933
 https://issues.asterisk.org/jira/browse/ASTERISK-24933
 
 
 Repository: Asterisk
 
 
 Description
 ---
 
 Description:
 Two Asterisk boxes each have the other as endpoints with authentication set.
 First Asterisk box originates a call to the second using the PJSIP endpoint.
 The first Asterisk box uses an extension with sendfax, the second uses
 an extension with receivefax.
 
 The session starts fairly normally, but resolution never appears in fax show
 session output. After a while (~25 seconds) the call drops and the fax fails.
 Error messages shown are as follows:
 Sender: The call dropped prematurely
 Receiver: Disconnected after permitted retries
 
 Note that when not using authentication, the FAX will complete as expected.
 When using chan_sip as the sender to a receiver of chan_pjsip, the FAX will
 also complete as expected with authentication, but if chan_pjsip is the sender
 it will fail regardless of whether the recipient is chan_sip or chan_pjsip.
 
 The problem is caused by duplication of a framehook in res_pjsip_t38 which
 occurs on the second invite sent out when responding to the auth challenge.
 
 Fix:
 In order to fix this, I added a simple flag to the pjsip session struct that 
 would
 be raised when the framehook is first attached to prevent duplication. I 
 wouldn't
 be surprised if there were a better way to do this.
 
 
 Diffs
 -
 
   /certified/branches/13.1/res/res_pjsip_t38.c 433316 
   /certified/branches/13.1/include/asterisk/res_pjsip_session.h 433316 
 
 Diff: https://reviewboard.asterisk.org/r/4577/diff/
 
 
 Testing
 ---
 
 I've duplicated and modified the t38 PJSIP fax test in the testsuite to 
 include authentication. It fails without the patch and passes with the patch. 
 I also tested this locally with my two Asterisk machines in the above 
 scenario. I'll be linking the test after putting it on Gerrit.
 
 
 Thanks,
 
 Jonathan Rose
 


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

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

Re: [asterisk-dev] [Code Review] 4577: res_pjsip_t38: T38 fax fails when using authentication with PJSIP sender

2015-04-02 Thread Kevin Harwell

---
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4577/#review15034
---


It is probably always the case that framehooks should not be attached twice. If 
this is true then it might be better to add a check in 'ast_framehook_attach' 
that first makes sure the hook is not already in the list. If so don't add it 
again.

- Kevin Harwell


On April 2, 2015, 2:08 p.m., Jonathan Rose wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviewboard.asterisk.org/r/4577/
 ---
 
 (Updated April 2, 2015, 2:08 p.m.)
 
 
 Review request for Asterisk Developers and Joshua Colp.
 
 
 Bugs: ASTERISK-24933
 https://issues.asterisk.org/jira/browse/ASTERISK-24933
 
 
 Repository: Asterisk
 
 
 Description
 ---
 
 Description:
 Two Asterisk boxes each have the other as endpoints with authentication set.
 First Asterisk box originates a call to the second using the PJSIP endpoint.
 The first Asterisk box uses an extension with sendfax, the second uses
 an extension with receivefax.
 
 The session starts fairly normally, but resolution never appears in fax show
 session output. After a while (~25 seconds) the call drops and the fax fails.
 Error messages shown are as follows:
 Sender: The call dropped prematurely
 Receiver: Disconnected after permitted retries
 
 Note that when not using authentication, the FAX will complete as expected.
 When using chan_sip as the sender to a receiver of chan_pjsip, the FAX will
 also complete as expected with authentication, but if chan_pjsip is the sender
 it will fail regardless of whether the recipient is chan_sip or chan_pjsip.
 
 The problem is caused by duplication of a framehook in res_pjsip_t38 which
 occurs on the second invite sent out when responding to the auth challenge.
 
 Fix:
 In order to fix this, I added a simple flag to the pjsip session struct that 
 would
 be raised when the framehook is first attached to prevent duplication. I 
 wouldn't
 be surprised if there were a better way to do this.
 
 
 Diffs
 -
 
   /certified/branches/13.1/res/res_pjsip_t38.c 433316 
   /certified/branches/13.1/include/asterisk/res_pjsip_session.h 433316 
 
 Diff: https://reviewboard.asterisk.org/r/4577/diff/
 
 
 Testing
 ---
 
 I've duplicated and modified the t38 PJSIP fax test in the testsuite to 
 include authentication. It fails without the patch and passes with the patch. 
 I also tested this locally with my two Asterisk machines in the above 
 scenario. I'll be linking the test after putting it on Gerrit.
 
 
 Thanks,
 
 Jonathan Rose
 


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

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

Re: [asterisk-dev] [Code Review] 4577: res_pjsip_t38: T38 fax fails when using authentication with PJSIP sender

2015-04-02 Thread Matt Jordan

---
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4577/#review15038
---



/certified/branches/13.1/include/asterisk/res_pjsip_session.h
https://reviewboard.asterisk.org/r/4577/#comment25717

I hadn't really thought about that when discussing this with Jonathan 
earlier - and that may actually be a better way of handling this (and avoids 
ABI issues as well). That's actually how most framehooks check for their 
existence, and allow for API calls to remove the framehook.


- Matt Jordan


On April 2, 2015, 2:08 p.m., Jonathan Rose wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviewboard.asterisk.org/r/4577/
 ---
 
 (Updated April 2, 2015, 2:08 p.m.)
 
 
 Review request for Asterisk Developers and Joshua Colp.
 
 
 Bugs: ASTERISK-24933
 https://issues.asterisk.org/jira/browse/ASTERISK-24933
 
 
 Repository: Asterisk
 
 
 Description
 ---
 
 Description:
 Two Asterisk boxes each have the other as endpoints with authentication set.
 First Asterisk box originates a call to the second using the PJSIP endpoint.
 The first Asterisk box uses an extension with sendfax, the second uses
 an extension with receivefax.
 
 The session starts fairly normally, but resolution never appears in fax show
 session output. After a while (~25 seconds) the call drops and the fax fails.
 Error messages shown are as follows:
 Sender: The call dropped prematurely
 Receiver: Disconnected after permitted retries
 
 Note that when not using authentication, the FAX will complete as expected.
 When using chan_sip as the sender to a receiver of chan_pjsip, the FAX will
 also complete as expected with authentication, but if chan_pjsip is the sender
 it will fail regardless of whether the recipient is chan_sip or chan_pjsip.
 
 The problem is caused by duplication of a framehook in res_pjsip_t38 which
 occurs on the second invite sent out when responding to the auth challenge.
 
 Fix:
 In order to fix this, I added a simple flag to the pjsip session struct that 
 would
 be raised when the framehook is first attached to prevent duplication. I 
 wouldn't
 be surprised if there were a better way to do this.
 
 
 Diffs
 -
 
   /certified/branches/13.1/res/res_pjsip_t38.c 433316 
   /certified/branches/13.1/include/asterisk/res_pjsip_session.h 433316 
 
 Diff: https://reviewboard.asterisk.org/r/4577/diff/
 
 
 Testing
 ---
 
 I've duplicated and modified the t38 PJSIP fax test in the testsuite to 
 include authentication. It fails without the patch and passes with the patch. 
 I also tested this locally with my two Asterisk machines in the above 
 scenario. I'll be linking the test after putting it on Gerrit.
 
 
 Thanks,
 
 Jonathan Rose
 


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

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