[asterisk-bugs] [JIRA] (ASTERISK-24488) Wrong remote identity and target in dialog package XML in NOTIFY

LTCtech (JIRA) noreply at issues.asterisk.org
Mon Oct 31 19:10:11 CDT 2016


    [ https://issues.asterisk.org/jira/browse/ASTERISK-24488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=233200#comment-233200 ] 

LTCtech commented on ASTERISK-24488:
------------------------------------

This is still an issue in 13.12.1. It seems that it can't find the ringing channel, callee is null, and the fields never get populated. The bug is probably somewhere else entirely thus tough to find. I did a diff against 11.6cert15 and neither find_ringer_channel nor state_notify_build_xml were modified.

{code}
callee = find_ringing_channel(data->device_state_info, p);
				if (callee) {
					static char *anonymous = "anonymous";
					static char *invalid = "anonymous.invalid";
					char *cid_num;
					char *connected_num;
					int need;
					int cid_num_restricted, connected_num_restricted;

					ast_channel_lock(callee);

					cid_num_restricted = (ast_channel_caller(callee)->id.number.presentation &
								   AST_PRES_RESTRICTION) == AST_PRES_RESTRICTED;
					cid_num = S_COR(ast_channel_caller(callee)->id.number.valid,
							S_COR(cid_num_restricted, anonymous,
							      ast_channel_caller(callee)->id.number.str), "");

					need = strlen(cid_num) + (cid_num_restricted ? strlen(invalid) :
								  strlen(p->fromdomain)) + sizeof("sip:@");
					local_target = ast_alloca(need);

					snprintf(local_target, need, "sip:%s@%s", cid_num,
						 cid_num_restricted ? invalid : p->fromdomain);

					ast_xml_escape(S_COR(ast_channel_caller(callee)->id.name.valid,
							     S_COR((ast_channel_caller(callee)->id.name.presentation &
								     AST_PRES_RESTRICTION) == AST_PRES_RESTRICTED, anonymous,
								   ast_channel_caller(callee)->id.name.str), ""),
						       local_display, sizeof(local_display));

					connected_num_restricted = (ast_channel_connected(callee)->id.number.presentation &
								    AST_PRES_RESTRICTION) == AST_PRES_RESTRICTED;
					connected_num = S_COR(ast_channel_connected(callee)->id.number.valid,
							      S_COR(connected_num_restricted, anonymous,
								    ast_channel_connected(callee)->id.number.str), "");

					need = strlen(connected_num) + (connected_num_restricted ? strlen(invalid) :
									strlen(p->fromdomain)) + sizeof("sip:@");
					remote_target = ast_alloca(need);

					snprintf(remote_target, need, "sip:%s@%s", connected_num,
						 connected_num_restricted ? invalid : p->fromdomain);

					ast_xml_escape(S_COR(ast_channel_connected(callee)->id.name.valid,
							     S_COR((ast_channel_connected(callee)->id.name.presentation &
								     AST_PRES_RESTRICTION) == AST_PRES_RESTRICTED, anonymous,
								    ast_channel_connected(callee)->id.name.str), ""),
						       remote_display, sizeof(remote_display));

					ast_channel_unlock(callee);
					callee = ast_channel_unref(callee);
				}
{code}

> Wrong remote identity and target in dialog package XML in NOTIFY
> ----------------------------------------------------------------
>
>                 Key: ASTERISK-24488
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24488
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/General, Core/General
>    Affects Versions: SVN, 13.1.0
>            Reporter: Alejandro Padilla
>         Attachments: issue_24488_full_log, sip_casa.conf, sip.conf
>
>
> [Edit by Rusty - This issue is seen with devices that subscribe to the RFC4235 Dialog event package]
> Hi, i had installed the new version asterisk 13.0.0 , and i found a issue on xml-info send to the phones on extensions monitoring.
> In this example the extension 1080 are calling  to extension  1002 
> im monitoring the 1002 extension with blf and snom phone with other extension, and now i received this xml:
> {noformat}
> ?xml version="1.0"?>
> <dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="9" state="full" entity="sip:1002 at pbx.casa.local">
> <dialog id="1002" call-id="pickup-080f0000be77-dq09hphbjmcr" local-tag="pndu3ilpwj" remote-tag="as03ca48d8" direction="recipient">
> <remote>
> <identity display="1002">sip:1002 at pbx.casa.local</identity>
> <target uri="sip:1002 at pbx.casa.local"/>
> </remote>
> <local>
> <identity display="1002">sip:1002 at pbx.casa.local</identity>
> <target uri="sip:1002 at pbx.casa.local"/>
> </local>
> <state>early</state>
> </dialog>
> </dialog-info>
> {noformat}
> In before version of asterisk and same configuration im receiving this:
> {noformat}
> ?xml version="1.0"?>
> <dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="13" state="full" entity="sip:1 at pbx.casa.local">
> <dialog id="1" call-id="pickup-0d100000a26a-r4fxlunt57hh" local-tag="we84z74osq" remote-tag="as78081848" direction="recipient">
> <remote>
> <identity display="tel760">sip:1080 at pbx.casa.local</identity>
> <target uri="sip:1080 at pbx.casa.local"/>
> </remote>
> <local>
> <identity display="tel870">sip:1002 at pbx.casa.local</identity>
> <target uri="sip:1002 at pbx.casa.local"/>
> </local>
> <state>early</state>
> </dialog>
> </dialog-info>
> {noformat}
> I have this on sip.conf on both servers asterisk 11 and asterisk 13:
> {noformat}
> notifycid=ignore-context
> trustrpid=no
> sendrpid=yes
> {noformat}
> Regards



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list