[asterisk-dev] REFER too soon?

Dennis Buteyn dennis.buteyn at xorcom.com
Thu Aug 29 05:45:12 CDT 2019


Been trying to perform a blind transfer for hours with a SIP client I'm 
developing (using Sofia). Every time I sent a REFER request, Asterisk 
would respond with 202, followed by a NOTIFY containing the ominous 
phrase "503 Service Unavailable (can't handle one-legged xfers)".

At first, I thought maybe my SDP isn't good enough. So I copied some 
Zoiper SDP. Nope, still receive 503.

So I turned Asterisk debug and verbose up to 11 and went caving in 
Asterisk sources. As far as I could tell, it was 
ast_bridge_transfer_blind that failed.

Then it hit me... maybe the transfer failed because the bridge hasn't 
been created yet? Maybe I'm sending my REFER too soon?

So I added a sleep(1) just before sending my REFER... success?!?

Now, obviously sleep(1) isn't a good solution and I don't recall a 
minimum required delay in the specs. Should I wait for the first RTP 
packet to arrive? Is this a bug? I'm confused.

-- 
Dennis Buteyn
Xorcom Ltd




More information about the asterisk-dev mailing list