I am trying to implement an RFC 6910 based application using Asterisk,
It provides a “completion of calls” feature defined in this specification that allows the caller of a failed call to be notified when the callee becomes available to receive a call.
in general, it’s called busy call back,
Eg: User_A in PBX(A) dials to User_B in PBX(B), User A gets a busy tone/message if user b is busy with a call then User_A press a specific key (DTMF) to set the callback. whenever the User_A finishes his call the PBX(A) dialls to User_A and User_B automatically and connect together.
Please let me know if anyone has done the above before already, or kindly support me to do the above task.
Please refer below basic concept I am planning to do,
in my scenario, I have a Proprietary PBX that works in RFC6910 and I need to connect an Asterisk to get the above feature done.
My Concept,
Asterisk PBX --------- SIP with RFC6910------> - Proprietary PBX -
Since the Asterisk does not support RFC6910, I am trying to write an AGI Script to send and receive the RFC6910 based massagers listed below,
In coming Call
Send “486 Busy Here” (If Asterisk side User is busy)
Session Initiation Protocol (486)
Status-Line: SIP/2.0 486 Busy Here
Status-Code: 486
Receive “SUBSCRIBE” if User_A press DTMF and store it in a database,
CSeq: 1 SUBSCRIBE
Sequence Number: 1
Method: SUBSCRIBE
Send 200 OK after receiving “SUBSCRIBE”
CSeq: 2 PRACK
Sequence Number: 2
Method: PRACK
Asterisk doesn’t provide low level access to such things, it’s not a SIP stack or low level SIP server. The chan_sip module does have support for call completion stuff, I don’t know if it’s the specific RFC, and it also hasn’t been touched in years. The chan_pjsip module does not have this support.
there seems to be a generic mode, which uses dialled numbers, and looks to me should work on any channel type, and a native mode, which could, but might not implement the RFC, for SIP, and is only available for certain channel types.
Also note that returning 486 on BUSY is normal behaviour and not conditional on call completion services, although you may find the definition of BUSY is quite narrow.
The details under your step 3 of the protocol look wrong.
I’d agree that implementing the RFC from scratch is something that could only be implemented within the channel driver, and is therefore outside the scope of this forum.
As per the trace, After the call gets answered (200 OK) if the extension is busy then the server sends 486 with the following information inside,
Call-Info: sip:4003@10.40.82.230;user=phone;tgrp=2;trunk-context=mxone-1;purpose=call-completion;m=BS
Then the Caller can dial the DTMF since it’s an answered call,
Can’t we do the above using AGI file? please sugest and help
As per the last point in your answer, can I get the status of the extension (Busy or available) using “channel driver” through SIP Trunk? if yes kindly share any sample coding
That doesn’t make sense. Extensions are neither internal nor external. Did you mean directly connected devices. Asterisk can only monitor device state on directly connected devices. That isn’t limited to Asterisk, as there is no way of testing the state of PSTN number other than actually calling it.
Asterisk doesn’t support SIP for remote presence, and, in any case, no ITSP is going to provide it, partly because the PSTN doesn’t support it.
The only sensible interpretation of this is the machine running Asterisk, which can, of course run other software. Asterisk is a daemon and acts as both server and client for SIP, and, for example is a client when sending NOTIFY.