[asterisk-commits] russell: branch russell/sla_rewrite r52746 - /team/russell/sla_rewrite/channels/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Jan 29 17:06:13 MST 2007


Author: russell
Date: Mon Jan 29 18:06:12 2007
New Revision: 52746

URL: http://svn.digium.com/view/asterisk?view=rev&rev=52746
Log:
(Theoretically) Add support for indicating to a SIP phone that a line is
 on hold.

Thanks to oej for the help!

Modified:
    team/russell/sla_rewrite/channels/chan_sip.c

Modified: team/russell/sla_rewrite/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/russell/sla_rewrite/channels/chan_sip.c?view=diff&rev=52746&r1=52745&r2=52746
==============================================================================
--- team/russell/sla_rewrite/channels/chan_sip.c (original)
+++ team/russell/sla_rewrite/channels/chan_sip.c Mon Jan 29 18:06:12 2007
@@ -6857,6 +6857,10 @@
 		pidfnote = "Unavailable";
 		break;
 	case AST_EXTENSION_ONHOLD:
+		statestring = "confirmed";
+		local_state = NOTIFY_INUSE;
+		pidfstate = "busy";
+		pidfnote = "On the phone";
 		break;
 	case AST_EXTENSION_NOT_INUSE:
 	default:
@@ -6952,6 +6956,11 @@
 		else
 			ast_build_string(&t, &maxbytes, "<dialog id=\"%s\">\n", p->exten);
 		ast_build_string(&t, &maxbytes, "<state>%s</state>\n", statestring);
+		if (state == AST_EXTENSION_ONHOLD) {
+			ast_build_string(&t, &maxbytes, "<local>\n<target uri=\"%s\">\n"
+			                                "<param pname=\"sip.rendering\" pvalue=\"no\">\n"
+			                                "</target>\n</local>\n", mto);
+		}
 		ast_build_string(&t, &maxbytes, "</dialog>\n</dialog-info>\n");
 		break;
 	case NONE:



More information about the asterisk-commits mailing list