[asterisk-dev] [svn-commits] jrose: trunk r371889 - in /trunk: UPGRADE.txt channels/chan_sip.c

Olle E. Johansson oej at edvina.net
Thu Aug 30 03:05:50 CDT 2012


29 aug 2012 kl. 21:38 skrev SVN commits to the Digium repositories <svn-commits at lists.digium.com>:

> Author: jrose
> Date: Wed Aug 29 14:38:52 2012
> New Revision: 371889
> 
> URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=371889
> Log:
> chan_sip: Change manager event to confirm SIPqualifypeer into an ack
> 
> Matt Jordan  informed me that it was more appropriate to use an
> astman_send_ack here instead of making an event response. I've also
> used this opportunity to update UPGRADE.txt to mention this change
> in behavior.

Well, if you look at the action/response logic it's correct, but then we need to make
it asynchrous like originate. Otherwise you can block the manager for new actions
for a very long time.

1. Action
2. Response - "will do"
3. Event with result

The SIP OPTIONS with retransmits may take a long time to complete.

/O

> 
> (issue AST-969)
> Reported by: John Bigelow
> 
> Modified:
>    trunk/UPGRADE.txt
>    trunk/channels/chan_sip.c
> 
> Modified: trunk/UPGRADE.txt
> URL: http://svnview.digium.com/svn/asterisk/trunk/UPGRADE.txt?view=diff&rev=371889&r1=371888&r2=371889
> ==============================================================================
> --- trunk/UPGRADE.txt (original)
> +++ trunk/UPGRADE.txt Wed Aug 29 14:38:52 2012
> @@ -92,6 +92,8 @@
>     the DBDel action does.
>   - The IAX2 PeerStatus event now sends a 'Port' header.  In Asterisk 10, this was
>     erroneously being sent as a 'Post' header.
> +  - The SIP SIPqualifypeer action now receives an appropriate response when it
> +    is completed successfully. It also no longer sends extra blank lines afterwards.
> 
> CCSS:
>  - Macro is deprecated. Use cc_callback_sub instead of cc_callback_macro
> 
> Modified: trunk/channels/chan_sip.c
> URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=371889&r1=371888&r2=371889
> ==============================================================================
> --- trunk/channels/chan_sip.c (original)
> +++ trunk/channels/chan_sip.c Wed Aug 29 14:38:52 2012
> @@ -18934,14 +18934,6 @@
> 	struct sip_peer *peer;
> 	int load_realtime;
> 
> -	const char *id = astman_get_header(m,"ActionID");
> -	char idText[256] = "";
> -
> -	if (!ast_strlen_zero(id)) {
> -		snprintf(idText, sizeof(idText), "ActionID: %s\r\n", id);
> -	}
> -
> -
> 	if (argc < 4)
> 		return CLI_SHOWUSAGE;
> 
> @@ -18958,11 +18950,7 @@
> 	}
> 
> 	if (type != 0) {
> -		astman_append(s,
> -		"Event: SIPqualifypeerComplete\r\n"
> -		"%s"
> -		"\r\n",
> -		idText);
> +		astman_send_ack(s, m, "Qualify Peer successful");
> 	}
> 
> 	return CLI_SUCCESS;
> 
> 
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> 
> svn-commits mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/svn-commits

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2307 bytes
Desc: not available
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120830/2e102eba/attachment.bin>


More information about the asterisk-dev mailing list