Chris St Denis
2005-Sep-28 17:08 UTC
[Asterisk-Users] Problem redirecting to voicemail through a SIP proxy (Looks like a bug)
I'm having a problem redirecting to voicemail. This may be an asterisk bug I'm not sure, can somebody confirm? Network layout GATEWAY - Asterisk 1.0.8-BRIstuffed-0.2.0-RC8h connected to a PRI line. (Additionally patched with http://bugs.digium.com/view.php?id=2687) PROXY - Ser version: ser 0.9.3 (i386/freebsd) FEATURE - Asterisk 1.0.8-BRIstuffed-0.2.0-RC8h handling voicemail. GATEWAY---PROXY---FEATURE | | UA For simplicity, hostnames and IPs replaced with the above names. USERNAME, DSTNUM and SRCNUM also used to replace the UA's username, the source number of the call, and the destination number of the call. The basic SIP dialog goes: Gateway invites proxy proxy invites UA UA replies 180 Ringing. (Transaction times out and drops to failure route) PROXY invites FEATURE server (INVITE sip:*voicemail-busy-2002006@FEATURE:5060 SIP/2.0.) PROXY cancels UA FEATURE replies 200 ok to PROXY PROXY replies 200 ok to GATEWAY FEATURE replies 200 ok to PROXY PROXY replies 200 ok to GATEWAY UA tells PROXY '487 Request Terminated.' FEATURE replies 200 ok to PROXY PROXY replies 200 ok to GATEWAY ... For some reason, the asterisk gateway doesn't seem to be ACKing the 200 ok. I don't see any new invite or reinvite going to the gateway which I think may be what is confusing it. (I know this is the asterisk users list, but here is a Ser.cfg excerpt for anyone with experience with both. ) ## # User did not answer phone, or could not connect, or is on the phone and does not use call waiting. ## failure_route[3] { if(isflagset(10)) { if(t_check_status("486")) { if (!subst_user('/^/*voicemail-busy-/')){ log(1,"Err in subst_user\n"); } xlog("L_ERR", "Relaying to voicemail Busy\n"); } else { if (!subst_user('/^/*voicemail-noanswer-/')){ log(1,"Err in subst_user\n"); } xlog("L_ERR", "Relaying to voicemail No answer\n"); } rewritehostport("FEATURE:5060"); append_branch(); t_relay(); } }>From the gateway's point of view, the invite looks like1. U GATEWAY:5060 -> PROXY:5060 2. INVITE sip:DSTNUM@PROXY SIP/2.0. 3. Via: SIP/2.0/UDP GATEWAY:5060;branch=z9hG4bK6e117757. 4. From: "SRCNUM" <sip:SRCNUM@GATEWAY>;tag=as7f56ca42. 5. To: <sip:DSTNUM@PROXY>. 6. Contact: <sip:SRCNUM@GATEWAY>. 7. Call-ID: 372174c0757805861ab2dcaa54b52a97@GATEWAY. 8. CSeq: 102 INVITE. 9. User-Agent: Asterisk PBX. 10. Date: Tue, 20 Sep 2005 21:13:57 GMT. 11. Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER. 12. Content-Type: application/sdp. 13. Content-Length: 270. And the 200 ok looks like 1. U PROXY:5060 -> GATEWAY:5060 2. SIP/2.0 200 OK. 3. Via: SIP/2.0/UDP GATEWAY:5060;branch=z9hG4bK6e117757. 4. Record-Route: <sip:PROXY;ftag=as7f56ca42;lr>. 5. From: "SRCNUM" <sip:SRCNUM@GATEWAY>;tag=as7f56ca42. 6. To: <sip:DSTNUM@PROXY>;tag=as7f1b7210. 7. Call-ID: 372174c0757805861ab2dcaa54b52a97@GATEWAY. 8. CSeq: 102 INVITE. 9. User-Agent: Asterisk PBX. 10. Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER. 11. Contact: <sip:*voicemail-busy-USERNAME@FEATURE>. 12. Content-Type: application/sdp. 13. Content-Length: 270. See links these links for full sip dialog. Ngrep from PROXY's point of view http://pastebin.ca/23469 Ngrep from GATEWAY's point of view http://pastebin.ca/23470 Ngrep from FEATURE's point of view http://pastebin.ca/23471 _______________________________________________ Serusers mailing list Serusers@iptel.org http://mail.iptel.org/mailman/listinfo/serusers