[asterisk-dev] [Code Review] 2423: Pimp my SIP: Messaging

Mark Michelson reviewboard at asterisk.org
Mon Apr 8 10:32:17 CDT 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2423/#review8204
-----------------------------------------------------------



/team/group/pimp_my_sip/channels/chan_gulp.c
<https://reviewboard.asterisk.org/r/2423/#comment15833>

    The outbound auth support has been merged, so this won't compile any more. What you'll need to do instead is this:
    
    pjsip_tx_data *tdata;
    ast_sip_create_request("MESSAGE", data->session->inv_session->dlg, data->session->endpoint, &tdata);
    
    ast_sip_add_body(tdata, &body);
    
    ast_sip_send_request(tdata, data->session->inv_session->dlg, data->session->endpoint);



/team/group/pimp_my_sip/res/res_sip_messaging.c
<https://reviewboard.asterisk.org/r/2423/#comment15834>

    The outbound_auth work is now merged. If you change this call to ast_sip_send_request(), then you'll get the automatic behavior of having outbound authentication occur if the MESSAGE is challenged.
    
    The issue here is that, as far as I can tell you don't have a reference to an ast_sip_endpoint here. This means we can't get authentication credentials if the MESSAGE is challenged. So you'll need to figure out the intended ast_sip_endpoint that the message is being sent to (assuming that we are actually sending the message to a configured endpoint). I'd suggest looking at chan_gulp's request() function and look at how it determines the requested endpoint since the process should be very similar here.


- Mark Michelson


On April 2, 2013, 9:53 p.m., Kevin Harwell wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2423/
> -----------------------------------------------------------
> 
> (Updated April 2, 2013, 9:53 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-21076
>     https://issues.asterisk.org/jira/browse/ASTERISK-21076
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> Adds messaging support to the new SIP work being done in Asterisk.  Both out of call and in-dialog MESSAGE requests are handled.
> 
> 
> Diffs
> -----
> 
>   /team/group/pimp_my_sip/res/res_sip.c 384601 
>   /team/group/pimp_my_sip/res/res_sip_messaging.c PRE-CREATION 
>   /team/group/pimp_my_sip/res/res_sip_session.c 384601 
>   /team/group/pimp_my_sip/main/message.c 384601 
>   /team/group/pimp_my_sip/channels/chan_gulp.c 384601 
> 
> Diff: https://reviewboard.asterisk.org/r/2423/diff/
> 
> 
> Testing
> -------
> 
> Wrote/modified several tests for the testsuite that include tests for both out of call and in-dialog MESSAGE requests, custom header propagation, MessageSend with specified from parameter, and the AMI MessageSend action.
> 
> 
> Thanks,
> 
> Kevin Harwell
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130408/c4d3683f/attachment-0001.htm>


More information about the asterisk-dev mailing list