[Home]

Summary:ASTERISK-17506: [patch] chan_sip.c with a out-f-call message
Reporter:Alexander Kozyrew (ded)Labels:
Date Opened:2011-03-03 10:03:43.000-0600Date Closed:2011-07-26 09:59:54
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/NewFeature
Versions:1.8.4 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) chan_sip.c.diff
( 1) chan_sip.c.patch
Description:<patch removed>

****** ADDITIONAL INFORMATION ******

chan_sip.c source from Russel Bryant branch

svn co http://svn.digium.com/svn/asterisk/team/russell/messaging/
asterisk_with_message
Comments:By: Russell Bryant (russell) 2011-03-03 10:13:18.000-0600

Can you please add the patch as an attachment?  It must be done that way to ensure that it is covered by a contributor license agreement.  See the "Sign License" link at the top of the page.

By: Alexander Kozyrew (ded) 2011-03-03 10:15:17.000-0600

No any "Sign License" link at the top of the page.

By: ddkprog (ddkprog) 2011-03-05 05:52:36.000-0600

>russell

at function
sip_msg_send(const struct ast_msg *msg, const char *to, const char *from)

SendMessage not work, becouse not set the 'To' as field 'todnid'
and not show 'From' on the client, becouse not set field 'fromuser' and 'fromname'

  ast_string_field_set(pvt, todnid, to);
  ast_string_field_set(pvt, fromuser, user);
  ast_string_field_set(pvt, fromname, name);



By: ddkprog (ddkprog) 2011-03-07 14:26:23.000-0600

how i can delete my file? i want upload new

By: Alexander Kozyrew (ded) 2011-03-08 04:43:35.000-0600

Syntax is

extensions.conf:

exten => _sip:.,1,MessageSend(${MESSAGE(to):0:7},${MESSAGE(from)})

By: ddkprog (ddkprog) 2011-03-10 13:53:01.000-0600

>russell

you seem to have forgot fill the Via header

use build_via(pvt); in function sip_msg_send

By: Alexander Kozyrew (ded) 2011-06-02 04:50:28

russell, please include the line

use build_via(pvt); in function sip_msg_send

for correct Via: header in sip_msg_send function. I hope that patch.file of them is not necessary in this case.
We was discover this bug when tested messages with Linphone (linphone.org).

The maintainer of Linphone was wrote me:
[quote]Thank you for the suggestion of sending message to itself, it indeed reproduces the problem perfectly.

The reason why linphone is unable to send an answer is the incorrect Via header provided by the server:
Via: SIP/2.0/UDP 127.0.0.1:0;branch=z9hG4bK082a0561

Apparently the "0" port number confuses the SIP stack (eXosip2) and it's not fixing it with rport.
Then eXosip2 fails to send the answer, and discards the transaction. As the transaction is discarded, further retransmissions are seen as as new messages, which explains why message appear 7 times.

Conclusion: one small server bug + one small client bug = a real bug.

Simon[/quote]



By: Terry Wilson (twilson) 2011-06-23 18:40:55.315-0500

I have added build_via(p) to the transmit_message_with_msg() function since other functions like transmit_invite build the via there.

Is this change sufficient to close this issue for you?

By: Alexander Kozyrew (ded) 2011-06-24 18:43:03.912-0500

Hm-m, where I can find that changes? Cannot discover any Via func in svn trunk.

By: Terry Wilson (twilson) 2011-06-27 19:07:54.757-0500

I accidentally committed it to russell's messaging branch instead of trunk. Should be fixed now.

By: Terry Wilson (twilson) 2011-07-26 09:58:41.171-0500

I'm going to assume that that took care of things.