adhearsion / punchblock

Telephony middleware library for Ruby
adhearsion.com/punchblock
MIT License
40 stars 34 forks source link

OriginateResponse keeps going on failure. #107

Closed bryanrite closed 12 years ago

bryanrite commented 12 years ago

I was dialing a SIP extension that doesn't exist. I receive an OriginateResponse with a failure, but the call continues to dial.

Using the develop branch of adhearsion, asterisk 1.8.10, ruby 1.9.3

Adhearsion, Asterisk logs and code: https://gist.github.com/5194329a4e31e0a64711

Interesting pieces are Adhearsion log, line: 219 and 235: OriginateResponse fails but is still successfully queued.

benlangfeld commented 12 years ago

Looks like we simply need to respond to OriginateResponse by sending an end event with an appropriate reason. Perhaps even wait for it before sending the Rayo dial response. The former is faster, but the latter perhaps a better long-term solution. I shall investigate in the morning.

On 16 July 2012 22:39, Bryan Rite < reply@reply.github.com

wrote:

I was dialing a SIP extension that doesn't exist. I receive an OriginateResponse with a failure, but the call continues to dial.

Using the develop branch of adhearsion, asterisk 1.8.10, ruby 1.9.3

Adhearsion, Asterisk logs and code: https://gist.github.com/5194329a4e31e0a64711

Interesting pieces are Adhearsion log, line: 219 and 235: OriginateResponse fails but is still successfully queued.


Reply to this email directly or view it on GitHub: https://github.com/adhearsion/punchblock/issues/107

benlangfeld commented 12 years ago

Note: OriginateResponse is only fired when the outbound channel is either accepted or rejected. Rayo requires that the dial command response be sent on originate queuing, so we have to go for an end event here.

benlangfeld commented 12 years ago

Fix here: https://github.com/adhearsion/punchblock/commit/6c28e29a00b11f96be2beec8369e401bdc6818d8

benlangfeld commented 12 years ago

Apologies, mod to that fix coming for asterisk's stupidity.

benlangfeld commented 12 years ago

Fix for the fix at https://github.com/adhearsion/punchblock/commit/65f44c535fa21e3a369436a712a10a3f23606fc3