[Freeswitch-users] Is there a way I could separate by destination types by hardcoding it in?
D-Roy Black
del_64 at hotmail.com
Tue Oct 31 11:49:06 UTC 2017
Normally calls coming in from the PSTN to an unprovisioned telephone
number are given session:hangup("UNALLOCATED_NUMBER");
Now I have a setup like this, that any call coming in from the PSTN to
an unprovisioned telephone number is sent to an IP address, and works
fine...
session:execute('bridge',
'sofia/internal/gateway/'..dialledNumber..'@100.100.100.100:5061');
But is there a way I could separate by destination types by hardcoding
it in?
i.e if a caller dialing to 0800 or 0208 UK
(sofia/internal/gateway/44800
(sofia/internal/gateway/44208
Any number beginning 44800 should go to
session:hangup("UNALLOCATED_NUMBER");
And anything ells would go to the IP address
session:execute('bridge',
'sofia/internal/gateway/'..dialledNumber..'@100.100.100.100:5061');
Thanks :)
Deltukru
More information about the FreeSWITCH-users
mailing list