Re: [OpenSIPS-Users] register to a sip server
I had a mistake in previous advice, in a code snippet. For INVITE requests it should be like this of course: if(method=="INVITE" && $rU==00498970043400) { forward("10.0.0.10:5060"); # ip of 1000 phone } --- BR, Alexey http://alexeyka.zantsev.com/ ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] register to a sip server
for: http://lists.opensips.org/pipermail/users/2018-April/039206.html Hello As the simplest example, having 10 or smth like that DIDs/inner phone numbers, you may use just core functions - https://www.opensips.org/Documentation/Script-CoreFunctions-2-3#toc18 and core variables https://www.opensips.org/Documentation/Script-CoreVar-2-3#toc75 to determine the username in incoming INVITE (e.g. 00498970043400) and forward this request to desirable destination '1000' if(method=="REGISTER" && $rU==00498970043400) { forward("10.0.0.10:5060"); # ip of 1000 } OpenSIPS is extremely flexible, you may set/rewrite almost any SIP parameter using it - destination IP, destination username in uri and so on. But of course hardcoding in the script is not the best way. If you have a lot of relations "DID - inner exten" it's better to have a static code with AVP variables and get the values from some database, using some of CACHEDB_ module. PS: I'm not a experienced user of OpenSIPS, so check my advice twice... --- BR, Alexey http://alexeyka.zantsev.com/ ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] register to a sip server
Hello As the simplest example, having 10 or smth like that DIDs/inner phone numbers, you may use just core functions - https://www.opensips.org/Documentation/Script-CoreFunctions-2-3#toc18 and core variables https://www.opensips.org/Documentation/Script-CoreVar-2-3#toc75 to determine the username in incoming INVITE (e.g. 00498970043400) and forward this request to desirable destination '1000' if(method=="REGISTER" && $rU==00498970043400) { forward("10.0.0.10:5060"); # ip of 1000 } OpenSIPS is extremely flexible, you may set/rewrite almost any SIP parameter using it - destination IP, destination username in uri and so on. But of course hardcoding in the script is not the best way. If you have a lot of relations "DID - inner exten" it's better to have a static code with AVP variables and get the values from some database, using some of CACHEDB_ module. PS: I'm not a experienced user of OpenSIPS, so check my advice twice... --- BR, Alexey http://alexeyka.zantsev.com/___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] register to a sip server
Hello As the simplest example, having 10 or smth like that DIDs/inner phone numbers, you may use just core functions - https://www.opensips.org/Documentation/Script-CoreFunctions-2-3#toc18 and core variables https://www.opensips.org/Documentation/Script-CoreVar-2-3#toc75 to determine the username in incoming INVITE (e.g. 00498970043400) and forward this request to desirable destination '1000' if(method=="REGISTER" && $rU==00498970043400) { forward("10.0.0.10:5060");# ip of 1000 } OpenSIPS is extremely flexible, you may set/rewrite almost any SIP parameter using it - destination IP, destination username in uri and so on. But of course hardcoding in the script is not the best way. If you have a lot of relations "DID - inner exten" it's better to have a static code with AVP variables and get the values from some database, using some of CACHEDB_ module. PS: I'm not a experienced user of OpenSIPS, so check my advice twice... --- BR, Alexey http://alexeyka.zantsev.com/ ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] register to a sip server
Hello As the simplest example, having 10 or smth like that DIDs/inner phone numbers, you may use just core functions - https://www.opensips.org/Documentation/Script-CoreFunctions-2-3#toc18 and core variables https://www.opensips.org/Documentation/Script-CoreVar-2-3#toc75 to determine the username in incoming INVITE (e.g. 00498970043400) and forward this request to desirable destination '1000' if(method=="REGISTER" && $rU==00498970043400) { forward("10.0.0.10:5060");# ip of 1000 } OpenSIPS is extremely flexible, you may set/rewrite almost any SIP parameter using it - destination IP, destination username in uri and so on. But of course hardcoding in the script is not the best way. If you have a lot of relations "DID - inner exten" it's better to have a static code with AVP variables and get the values from some database, using some of CACHEDB_ module. PS: I'm not a experienced user of OpenSIPS, so check my advice twice... --- BR, Alexey http://alexeyka.zantsev.com/ ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] register to a sip server
Anything, please? On Wed, Apr 4, 2018 at 8:25 PM, Atux Atuxwrote: > Hi. I have seen that page. Since i have not any experience with Opensips, > i am asking for an example. > is there any example to setup my sip provider and the incoming/outgoing > DID one to one to extension, please? > > > On Wed, Apr 4, 2018 at 6:52 PM, Bogdan-Andrei Iancu > wrote: > >> Hi, >> So that means you need to register with them, right ? if so, take a look >> at the uac_registrant module, that makes OpenSIPS to register as UAC to >> another SIP server: >> http://www.opensips.org/html/docs/modules/2.3.x/uac_registrant.html >> >> Regards, >> >> Bogdan-Andrei Iancu >> >> OpenSIPS Founder and Developer >> http://www.opensips-solutions.com >> OpenSIPS Summit 2018 >> http://www.opensips.org/events/Summit-2018Amsterdam >> >> On 04/04/2018 08:46 AM, Atux Atux wrote: >> >> Thanks a lot for the answers. I am have a couple of providers that offers >> sip trunks in the format: >> username, password, domain, did >> john, whateverpass, sip.domaina.com,00498970043400-9 >> tuxies, mypass, sip.domainb.com,0049394563400-9 >> >> my extensions in the LAN are in the format 1XXX and i would like to route >> incoming outgoing the following scheme >> 00498970043400 ->1000 >> 00498970043401 ->1001 >> 00498970043402 ->1002 >> 00498970043403 ->1003 >> 00498970043404 ->1004 >> 00498970043405 ->1005 >> 00498970043406 ->1006 >> 00498970043407 ->1007 >> 00498970043408 ->1008 >> 00498970043409 ->1009 >> >> 0049394563400 ->1010 >> 0049394563401 ->1011 >> 0049394563402 ->1012 >> 0049394563403 ->1013 >> 0049394563404 ->1014 >> 0049394563405 ->1015 >> 0049394563406 ->1016 >> 0049394563407 ->1017 >> 0049394563408 ->1018 >> 0049394563409 ->1019 >> >> this is the incoming/outgoing that i would like to setup, please. >> >> >> On Tue, Apr 3, 2018 at 7:13 PM, Aqs Younas wrote: >> >>> You can use permission module for ip authentication. If you want to >>> register opensips with gateway below module might help you. >>> http://www.opensips.org/html/docs/modules/2.2.x/uac_registrant.html >>> >>> For routing DIDs to extensions check db_alias module for that. >>> >>> On Tue, 3 Apr 2018, 6:41 pm Atux Atux, wrote: >>> Hi. Baby steps with opensips and i managed to make all softclients in LAN to talk to each other through accounts created in opensips. i would like to know how can i register to a sip provider that offers a sip trunk with DIDs to me, eg Voipgate. Then i would like to route each DID to extensions. 1 DID to 1 extension, please. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>> >>> ___ >>> Users mailing list >>> Users@lists.opensips.org >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>> >>> >> >> >> ___ >> 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] register to a sip server
Hi. I have seen that page. Since i have not any experience with Opensips, i am asking for an example. is there any example to setup my sip provider and the incoming/outgoing DID one to one to extension, please? On Wed, Apr 4, 2018 at 6:52 PM, Bogdan-Andrei Iancuwrote: > Hi, > So that means you need to register with them, right ? if so, take a look > at the uac_registrant module, that makes OpenSIPS to register as UAC to > another SIP server: > http://www.opensips.org/html/docs/modules/2.3.x/uac_registrant.html > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > http://www.opensips-solutions.com > OpenSIPS Summit 2018 > http://www.opensips.org/events/Summit-2018Amsterdam > > On 04/04/2018 08:46 AM, Atux Atux wrote: > > Thanks a lot for the answers. I am have a couple of providers that offers > sip trunks in the format: > username, password, domain, did > john, whateverpass, sip.domaina.com,00498970043400-9 > tuxies, mypass, sip.domainb.com,0049394563400-9 > > my extensions in the LAN are in the format 1XXX and i would like to route > incoming outgoing the following scheme > 00498970043400 ->1000 > 00498970043401 ->1001 > 00498970043402 ->1002 > 00498970043403 ->1003 > 00498970043404 ->1004 > 00498970043405 ->1005 > 00498970043406 ->1006 > 00498970043407 ->1007 > 00498970043408 ->1008 > 00498970043409 ->1009 > > 0049394563400 ->1010 > 0049394563401 ->1011 > 0049394563402 ->1012 > 0049394563403 ->1013 > 0049394563404 ->1014 > 0049394563405 ->1015 > 0049394563406 ->1016 > 0049394563407 ->1017 > 0049394563408 ->1018 > 0049394563409 ->1019 > > this is the incoming/outgoing that i would like to setup, please. > > > On Tue, Apr 3, 2018 at 7:13 PM, Aqs Younas wrote: > >> You can use permission module for ip authentication. If you want to >> register opensips with gateway below module might help you. >> http://www.opensips.org/html/docs/modules/2.2.x/uac_registrant.html >> >> For routing DIDs to extensions check db_alias module for that. >> >> On Tue, 3 Apr 2018, 6:41 pm Atux Atux, wrote: >> >>> Hi. Baby steps with opensips and i managed to make all softclients in >>> LAN to talk to each other through accounts created in opensips. >>> i would like to know how can i register to a sip provider that offers a >>> sip trunk with DIDs to me, eg Voipgate. Then i would like to route each DID >>> to extensions. 1 DID to 1 extension, please. >>> >>> ___ >>> Users mailing list >>> Users@lists.opensips.org >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>> >> >> ___ >> Users mailing list >> Users@lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> > > > ___ > 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] register to a sip server
Any ideas, please? On Wed, Apr 4, 2018 at 8:46 AM, Atux Atuxwrote: > Thanks a lot for the answers. I am have a couple of providers that offers > sip trunks in the format: > username, password, domain, did > john, whateverpass, sip.domaina.com,00498970043400-9 > tuxies, mypass, sip.domainb.com,0049394563400-9 > > my extensions in the LAN are in the format 1XXX and i would like to route > incoming outgoing the following scheme > 00498970043400 ->1000 > 00498970043401 ->1001 > 00498970043402 ->1002 > 00498970043403 ->1003 > 00498970043404 ->1004 > 00498970043405 ->1005 > 00498970043406 ->1006 > 00498970043407 ->1007 > 00498970043408 ->1008 > 00498970043409 ->1009 > > 0049394563400 ->1010 > 0049394563401 ->1011 > 0049394563402 ->1012 > 0049394563403 ->1013 > 0049394563404 ->1014 > 0049394563405 ->1015 > 0049394563406 ->1016 > 0049394563407 ->1017 > 0049394563408 ->1018 > 0049394563409 ->1019 > > this is the incoming/outgoing that i would like to setup, please. > > > On Tue, Apr 3, 2018 at 7:13 PM, Aqs Younas wrote: > >> You can use permission module for ip authentication. If you want to >> register opensips with gateway below module might help you. >> http://www.opensips.org/html/docs/modules/2.2.x/uac_registrant.html >> >> For routing DIDs to extensions check db_alias module for that. >> >> On Tue, 3 Apr 2018, 6:41 pm Atux Atux, wrote: >> >>> Hi. Baby steps with opensips and i managed to make all softclients in >>> LAN to talk to each other through accounts created in opensips. >>> i would like to know how can i register to a sip provider that offers a >>> sip trunk with DIDs to me, eg Voipgate. Then i would like to route each DID >>> to extensions. 1 DID to 1 extension, please. >>> >>> ___ >>> Users mailing list >>> Users@lists.opensips.org >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>> >> >> ___ >> Users mailing list >> Users@lists.opensips.org >> http://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] register to a sip server
Thanks a lot for the answers. I am have a couple of providers that offers sip trunks in the format: username, password, domain, did john, whateverpass, sip.domaina.com,00498970043400-9 tuxies, mypass, sip.domainb.com,0049394563400-9 my extensions in the LAN are in the format 1XXX and i would like to route incoming outgoing the following scheme 00498970043400 ->1000 00498970043401 ->1001 00498970043402 ->1002 00498970043403 ->1003 00498970043404 ->1004 00498970043405 ->1005 00498970043406 ->1006 00498970043407 ->1007 00498970043408 ->1008 00498970043409 ->1009 0049394563400 ->1010 0049394563401 ->1011 0049394563402 ->1012 0049394563403 ->1013 0049394563404 ->1014 0049394563405 ->1015 0049394563406 ->1016 0049394563407 ->1017 0049394563408 ->1018 0049394563409 ->1019 this is the incoming/outgoing that i would like to setup, please. On Tue, Apr 3, 2018 at 7:13 PM, Aqs Younaswrote: > You can use permission module for ip authentication. If you want to > register opensips with gateway below module might help you. > http://www.opensips.org/html/docs/modules/2.2.x/uac_registrant.html > > For routing DIDs to extensions check db_alias module for that. > > On Tue, 3 Apr 2018, 6:41 pm Atux Atux, wrote: > >> Hi. Baby steps with opensips and i managed to make all softclients in LAN >> to talk to each other through accounts created in opensips. >> i would like to know how can i register to a sip provider that offers a >> sip trunk with DIDs to me, eg Voipgate. Then i would like to route each DID >> to extensions. 1 DID to 1 extension, please. >> >> ___ >> Users mailing list >> Users@lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> > > ___ > Users mailing list > Users@lists.opensips.org > http://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] register to a sip server
You can use permission module for ip authentication. If you want to register opensips with gateway below module might help you. http://www.opensips.org/html/docs/modules/2.2.x/uac_registrant.html For routing DIDs to extensions check db_alias module for that. On Tue, 3 Apr 2018, 6:41 pm Atux Atux,wrote: > Hi. Baby steps with opensips and i managed to make all softclients in LAN > to talk to each other through accounts created in opensips. > i would like to know how can i register to a sip provider that offers a > sip trunk with DIDs to me, eg Voipgate. Then i would like to route each DID > to extensions. 1 DID to 1 extension, please. > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users