Conferencing with REFER

Hi to all,

I am trying to use conferencing. My clients’ app (A party) calls B a C and then merges them with REFER and Accepted. But Asterisk after Accepted message, sends 2 NOTIFY immediately like below with “noresource” reason and then sends BYE. Any idea what can make this issue?

NOTIFY sip:9999999994@10.0.0.67:5060 SIP/2.0
Via: SIP/2.0/TCP 10.0.0.193:5060;rport;branch=z9hG4bKPjb9d30777-1240-4618-a4d5-5aea49aeeadc;alias
From: <sip:9999999995@10.0.0.67>;tag=94eb6faa-8c10-4b5c-a40b-342aa52342a4
To: "9999999994" <sip:9999999994@example.com>;tag=cc1e5322
Contact: <sip:10.0.0.193:5060;transport=TCP>
Call-ID: zXMCCBtUw6WlMfhfQi0caQ..@2001:56b:f:6ba:0:31:2cd5:a901
CSeq: 7705 NOTIFY
Route: <sip:10.0.0.67:37168;transport=TCP;lr>
Event: refer
Subscription-State: active;expires=600
Allow-Events: presence, dialog, message-summary, refer
Max-Forwards: 70
User-Agent: Asterisk PBX 18.6.0
Content-Type: message/sipfrag;version=2.0
Content-Length:    20

SIP/2.0 100 Trying
NOTIFY sip:9999999994@10.0.0.67:5060 SIP/2.0
Via: SIP/2.0/TCP 10.0.0.193:5060;rport;branch=z9hG4bKPjda9b607f-46ca-4601-a419-678706dbe5ad;alias
From: <sip:9999999995@10.0.0.67>;tag=94eb6faa-8c10-4b5c-a40b-342aa52342a4
To: "9999999994" <sip:18259990284@example.com>;tag=cc1e5322
Contact: <sip:10.0.0.193:5060;transport=TCP>
Call-ID: zXMCCBtUw6WlMfhfQi0caQ..@2001:56b:f:6ba:0:31:2cd5:a901
CSeq: 7706 NOTIFY
Route: <sip:10.0.0.67:37168;transport=TCP;lr>
Event: refer
Subscription-State: terminated;reason=noresource
Allow-Events: presence, dialog, message-summary, refer
Max-Forwards: 70
User-Agent: Asterisk PBX 18.6.0
Content-Type: message/sipfrag;version=2.0
Content-Length:    16

SIP/2.0 200 OK

There is no issue. This is normal behaviour. REFER will connect B to C and drop A out of the call.

Thanks for reply. Yes but I don’t know why A is terminated from the call.

That’s what REFER does!

A will send REFER B/ Replaces C’s leg to A.

Conceptually B sends INVITE C/Replaces C’s leg to A, forwards the replies from C, as NOTIFY, and then sends BYE A.

C sends OK to the INVITE, triggering the above, and BYE to A, to clear the leg being replaced.

I say conceptually, in the normal case, where Asterisk is handling both B and C, the last two paragraphs are handled internally by Asterisk.

If you want a conference, either the phone has to implement the bridge, in which case the only interaction with Asterisk will be to remove the hold on B, or you have to blind transfer B and C, separately to an extension that connects them to the conference, then, when A becomes free, it also dials into the conference.

I checked the pjsip logs again, and as you said, it puts B party into the room but when Asterisk receives second REFER for C party it responds 'Not Found". I checked the ‘Refer-To’ header and information there (Call-ID, to-tag, from-tag) corresponds with the original C party call.
So is there any idea? it might be a bug?

That’s how REFER/Replaces works. A bug like that wouldn’t have lasted for years and years.

If you want to move the parties to a conference on the PABX side, you must issue blind transfers to each individually. Blind transfers don’t have a Replaces parameter, so don’t have a call-id, from tag and to tag.

Are you referring to what RFC4579 is mentioning?

Yes, A party sends REFER for each leg (B and C) and transfers them to the conference room.