[SR-Users] xHTTP module.

Daniel-Constantin Mierla miconda at gmail.com
Fri May 20 15:51:11 CEST 2011



On 5/20/11 3:44 PM, David J. wrote:
> Thanks Daniel;
>
> What creates the Initial Dialog and REFER method
>
> Just calling
>
> dlg_bridge("sip:me at myproxy.com", "sip:you at yourproxy.com",
>    "sip:myproxy.com:5080");
>
>
>
> When I get an HTTP event;
not sure you ask something or not, but if you don't know where to handle 
the http request, then you have to define an event_route[xhttp:reques] 
block:

event_route[xhttp:request] {
    ...
}


Here is an example of using the embedded http server for implementing 
xcap handling for presence:
http://kb.asipto.com/kamailio:presence:k31-made-simple#configuration_file

This presentation I did at Fosdem 2011 shows also an example of using 
the internal http server:
http://www.kamailio.org/events/2011-fosdem/dcm-sip-web-lua.pdf

Practically, if you use GET, then the URL is in $hu variable, then use 
transformations to get your desired parameters.

Cheers,
Daniel

>
>
>
> On 5/20/11 9:32 AM, Daniel-Constantin Mierla wrote:
>> Hello,
>>
>> On 5/20/11 3:25 PM, David J. wrote:
>>> I was wondering if I can make an HTTP request to Kamailio;
>>> and then have kamailio do a lookup based on passed parameters
>>> to connect callers.
>>>
>>> I am trying to make a click-to-dial type application;
>>>
>>> I was looking at the HTTP server inside kamailio;
>>> It was interesting to me to try to use this as an alternative to 
>>> php-asterisk;
>>>
>>> (I know kamailio is not a full blown application server;)
>>>
>>> If anyone could help me with this I would appreciate it;
>> you can get the caller and callee from HTTP GET parameters and do 
>> click-to-dial (implemented with REFER) using dlg_bridge() function:
>> http://kamailio.org/docs/modules/stable/modules_k/dialog.html#id2966104
>>
>> Cheers,
>> Daniel
>>
>

-- 
Daniel-Constantin Mierla -- http://www.asipto.com
http://linkedin.com/in/miconda -- http://twitter.com/miconda




More information about the sr-users mailing list