[OpenSIPS-Users] opensips-cli dlg_end stuck in process

Liviu Chircu liviu at opensips.org
Thu Aug 27 18:56:22 EST 2020


On 27.08.2020 21:45, Vic Jolin wrote:
> shell_exec("/usr/local/bin/opensips-cli -x mi dlg_end_dlg 83719145016");

Hi Vic,

If you're going to program on top of OpenSIPS 3.0, you might as well do 
it the right way, by enabling the "httpd" + "mi_http" modules.  Once 
loaded, you will be able to talk to OpenSIPS via JSON-RPC, which I'm 
sure PHP has a lot of convenient ways to perform.  Here is a network 
capture of closing a dialog by Call-ID:

T 2020/08/27 21:52:49.833265 127.0.0.1:41286 -> 127.0.0.1:8888 [AP] #92
POST /mi HTTP/1.1.
Accept-Encoding: identity.
Content-Length: 112.
Host: 127.0.0.1:8888.
User-Agent: Python-urllib/3.6.
Content-Type: application/json.
Connection: close.
.


T 2020/08/27 21:52:49.833274 127.0.0.1:41286 -> 127.0.0.1:8888 [AP] #94
{"jsonrpc": "2.0", "id": "5287", "method": "dlg_end_dlg", "params": 
["Y2IwYjQ2YmE2ZDg5MWVkNDNkZGIwZjAzNGM1ZDY"]}

T 2020/08/27 21:52:49.833376 127.0.0.1:8888 -> 127.0.0.1:41286 [AP] #96
HTTP/1.1 200 OK.
Connection: close.
Content-Length: 89.
Content-Type: application/json.
Date: Thu, 27 Aug 2020 18:52:49 GMT.
.


T 2020/08/27 21:52:49.833387 127.0.0.1:8888 -> 127.0.0.1:41286 [AP] #98
{"jsonrpc":"2.0","error":{"code":404,"message":"Requested Dialog not 
found"},"id":"5287"}

Hope this helps,

-- 
Liviu Chircu
www.twitter.com/liviuchircu | www.opensips-solutions.com

OpenSIPS Summit 2020 Distributed
   www.opensips.org/events/Summit-2020Distributed




More information about the Users mailing list