Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Configuring CommuniGate Pro for ISN Dialing

13 views
Skip to first unread message

CommuniGate Discussion

unread,
Aug 13, 2014, 5:01:44 PM8/13/14
to

Hello,
anyone know how to configure the router in CgPro to dial ISN number?

Thank you

Vincenzo


#############################################################
This message is sent to you because you are subscribed to
the mailing list <CGat...@mail.stalker.com>.
To unsubscribe, E-mail to: <CGateP...@mail.stalker.com>
To switch to the DIGEST mode, E-mail to <CGatePr...@mail.stalker.com>
To switch to the INDEX mode, E-mail to <CGatePr...@mail.stalker.com>
Send administrative queries to <CGatePro...@mail.stalker.com>

Technical Support

unread,
Aug 21, 2014, 4:23:30 AM8/21/14
to
Hello,

On 2014-08-14 01:01 , CommuniGate Discussion wrote:
>
> Hello,
> anyone know how to configure the router in CgPro to dial ISN number?

The trickiest part here would be to catch numbers with * anywhere in
them. I don't see a simple way to do that, so a consider instead the
approach with some prefix (aka trunk code) for dialing out and some
special domain name for incoming calls. Using these one can send those
requests to a CG/PL script for ISN number parsing and further forking to
the proper SIP destination.

S:<#*@*> = parse_isn{*}#postmaster@localhost
S:<*@isn-in.mydomain.tld> = parse_isn{*}#postmaster@localhost


entry main is
var isn = Vars().startParameter;
if isArray(isn) then isn=isn[0]; end if;
var starIdx = FindSubstring(isn, "*");
if starIdx <= 0 then RejectCall(404); end if;
// No * at all or right at the start - not an ISN

var itad = SubString(isn,starIdx+1,1000);
isn = SubString(isn,0,starIdx-1);

// now we have parsed ISN and ITAD, and can try to route them
// e.g. all local domains may have domain alias in the form
// ITAD.itad, and ISN as an extension (alias to an account)
// then I...@ITAD.itad should route to a local account
var uri = "sip:" + isn + "@" + itad + ".itad";
if RouteLocalURI(uri) != null then ForkCall(uri); end if;

// if ISN is not assigned locally we may need to send the call to
// some external SIP gateway - this I left as an exercise for you :)
end entry;

> Thank you
>
> Vincenzo


--
Best regards,
Dmitry Akindinov.
=======================================================================
When answering to letters sent to you by the tech.support staff, make
sure the original message you have received is included into your
reply.
0 new messages