endreason details

72 views
Skip to first unread message

neeraj nagi

unread,
May 7, 2013, 9:41:32 AM5/7/13
to adhea...@googlegroups.com
currently for freeswitch + adhearsion setup, in these three scenarios
1) invalid number
2) number not reachable
3) gateway down

punchblock's endreason is 'error', is there a way to differentiate different use cases.

Ben Langfeld

unread,
May 7, 2013, 11:02:01 AM5/7/13
to adhea...@googlegroups.com
The Rayo protocol does not currently differentiate those scenarios: http://xmpp.org/extensions/xep-0327.html#def-end. It might be possible to add some or all of these as error codes. Can you say something about your use case?

Regards,
Ben Langfeld


--
You received this message because you are subscribed to the Google Groups "Adhearsion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adhearsion+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

David Wilkie

unread,
May 7, 2013, 6:13:22 PM5/7/13
to adhea...@googlegroups.com
This is something that I'm interested in as well.

This is my case. In the normal flow Party A, calls and is connected to party B. If however, when dialing party B,
1) invalid number - mark B as being invalid so he's not tried again, then call party C and try to connect with A
2) number not reachable - mark B as being offline so he's not tried again in the near future, then call party C and try to connect with A
3) gateway down - Retry dialing B with an external Sip gateway, and mark the default gateway as down, triggering a notification to the server admin

Ben, whats required to add these error codes to the Rayo protocol, then to Adhearsion?

Ben Langfeld

unread,
May 7, 2013, 6:37:15 PM5/7/13
to adhea...@googlegroups.com
David,

To get those in the Rayo protocol, you'd need to open a pull request against it here: github.com/rayo/xmpp

Once that's in, we're constrained by the fact that Rayo is undergoing review with the XMPP Standards Foundation right now, and will be several months before it's advanced to Draft status. Since we promise backward compatibility between all 2.x releases of Adhearsion, we can't introduce this feature into a release until we have at least a strong expectation that it will remain in the specification, and therefore we'll be able to maintain BC. That really means Draft status for the spec.

So, for the medium term it will have to live in a feature branch of Adhearsion (though this really means Punchblock). Pull requests welcome.

Regards,
Ben Langfeld

Neeraj Nagi

unread,
Aug 17, 2013, 4:16:47 PM8/17/13
to adhea...@googlegroups.com, b...@langfeld.me
just in case someone is desperate to have these detailed end reason you can tweak translator/freeswitch/call.rb  in punchblock gem. 

updated code in my case was
--------------------------------------------------------------------------
        %w{
          NORMAL_CLEARING ORIGINATOR_CANCEL SYSTEM_SHUTDOWN MANAGER_REQUEST
          BLIND_TRANSFER ATTENDED_TRANSFER PICKED_OFF NORMAL_UNSPECIFIED
        }.each { |c| HANGUP_CAUSE_TO_END_REASON[c] =  "hangup__#{c}".to_sym }

        %w{
          NO_USER_RESPONSE NO_ANSWER SUBSCRIBER_ABSENT ALLOTTED_TIMEOUT
          MEDIA_TIMEOUT PROGRESS_TIMEOUT
        }.each { |c| HANGUP_CAUSE_TO_END_REASON[c] = "timeout__#{c}".to_sym } 
------------------------------------------------------

Regards,
Ben Langfeld



Regards,
Ben Langfeld


To unsubscribe from this group and stop receiving emails from it, send an email to adhearsion+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Adhearsion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adhearsion+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ben Langfeld

unread,
Aug 18, 2013, 12:19:39 PM8/18/13
to Neeraj Nagi, adhea...@googlegroups.com
Support was added in the Rayo spec (https://github.com/rayo/xmpp/pull/71) for a platform-specific end reason code, and support was also added to the Punchblock model layer (https://github.com/adhearsion/punchblock/commit/c7e972f88f0e69f55c27d2c8f0a27e68b109d5d7). All that remains is to modify the Asterisk code to pass this up and it will be available in Adhearsion.

Ben Langfeld

unread,
Aug 18, 2013, 12:28:31 PM8/18/13
to Neeraj Nagi, adhea...@googlegroups.com
I added the last bit to Punchblock here: https://github.com/adhearsion/punchblock/commit/228debef425b775cc764f8233912d519c223e09e

Please let me know how this works out for you.
Reply all
Reply to author
Forward
0 new messages