[OpenSIPS-Users] OpenSIPS Control Panel
Bogdan-Andrei Iancu
bogdan at opensips.org
Wed Oct 19 06:21:29 UTC 2022
Hi Nitesh,
Take a look at https://www.opensips.org/Documentation/Script-Routes-3-2
Best regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
https://www.opensips-solutions.com
OpenSIPS Bootcamp 5-16 Dec 2022, online
https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/
On 10/18/22 4:02 PM, Nitesh Divecha wrote:
> Bogdan-Andrei,
>
> Got it working! Much appreciated...
>
> By any chance can you guide me to any kind of OpenSIPS documentation
> explaining the "Routing Logic"? How does the "branch_route" work and
> what does it mean? Is this like a C/Python function/method which
> returns the value?
>
> Any guidance will be greatly appreciated.
>
> Cheers,
> Nitesh
>
>
>
> On Mon, Oct 17, 2022 at 2:53 AM Bogdan-Andrei Iancu
> <bogdan at opensips.org <mailto:bogdan at opensips.org>> wrote:
>
> Hi Nitesh,
>
> Do uac_replace_from( , "$avp(furi)");
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
> https://www.opensips-solutions.com <https://www.opensips-solutions.com>
> OpenSIPS Summit 27-30 Sept 2022, Athens
> https://www.opensips.org/events/Summit-2022Athens/ <https://www.opensips.org/events/Summit-2022Athens/>
>
> On 10/14/22 5:55 PM, Nitesh Divecha wrote:
>> Bogdan-Andrei,
>>
>> So I gave it a try and got error:
>>
>> Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22
>> [61003] 0.
>> /usr/local/etc/opensips/opensips_residential_2022-10-11.cfg
>> Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22
>> [61003] CRITICAL:core:yyerror: parse error in
>> /usr/local/etc/opensips/opensips_residential_2022-10-11.cfg:456:22-23:
>> too few param>
>> Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22
>> [61003] xlog("new branch at change_from $ru to $avp(furi)
>> Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: ");
>> Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22
>> [61003] if ($avp(furi) != NULL) {
>> Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22
>> [61003] uac_replace_from("$avp(furi)");
>> Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22
>> [61003] ^~
>> Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22
>> [61003] }
>> Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22
>> [61003] }
>>
>>
>> Here is my code:
>>
>> ### uac_registrant module
>> loadmodule "uac.so"
>> modparam("uac","restore_mode", "auto") #auto
>>
>>
>> ####### Routing Logic ########
>> # main request routing logic
>> route{
>> if (dp_translate(10 ,$rU ,$rU) ) {
>> $avp(furi) = "sip:1xxxxxxxxxx at gothamcity.com
>> <mailto:sip%3A1xxxxxxxxxx at gothamcity.com>";
>> #strip(1);
>>
>> if (!do_routing(0)) {
>> send_reply(500,"No PSTN Route found");
>> exit;
>> }
>>
>> t_on_branch("change_from");
>> route(relay);
>> exit;
>> }
>> }
>>
>> branch_route[change_from] {
>> xlog("new branch at change_from $ru to $avp(furi)\n");
>> if ($avp(furi) != NULL) {
>> uac_replace_from("$avp(furi)");
>> }
>> }
>>
>>
>> NOTE: This is my first time playing with C-style code... Trying
>> to learn what branches do/return, etc...
>>
>> Rest of the code is default residential cfg.
>>
>> Cheers,
>> Nitesh
>>
>>
>>
>>
>> On Thu, Oct 13, 2022 at 10:19 AM Nitesh Divecha
>> <aviator.nitesh.d at gmail.com <mailto:aviator.nitesh.d at gmail.com>>
>> wrote:
>>
>> Bogdan-Andrei,
>>
>> Thanks for your feedback...
>>
>> Yes, the remote SIP server expects FROM HEADER (Calling
>> Identity) in order to authenticate the caller to
>> make outbound calls.
>>
>> Where in cfg do I implement uac_replace_from() ? Is it in
>> Routing Logic or where modules are declared?
>>
>> Also what happens if multiple DID providers are implemented
>> in future? How will it affect the cfg file? Can we just
>> implement via Control Panel?
>>
>> Cheers,
>> Nitesh
>>
>>
>>
>>
>>
>> On Mon, Oct 10, 2022 at 9:42 AM Bogdan-Andrei Iancu
>> <bogdan at opensips.org <mailto:bogdan at opensips.org>> wrote:
>>
>> Hi Nitesh,
>>
>> In SIP, registration is done for receiving calls, it does
>> not impact sending calls. So, define the remote server as
>> GW in Dynamic Route and simply route the calls to it.
>> Note that maybe the remote server will expect you to use
>> the as FROM hdr (calling identity) the AOR (SIP address)
>> you are registering with, so maybe you should be an
>> uac_replace_from() in cfg when sending to the GW.
>>
>> Best regards,
>>
>> Bogdan-Andrei Iancu
>>
>> OpenSIPS Founder and Developer
>> https://www.opensips-solutions.com <https://www.opensips-solutions.com>
>> OpenSIPS Summit 27-30 Sept 2022, Athens
>> https://www.opensips.org/events/Summit-2022Athens/ <https://www.opensips.org/events/Summit-2022Athens/>
>>
>> On 10/7/22 9:00 PM, Nitesh Divecha wrote:
>>> Hello All,
>>>
>>> Anyone using OpenSIPS CP 9.3.2? Need small help!
>>>
>>> I got OpenSIPS 3.3.1 running and I can make calls out to
>>> the gateway (SIP trunk) without any problems.
>>>
>>> My provider issued me a DID with user/pass and I was
>>> able to configure them under "UAC Registrant" and
>>> registered to a remote server.
>>>
>>> Question is - how can I route calls to "UAC Registrant"?
>>> From the "Dynamic Routing" menu I can only route calls
>>> to Gateway. How can I route calls to "UAC Registrant"?
>>>
>>> Any suggestions?
>>>
>>> Thank you in advance!
>>>
>>> Cheers,
>>> Nitesh
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20221019/0cf65a4d/attachment-0001.html>
More information about the Users
mailing list