1 Index: channels/chan_sip.c |
1 Index: channels/chan_sip.c |
2 diff -Nau channels/chan_sip.c.orig channels/chan_sip.c |
2 diff -Nau channels/chan_sip.c.orig channels/chan_sip.c |
3 --- channels/chan_sip.c.orig 2011-01-14 18:32:52.000000000 +0100 |
3 --- channels/chan_sip.c.orig 2011-05-23 17:35:28.358543497 +0200 |
4 +++ channels/chan_sip.c 2011-03-13 14:32:58.000000000 +0100 |
4 +++ channels/chan_sip.c 2011-05-23 17:57:05.948534524 +0200 |
5 @@ -27854,6 +27854,7 @@ |
5 @@ -28144,6 +28144,7 @@ |
6 \todo Fix this function so that we wait for reply to the REFER and |
6 \todo Fix this function so that we wait for reply to the REFER and |
7 react to errors, denials or other issues the other end might have. |
7 react to errors, denials or other issues the other end might have. |
8 */ |
8 */ |
9 +/* MSvB: Paramater dest may be SIPS encoded, having '@' before domain */ |
9 +/* MSvB: Paramater dest may be SIPS encoded, having '@' before domain */ |
10 static int sip_sipredirect(struct sip_pvt *p, const char *dest) |
10 static int sip_sipredirect(struct sip_pvt *p, const char *dest) |
11 { |
11 { |
12 char *cdest; |
12 char *cdest; |
13 @@ -27862,7 +27863,7 @@ |
13 @@ -28152,7 +28153,7 @@ |
14 cdest = ast_strdupa(dest); |
14 cdest = ast_strdupa(dest); |
15 |
15 |
16 extension = strsep(&cdest, "@"); |
16 extension = strsep(&cdest, "@"); |
17 - domain = strsep(&cdest, ":"); |
17 - domain = strsep(&cdest, ":"); |
18 + domain = strsep(&cdest, ":"); /* MSvB: Could begin with '@' if SIPS */ |
18 + domain = strsep(&cdest, ":"); /* MSvB: Could begin with '@' if SIPS */ |
19 if (ast_strlen_zero(extension)) { |
19 if (ast_strlen_zero(extension)) { |
20 ast_log(LOG_ERROR, "Missing mandatory argument: extension\n"); |
20 ast_log(LOG_ERROR, "Missing mandatory argument: extension\n"); |
21 return 0; |
21 return 0; |
22 @@ -27894,7 +27895,14 @@ |
22 @@ -28184,7 +28185,14 @@ |
23 } |
23 } |
24 } |
24 } |
25 |
25 |
26 - ast_string_field_build(p, our_contact, "Transfer <sip:%s@%s>", extension, domain); |
26 - ast_string_field_build(p, our_contact, "Transfer <sip:%s@%s>", extension, domain); |
27 + if (domain && *domain == '@') { |
27 + if (domain && *domain == '@') { |