[Asterisk-Dev] asterisk api question

Juraj Bednar jooray at gmail.com
Sun Jul 24 05:45:32 MST 2005


Hello,


   I am developing a custom application based on Asterisk CVS HEAD. I
need to send a SIP MESSAGE to the registered SIP user. How does one
allocate a channel? The user is not doing a call, but is registered. I
know his ID (SIP/username). ast_get_channel_by_name_locked returns
null, since there's no connection to the client. I tried ast_request
and sip_request, but when I do this, I get

Jul 24 14:35:30 NOTICE[21826]: chan_sip.c:3504 copy_header: No field
'Call-ID' present to copy
Jul 24 14:35:42 WARNING[21826]: chan_sip.c:1121 retrans_pkt: Maximum
retries exceeded on call 0dffd550288af01754ea542951a48ccf at 192.168.1.1
for seqno 102 (Non-critical Request)


    I would like to ask -- in general -- how do I allocate a
ast_channel, so I can send a particular request to the named client?

    Is there any API documentation besides what is generated from
source? Or any introductory documentation?

     I was also looking at the sendtext application, but it sends text
only to the existing channel. I only have a registered client, to
which I want to send a message.

     Any ideas, pointers to similiar code welcome...

       Thanks,

         Juraj.



More information about the asterisk-dev mailing list