Re: [OpenSIPS-Users] Drop the call from onreply_route with cause code

2022-06-17 Thread Mehdi Shirazi
Thanks Ben for your reply.
It seems there is one way to cancel initiated call from reply_route:

onreply_route[3] {
...
if ($hdr(User-Agent)=~"Snom") {
# drop calls involving snom UA
t_cancel_branch();
}
...
}

Regards
M.Shirazi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Drop the call from onreply_route with cause code

2022-06-16 Thread Mehdi Shirazi
*Hi Alexey*

*Thanks for the reply, so how can we read a reply message(even outside
reply_route) and based on the information in it, decide to send a
reply with special cause code and terminate the initiated call ? *

Regards

M.Shirazi

>Hi Mehdi,

>onreply_route [1] is used not for generating replies by your OpenSIPS,
>it it used for actions to be taken for SIP replies which are going towards 
>OpenSIPS
>from other VoIP entities.

>To drop a call with some code you may use these functions:

>sl_send_reply();[2]
>send_reply(); [3]

>but according to the documentation neither of them can be used from 
>onreply_route.

>>Hi

>>How can we disconnect a call from on reply_route with a cause value ?
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Drop the call from onreply_route with cause code

2022-06-15 Thread Mehdi Shirazi
Hi
How can we disconnect a call from on reply_route with a cause value ?

Regards
M.Shirazi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] SQL Cacher+Galera Cluster

2022-05-18 Thread Mehdi Shirazi
Hi
I plan to use SQL Cacher with Galera Cluster. After a record changes I want
to update the cache. Using standard triggers in mariadb is not possible to
run opensips-cli commands.
Please tell me your suggestions for the best approach.

Regards
M.Shirazi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] SQL Cacher full caching auto reload specific key

2022-03-21 Thread Mehdi Shirazi
Hi
I use SQL Cacher in full caching mode. when the database changes I want to
automatically reload that specific key.
What is your suggestions for this?
With Mariadb trigger I cannot use system commands to reload that specific
key. Only way is using pooling method of changed records and use
sql_cacher_reload
?

Regards
Shirazi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] rtpengine_play_media

2020-09-08 Thread Mehdi Shirazi
Hi
Is *rtpengine_play_media* a blocking function and has scaling problem ?

Regards
M.Shirazi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opensips 3.1 Play Media

2020-05-19 Thread Mehdi Shirazi
Hi Dhaval
Usually for using rtpengine_play_media we need A and B party,B party
generates Reply and SDP.

If you want to omit B party you should generate Reply and SDP inside
script. please see the workaround mentioned here[1]

and also this feature request[2].
[1] https://github.com/sipwise/rtpengine/issues/870

[2] https://github.com/OpenSIPS/opensips/issues/1996

I do not know exact final script but working on it.

Regards
Shirazi

>Hi All,

>I was trying to play with the 3.1 feature specifically media handling
>capabilities.
>I want opensips act as a playing server by answering WebRTC based calls.

>Here is a scenario I was trying to do.

>-- Opensips will receive WSS call
>-- Process the call
>-- Play file with 200 OK
>-- Sending to Voicemail (recording of file using rtpengine recording module)
>-- Hangup call by caller or hangup after some time.

>Here is sample routing I plan to develop. I tried it is not working as 200
>OK is not generated with SDP.

>route[VOICEMAIL]{
>   xlog("Receiving voicemail");
>$var(rtpengine_flags) = "trust-address replace-origin
>replace-session-connection rtcp-mux-offer ICE=force transcode-PCMU
>transcode-G722 SDES-off UDP/TLS/RTP/SAVP";
>rtpengine_offer("$var(rtpengine_flags)");
>rtpengine_start_recording();
>append_to_reply("Contact:  >\r\n");

>rtpengine_answer("$var(rtpengine_flags)");
>t_reply(200, "Ok");
>rtpengine_play_media("file=/etc/opensips/sounds/vm-isunavail.wav");
>xlog("waiting for voicemail to be recorded");
>sleep(30);
>exit;
>}

>I want to know how this will be possible? Don't consider Asterisk and
>Free-switch as a media server.

>Any help suggestion would be appreciated.

>--

>Best Regards,

>*Dhaval Indrodiya*
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] [BLOG] Real-Time Rating and Cost Based Routing in OpenSIPS 3.1

2020-04-09 Thread Mehdi Shirazi
Hi
Thanks for new features.
Is it possible(or planed) to use this module for basic prepaid billing ?

Regards
M.Shirazi

>While there are numerous external rating and billing engines available
>in the wild, having a quick and easy way of putting a price for a call,
>without relying on external applications, can be a valuable asset to have.
>https://blog.opensips.org/2020/04/07/real-time-rating-and-cost-based-routing-in-opensips-3-1/
> 
>

>Thank you Vlad Paiu for the valuable contribution and post !

>Best Regards,

>Bogdan-Andrei Iancu
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] OpenSIPS 3.1 Media Bridging Feature

2020-02-08 Thread Mehdi Shirazi
Hi
Not sure this is in scope of new module ... with rtpengine_play_medi added
in 3.1 it is possible to play media to one of the endpoints, but I like to
use Opensips+rtpengine as an end point playing music for caller. it seems
now there is need for some signaling generated from Opensips (like 183...)
to make it possible to use this function when there is no B party.

Regards
M.Shirazi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Using t_new_request for generating Register

2019-12-20 Thread Mehdi Shirazi
Hi
As recommended bogdan here[1] I want to use t_new_request for generating
Register message.
How I can add headers like Contact to new generated message ?
Is it ok to use it on onreply_route? According to my tests in this route
using force_send_socket befor t_new_request do not change socket.

Regards
M.Shirazi
[1]:https://opensips.org/pipermail/users/2016-February/033874.html
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Sending Register with t_uac_dlg

2019-12-06 Thread Mehdi Shirazi
Hi
Could you please help me with me with a sample of Sending Register message
with t_uac_dlg ?

Regards
M.Shirazi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Save custom usrloc without register

2019-11-30 Thread Mehdi Shirazi
Hi David !
Tank you for answer.
Is there any way to do similar function of opensips-cli mi ul_add... from
opensips.cfg ?

Regards
M.Shirazi

>You can use kamctl

>Kamctl ul add

>Or

>Kamctl rpc ul.add

>Check out the help

>Hope that helps

>David
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Save custom usrloc without register

2019-11-30 Thread Mehdi Shirazi
Hi
Is it possible to make a custom usrloc and save it without register message
?

Regards.Shirazi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] opensip 3.1 rtpengine_play_media

2019-11-04 Thread Mehdi Shirazi
Hi
I used :
   $var(Session_owner) = $rb[1];
append_to_reply("Content-Type:
application/sdp\r\nv=0\r\n$var(Session_owner)\r\ns=call\r\nc=IN IP4
10.105.80.3\r\nt=0 0\r\nm=audio 61896 RTP 0 8 3 101\r\na=rtpmap:0
gsm/8000\r\na=rtpmap:8 pcma/8000\r\na=rtpmap:3 gsm/8000\r\na=rtpmap:101
telephone-event/8000\r\na=fmtp:101 0-16\r\na=ptime:20\r\na=sendrecv\r\n");
t_reply_with_body(183, "Session Progress",
"$var(body)");
for making a 183 reply but still play media do not works.
Any comments?
Regards
M.Shirazi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] opensip 3.1 rtpengine_play_media

2019-11-04 Thread Mehdi Shirazi
Hi
I am trying to use rtpengine_play_media in opensips 3.1
If I use :
if (is_method("INVITE") && !has_totag())
rtpengine_play_media("file=/path/to/ringback_tone_file.wav");

I receive error about no call ID. If I add
rtpengine_manage(); before rtpengine_play_media functions it

seems(in logs) rtpengine side is ok but still cannot hear wav file.

I should also send 183/sdp myself or it is automatic?

Is it possible to provide a working sample of playing a file for all
incoming calls?

Regards

M.Shirazi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Opensips 3.0 load display

2019-09-29 Thread Mehdi Shirazi
Hi
I use Opensips3.0 as simple stateless proxy.I want to see how many Invites
per second was processed. I used :
(opensips-cli): mi get_statistics load:
But all results are zero.Am I doing something wrong ?

Regards
M.Shirazi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] sql_cacher with cachedb_local

2019-09-21 Thread Mehdi Shirazi
Hi
Is there a way to see content of sql_cacher loaded inside of cachedb_local
with "mi cache_fetch" command ?

Regards

M.Shirazi


On Mon, Sep 16, 2019 at 6:23 PM Mehdi Shirazi  wrote:

> Hi
> Thanks for reply.
> inside main route it was working ok but inside startup_route (2.4.6 and
> 3.0) not working.
> Regards
> M.Shirazi
>
> On Thu, Sep 12, 2019 at 8:16 PM Bogdan-Andrei Iancu 
> wrote:
>
>> HI Mehdi,
>>
>> Do you get that error only when using it from startup_route ?
>>
>> Also, try to change the cachedb_url to "local:///collection2"
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>>
>> OpenSIPS Founder and Developer
>>   https://www.opensips-solutions.com
>> OpenSIPS Summit 2019
>>   https://www.opensips.org/events/Summit-2019Amsterdam/
>>
>> On 8/30/19 10:12 AM, Mehdi Shirazi wrote:
>>
>> Hi
>> Please help me configuring sql_cacher.
>> I use Opensips 2.4.6 .
>> modparam("cachedb_local", "cachedb_url", "local:group2:///collection2")
>> modparam("sql_cacher", "cache_table",
>> "id=st_caching
>> db_url=mysql://opensips:1234ms@localhost/opensips
>> cachedb_url=local:group2:///collection2
>> table=STrig
>> key=number
>> columns=cause")
>> startup_route {
>> xlog("The cause is $sql_cached_value(st_caching:cause:88443322)");
>> }
>> in log:
>> ERROR:sql_cacher:get_rld_vers_from_cache: Failed to get reload version
>> integer from cachedb
>> ERROR:sql_cacher:pv_get_sql_cached_value: Error fetching from cachedb
>>
>> Regards
>> M.Shirazi
>>
>>
>> ___
>> Users mailing 
>> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] sql_cacher with cachedb_local

2019-09-16 Thread Mehdi Shirazi
Hi
Thanks for reply.
inside main route it was working ok but inside startup_route (2.4.6 and
3.0) not working.
Regards
M.Shirazi

On Thu, Sep 12, 2019 at 8:16 PM Bogdan-Andrei Iancu 
wrote:

> HI Mehdi,
>
> Do you get that error only when using it from startup_route ?
>
> Also, try to change the cachedb_url to "local:///collection2"
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS Summit 2019
>   https://www.opensips.org/events/Summit-2019Amsterdam/
>
> On 8/30/19 10:12 AM, Mehdi Shirazi wrote:
>
> Hi
> Please help me configuring sql_cacher.
> I use Opensips 2.4.6 .
> modparam("cachedb_local", "cachedb_url", "local:group2:///collection2")
> modparam("sql_cacher", "cache_table",
> "id=st_caching
> db_url=mysql://opensips:1234ms@localhost/opensips
> cachedb_url=local:group2:///collection2
> table=STrig
> key=number
> columns=cause")
> startup_route {
> xlog("The cause is $sql_cached_value(st_caching:cause:88443322)");
> }
> in log:
> ERROR:sql_cacher:get_rld_vers_from_cache: Failed to get reload version
> integer from cachedb
> ERROR:sql_cacher:pv_get_sql_cached_value: Error fetching from cachedb
>
> Regards
> M.Shirazi
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] sql_cacher with cachedb_local

2019-08-30 Thread Mehdi Shirazi
Hi
Please help me configuring sql_cacher.
I use Opensips 2.4.6 .
modparam("cachedb_local", "cachedb_url", "local:group2:///collection2")
modparam("sql_cacher", "cache_table",
"id=st_caching
db_url=mysql://opensips:1234ms@localhost/opensips
cachedb_url=local:group2:///collection2
table=STrig
key=number
columns=cause")
startup_route {
xlog("The cause is $sql_cached_value(st_caching:cause:88443322)");
}
in log:
ERROR:sql_cacher:get_rld_vers_from_cache: Failed to get reload version
integer from cachedb
ERROR:sql_cacher:pv_get_sql_cached_value: Error fetching from cachedb

Regards
M.Shirazi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users