Gateway Configuration (asterisk example provided)
Hello, I'm trying to connect freeswitch to a provider so I can call real numbers and reach my freeswitch server, but I'm kinda stuck in this process. My provider sent me this Asterisk's configs: ======================================================= # sip.conf: register => USERNAME:PASSWD@SERVER_IP [directcall12] context=default fromuser= USERNAME username= USERNAME secret= PASSWD type=friend host=SERVER_IP canreinvite=no nat=no dtmfmode=rfc2833 insecure=very disallow=all allow=g729 # extensions.conf: exten => 3131,1,Noop(ORIGEM - ${CALLERID(num)}) exten => 3131,n,Dial(${TRUNKPBX}/${RAMAL}) exten => 3131,n,Hangup() ** change these settings according you internal extensions configs ======================================================= Well, I tried adapting it to FreeSwitch like this (according some examples I found across the web): ======================================================= # /usr/local/freeswitch/conf/sip_profiles/external/testing.xml <include> <gateway name="testing"> <param name="username" value="USERNAME" /> <param name="realm" value="SERVER_IP" /> <param name="password" value="PASSWORD" /> </gateway> </include> # /usr/local/freeswitch/conf/dialplan/public/testing.xml <include> <extension name="testing-inbound"> <condition field="destination_number" expression="^(USERNAME)$"> <action application="lua" data="/root/call_logger.lua" /> </condition> </extension> </include> ======================================================= In the end all I got is this log: 2012-03-17 01:41:23.565471 [NOTICE] sofia_reg.c:415 Registering testing 2012-03-17 01:41:55.565460 [ERR] sofia_reg.c:1962 testing Registration Failed with status Request Timeout [408]. All I want is to connect with my provider and route the calls made to the real number my provider gave me to my Dialplan, so my lua script will be called. Btw, I dont actually bought a "dedicated number" but an extension. I mean, I will call a number and an IVR-menu will ask me for an extension, then I type the extension I bought (3131) and their system will send the call for me. Is this clear? Sorry, I'm an experienced programmer but I'm just starting with all this telephony thing and I don't know what else I need to do from this point on, I have searched a lot and tried a lot of different approaches, but none succeed. Could anybody help me with this, please? Thanks in advance. Anderson Arboleya
Please read: http://wiki.freeswitch.org/wiki/Clarification:gateways You should "tell" freeswitch to register to your gateway: # /usr/local/freeswitch/conf/sip_profiles/external/testing.xml <include> <gateway name="testing"> <param name="username" value="USERNAME" /> <param name="realm" value="SERVER_IP" /> <param name="password" value="PASSWORD" /> <param name="register" value="true"/> </gateway> </include> Look the param register: <param name="register" value="true"/> Best Regards, Fernando da Silva Santos NextBilling IP Solutions LTDA Phone: +55 21 2143-9000 MSN: fernandojdk@gmail.com www.nextbilling.com.br Rio de Janeiro, Brazil, BR Importante: Esta mensagem, incluindo todo seu conteúdo, contém informações confidenciais legalmente protegidas e destinadas a indivíduo e propósito específicos. Caso a tenha recebido por engano, lembramos do caráter sigiloso e solicitamos a gentileza de desconsiderá-la e comunicar-nos o mais breve possível. As informações contidas nesta mensagem e em seu conteúdo são de responsabilidade de seu autor, não representando necessariamente idéias, opiniões, pensamentos ou qualquer forma de posicionamento por parte da NextBilling IP Solutions. P "Antes de imprimir pense em seu compromisso com o Meio Ambiente." -------Original Message------- From: Anderson Arboleya Date: 21/03/2012 23:28:45 To: freeswitch-users@lists.freeswitch.org Subject: [Freeswitch-users] Gateway Configuration (asterisk example provided) Hello, I'm trying to connect freeswitch to a provider so I can call real numbers and reach my freeswitch server, but I'm kinda stuck in this process. My provider sent me this Asterisk's configs: ======================================================= # sip.conf: register => USERNAME:PASSWD@SERVER_IP [directcall12] context=default fromuser= USERNAME username= USERNAME secret= PASSWD type=friend host=SERVER_IP canreinvite=no nat=no dtmfmode=rfc2833 insecure=very disallow=all allow=g729 # extensions.conf: exten => 3131,1,Noop(ORIGEM - ${CALLERID(num)}) exten => 3131,n,Dial(${TRUNKPBX}/${RAMAL}) exten => 3131,n,Hangup() ** change these settings according you internal extensions configs ======================================================= Well, I tried adapting it to FreeSwitch like this (according some examples I found across the web): ======================================================= # /usr/local/freeswitch/conf/sip_profiles/external/testing.xml <include> <gateway name="testing"> <param name="username" value="USERNAME" /> <param name="realm" value="SERVER_IP" /> <param name="password" value="PASSWORD" /> </gateway> </include> # /usr/local/freeswitch/conf/dialplan/public/testing.xml <include> <extension name="testing-inbound"> <condition field="destination_number" expression="^(USERNAME)$"> <action application="lua" data="/root/call_logger.lua" /> </condition> </extension> </include> ======================================================= In the end all I got is this log: 2012-03-17 01:41:23.565471 [NOTICE] sofia_reg.c:415 Registering testing 2012-03-17 01:41:55.565460 [ERR] sofia_reg.c:1962 testing Registration Failed with status Request Timeout [408]. All I want is to connect with my provider and route the calls made to the real number my provider gave me to my Dialplan, so my lua script will be called. Btw, I dont actually bought a "dedicated number" but an extension. I mean, I will call a number and an IVR-menu will ask me for an extension, then I type the extension I bought (3131) and their system will send the call for me. Is this clear? Sorry, I'm an experienced programmer but I'm just starting with all this telephony thing and I don't know what else I need to do from this point on, I have searched a lot and tried a lot of different approaches, but none succeed. Could anybody help me with this, please? Thanks in advance. Anderson Arboleya _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
On Mar 21, 2012 10:27 PM, "Anderson Arboleya" <me@nybras.com> wrote:
Hello,
I'm trying to connect freeswitch to a provider so I can call real numbers and reach my freeswitch server, but I'm kinda stuck in this process.
My provider sent me this Asterisk's configs:
======================================================= # sip.conf: register => USERNAME:PASSWD@SERVER_IP
[directcall12] context=default fromuser= USERNAME username= USERNAME secret= PASSWD type=friend host=SERVER_IP canreinvite=no nat=no dtmfmode=rfc2833 insecure=very disallow=all allow=g729
# extensions.conf: exten => 3131,1,Noop(ORIGEM - ${CALLERID(num)}) exten => 3131,n,Dial(${TRUNKPBX}/${RAMAL}) exten => 3131,n,Hangup()
** change these settings according you internal extensions configs =======================================================
Well, I tried adapting it to FreeSwitch like this (according some examples I found across the web):
======================================================= # /usr/local/freeswitch/conf/sip_profiles/external/testing.xml <include> <gateway name="testing"> <param name="username" value="USERNAME" /> <param name="realm" value="SERVER_IP" /> <param name="password" value="PASSWORD" /> </gateway> </include>
# /usr/local/freeswitch/conf/dialplan/public/testing.xml <include> <extension name="testing-inbound"> <condition field="destination_number" expression="^(USERNAME)$"> <action application="lua" data="/root/call_logger.lua" /> </condition> </extension> </include> =======================================================
In the end all I got is this log:
2012-03-17 01:41:23.565471 [NOTICE] sofia_reg.c:415 Registering testing 2012-03-17 01:41:55.565460 [ERR] sofia_reg.c:1962 testing Registration Failed with status Request Timeout [408].
All I want is to connect with my provider and route the calls made to the real number my provider gave me to my Dialplan, so my lua script will be called.
Btw, I dont actually bought a "dedicated number" but an extension. I mean, I will call a number and an IVR-menu will ask me for an extension, then I type the extension I bought (3131) and their system will send the call for me. Is this clear?
Sorry, I'm an experienced programmer but I'm just starting with all this telephony thing and I don't know what else I need to do from this point on, I have searched a lot and tried a lot of different approaches, but none succeed.
Could anybody help me with this, please?
Thanks in advance.
Anderson Arboleya
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Whoops... By default it will try and register to the gateway name unless stated otherwise. So as your dialplan sits, its registering to "testing" literally. Should be "example.com" or the domain you're registering to. -BDF On Mar 21, 2012 10:27 PM, "Anderson Arboleya" <me@nybras.com> wrote:
Hello,
I'm trying to connect freeswitch to a provider so I can call real numbers and reach my freeswitch server, but I'm kinda stuck in this process.
My provider sent me this Asterisk's configs:
======================================================= # sip.conf: register => USERNAME:PASSWD@SERVER_IP
[directcall12] context=default fromuser= USERNAME username= USERNAME secret= PASSWD type=friend host=SERVER_IP canreinvite=no nat=no dtmfmode=rfc2833 insecure=very disallow=all allow=g729
# extensions.conf: exten => 3131,1,Noop(ORIGEM - ${CALLERID(num)}) exten => 3131,n,Dial(${TRUNKPBX}/${RAMAL}) exten => 3131,n,Hangup()
** change these settings according you internal extensions configs =======================================================
Well, I tried adapting it to FreeSwitch like this (according some examples I found across the web):
======================================================= # /usr/local/freeswitch/conf/sip_profiles/external/testing.xml <include> <gateway name="testing"> <param name="username" value="USERNAME" /> <param name="realm" value="SERVER_IP" /> <param name="password" value="PASSWORD" /> </gateway> </include>
# /usr/local/freeswitch/conf/dialplan/public/testing.xml <include> <extension name="testing-inbound"> <condition field="destination_number" expression="^(USERNAME)$"> <action application="lua" data="/root/call_logger.lua" /> </condition> </extension> </include> =======================================================
In the end all I got is this log:
2012-03-17 01:41:23.565471 [NOTICE] sofia_reg.c:415 Registering testing 2012-03-17 01:41:55.565460 [ERR] sofia_reg.c:1962 testing Registration Failed with status Request Timeout [408].
All I want is to connect with my provider and route the calls made to the real number my provider gave me to my Dialplan, so my lua script will be called.
Btw, I dont actually bought a "dedicated number" but an extension. I mean, I will call a number and an IVR-menu will ask me for an extension, then I type the extension I bought (3131) and their system will send the call for me. Is this clear?
Sorry, I'm an experienced programmer but I'm just starting with all this telephony thing and I don't know what else I need to do from this point on, I have searched a lot and tried a lot of different approaches, but none succeed.
Could anybody help me with this, please?
Thanks in advance.
Anderson Arboleya
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi Fernando, I added the register param too. Brian, I've change the name to the SERVER_IP my provider sent me. That's my configs now: ======================================================= # /usr/local/freeswitch/conf/sip_profiles/external/testing.xml <include> <gateway name="SERVER_IP"> <param name="username" value="USERNAME" /> <param name="realm" value="SERVER_IP" /> <param name="password" value="PASSWORD" /> <param name="register" value="true"/> </gateway> </include> # /usr/local/freeswitch/conf/dialplan/public/testing.xml <include> <extension name="testing-inbound"> <condition field="destination_number" expression="^(USERNAME)$"> <action application="lua" data="/root/call_logger.lua" /> </condition> </extension> </include> ======================================================= And now I got this error: ======================================================= 2012-03-22 10:28:00.125504 [NOTICE] sofia_reg.c:415 Registering 189.84.133.130 2012-03-22 10:28:32.125503 [ERR] sofia_reg.c:1962 189.84.133.130 Registration Failed with status Request Timeout [408]. failure #1 ======================================================= When I run a "sofia status" and the fs_cli I got: external::SERVER_IP gateway sip:USERNAME@SERVER_IP FAIL_WAIT Any other suggestions? Tks Anderson Arboleya On Wed, Mar 21, 2012 at 11:41 PM, Brian Foster <bdfoster@endigotech.com> wrote:
Whoops...
By default it will try and register to the gateway name unless stated otherwise. So as your dialplan sits, its registering to "testing" literally. Should be "example.com" or the domain you're registering to.
-BDF
On Mar 21, 2012 10:27 PM, "Anderson Arboleya" <me@nybras.com> wrote:
Hello,
I'm trying to connect freeswitch to a provider so I can call real numbers and reach my freeswitch server, but I'm kinda stuck in this process.
My provider sent me this Asterisk's configs:
======================================================= # sip.conf: register => USERNAME:PASSWD@SERVER_IP
[directcall12] context=default fromuser= USERNAME username= USERNAME secret= PASSWD type=friend host=SERVER_IP canreinvite=no nat=no dtmfmode=rfc2833 insecure=very disallow=all allow=g729
# extensions.conf: exten => 3131,1,Noop(ORIGEM - ${CALLERID(num)}) exten => 3131,n,Dial(${TRUNKPBX}/${RAMAL}) exten => 3131,n,Hangup()
** change these settings according you internal extensions configs =======================================================
Well, I tried adapting it to FreeSwitch like this (according some examples I found across the web):
======================================================= # /usr/local/freeswitch/conf/sip_profiles/external/testing.xml <include> <gateway name="testing"> <param name="username" value="USERNAME" /> <param name="realm" value="SERVER_IP" /> <param name="password" value="PASSWORD" /> </gateway> </include>
# /usr/local/freeswitch/conf/dialplan/public/testing.xml <include> <extension name="testing-inbound"> <condition field="destination_number" expression="^(USERNAME)$"> <action application="lua" data="/root/call_logger.lua" /> </condition> </extension> </include> =======================================================
In the end all I got is this log:
2012-03-17 01:41:23.565471 [NOTICE] sofia_reg.c:415 Registering testing 2012-03-17 01:41:55.565460 [ERR] sofia_reg.c:1962 testing Registration Failed with status Request Timeout [408].
All I want is to connect with my provider and route the calls made to the real number my provider gave me to my Dialplan, so my lua script will be called.
Btw, I dont actually bought a "dedicated number" but an extension. I mean, I will call a number and an IVR-menu will ask me for an extension, then I type the extension I bought (3131) and their system will send the call for me. Is this clear?
Sorry, I'm an experienced programmer but I'm just starting with all this telephony thing and I don't know what else I need to do from this point on, I have searched a lot and tried a lot of different approaches, but none succeed.
Could anybody help me with this, please?
Thanks in advance.
Anderson Arboleya
Its Seem that FS cannot connect to your gateway. Try the command "sofia profile external siptrace on" and see the response from your gateway. Post here the siptrace, maybe i can help. Best regards, Importante: Esta mensagem, incluindo todo seu conteúdo, contém informações confidenciais legalmente protegidas e destinadas a indivíduo e propósito específicos. Caso a tenha recebido por engano, lembramos do caráter sigiloso e solicitamos a gentileza de desconsiderá-la e comunicar-nos o mais breve possível. As informações contidas nesta mensagem e em seu conteúdo são de responsabilidade de seu autor, não representando necessariamente idéias, opiniões, pensamentos ou qualquer forma de posicionamento por parte da NextBilling IP Solutions. P "Antes de imprimir pense em seu compromisso com o Meio Ambiente." -------Original Message------- From: Anderson Arboleya Date: 22/03/2012 07:40:53 To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Gateway Configuration (asterisk exampleprovided) Hi Fernando, I added the register param too. Brian, I've change the name to the SERVER_IP my provider sent me. That's my configs now: ======================================================= # /usr/local/freeswitch/conf/sip_profiles/external/testing.xml <include> <gateway name="SERVER_IP"> <param name="username" value="USERNAME" /> <param name="realm" value="SERVER_IP" /> <param name="password" value="PASSWORD" /> <param name="register" value="true"/> </gateway> </include> # /usr/local/freeswitch/conf/dialplan/public/testing.xml <include> <extension name="testing-inbound"> <condition field="destination_number" expression="^(USERNAME)$"> <action application="lua" data="/root/call_logger.lua" /> </condition> </extension> </include> ======================================================= And now I got this error: ======================================================= 2012-03-22 10:28:00.125504 [NOTICE] sofia_reg.c:415 Registering 189.84.133 130 2012-03-22 10:28:32.125503 [ERR] sofia_reg.c:1962 189.84.133.130 Registration Failed with status Request Timeout [408]. failure #1 ======================================================= When I run a "sofia status" and the fs_cli I got: external::SERVER_IP gateway sip:USERNAME@SERVER_IP FAIL_WAIT Any other suggestions? Tks Anderson Arboleya On Wed, Mar 21, 2012 at 11:41 PM, Brian Foster <bdfoster@endigotech.com> wrote:
Whoops...
By default it will try and register to the gateway name unless stated otherwise. So as your dialplan sits, its registering to "testing" literally. Should be "example.com" or the domain you're registering to.
-BDF
On Mar 21, 2012 10:27 PM, "Anderson Arboleya" <me@nybras.com> wrote:
Hello,
I'm trying to connect freeswitch to a provider so I can call real numbers and reach my freeswitch server, but I'm kinda stuck in this process.
My provider sent me this Asterisk's configs:
======================================================= # sip.conf: register => USERNAME:PASSWD@SERVER_IP
[directcall12] context=default fromuser= USERNAME username= USERNAME secret= PASSWD type=friend host=SERVER_IP canreinvite=no nat=no dtmfmode=rfc2833 insecure=very disallow=all allow=g729
# extensions.conf: exten => 3131,1,Noop(ORIGEM - ${CALLERID(num)}) exten => 3131,n,Dial(${TRUNKPBX}/${RAMAL}) exten => 3131,n,Hangup()
** change these settings according you internal extensions configs =======================================================
Well, I tried adapting it to FreeSwitch like this (according some examples I found across the web):
======================================================= # /usr/local/freeswitch/conf/sip_profiles/external/testing.xml <include> <gateway name="testing"> <param name="username" value="USERNAME" /> <param name="realm" value="SERVER_IP" /> <param name="password" value="PASSWORD" /> </gateway> </include>
# /usr/local/freeswitch/conf/dialplan/public/testing.xml <include> <extension name="testing-inbound"> <condition field="destination_number" expression="^(USERNAME)$"> <action application="lua" data="/root/call_logger.lua" /> </condition> </extension> </include> =======================================================
In the end all I got is this log:
2012-03-17 01:41:23.565471 [NOTICE] sofia_reg.c:415 Registering testing 2012-03-17 01:41:55.565460 [ERR] sofia_reg.c:1962 testing Registration Failed with status Request Timeout [408].
All I want is to connect with my provider and route the calls made to the real number my provider gave me to my Dialplan, so my lua script will be called.
Btw, I dont actually bought a "dedicated number" but an extension. I mean, I will call a number and an IVR-menu will ask me for an extension, then I type the extension I bought (3131) and their system will send the call for me. Is this clear?
Sorry, I'm an experienced programmer but I'm just starting with all this telephony thing and I don't know what else I need to do from this point on, I have searched a lot and tried a lot of different approaches, but none succeed.
Could anybody help me with this, please?
Thanks in advance.
Anderson Arboleya
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Fernando, here's the result: send 662 bytes to udp/[189.84.133.130]:5060 at 10:49:40.725611: ------------------------------------------------------------------------ REGISTER sip:PROVIDER_IP;transport=udp SIP/2.0 Via: SIP/2.0/UDP SERVER_IP:5080;rport;branch=z9hG4bKFHjr44Ug1NZ7e Max-Forwards: 70 From: <sip:USERNAME@PROVIDER_IP;transport=udp>;tag=FN5Fjc2t9Be1K To: <sip:USERNAME@PROVIDER_IP;transport=udp> Call-ID: ae19b5d8-740c-11e1-a151-17725ca17356 CSeq: 25870616 REGISTER Contact: <sip:gw+PROVIDER_IP@SERVER_IP:5080;transport=udp;gw=189.84.133.130> Expires: 3600 User-Agent: FreeSWITCH-mod_sofia/1.0.head-git-914f6cb 2012-03-16 12-33-42 -0500 Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY Supported: timer, precondition, path, replaces Content-Length: 0 ------------------------------------------------------------------------ I've replaced the IPs according this aliases: PROVIDER_IP -> My Provider IP SERVER_IP -> My server IP (in which fs is running) Thank you very much for your help. Anderson Arboleya On Thu, Mar 22, 2012 at 7:45 AM, Fernando - NextBilling IP Solutions <fernandojdk@gmail.com> wrote:
Its Seem that FS cannot connect to your gateway.
Try the command "sofia profile external siptrace on" and see the response from your gateway.
Post here the siptrace, maybe i can help.
Best regards, Importante: Esta mensagem, incluindo todo seu conteúdo, contém informações confidenciais, legalmente protegidas e destinadas a indivíduo e propósito específicos. Caso a tenha recebido por engano, lembramos do caráter sigiloso e solicitamos a gentileza de desconsiderá-la e comunicar-nos o mais breve possível. As informações contidas nesta mensagem e em seu conteúdo são de responsabilidade de seu autor, não representando necessariamente idéias, opiniões, pensamentos ou qualquer forma de posicionamento por parte da NextBilling IP Solutions. P "Antes de imprimir pense em seu compromisso com o Meio Ambiente." -------Original Message-------
From: Anderson Arboleya Date: 22/03/2012 07:40:53 To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Gateway Configuration (asterisk exampleprovided)
Hi Fernando, I added the register param too.
Brian, I've change the name to the SERVER_IP my provider sent me.
That's my configs now:
======================================================= # /usr/local/freeswitch/conf/sip_profiles/external/testing.xml <include> <gateway name="SERVER_IP"> <param name="username" value="USERNAME" /> <param name="realm" value="SERVER_IP" /> <param name="password" value="PASSWORD" /> <param name="register" value="true"/> </gateway> </include>
# /usr/local/freeswitch/conf/dialplan/public/testing.xml <include> <extension name="testing-inbound"> <condition field="destination_number" expression="^(USERNAME)$"> <action application="lua" data="/root/call_logger.lua" /> </condition> </extension> </include> =======================================================
And now I got this error:
======================================================= 2012-03-22 10:28:00.125504 [NOTICE] sofia_reg.c:415 Registering 189.84.133.130 2012-03-22 10:28:32.125503 [ERR] sofia_reg.c:1962 189.84.133.130 Registration Failed with status Request Timeout [408]. failure #1 =======================================================
When I run a "sofia status" and the fs_cli I got:
external::SERVER_IP gateway sip:USERNAME@SERVER_IP FAIL_WAIT
Any other suggestions?
Tks
Anderson Arboleya
On Wed, Mar 21, 2012 at 11:41 PM, Brian Foster <bdfoster@endigotech.com> wrote:
Whoops...
By default it will try and register to the gateway name unless stated otherwise. So as your dialplan sits, its registering to "testing" literally. Should be "example.com" or the domain you're registering to.
-BDF
On Mar 21, 2012 10:27 PM, "Anderson Arboleya" <me@nybras.com> wrote:
Hello,
I'm trying to connect freeswitch to a provider so I can call real numbers and reach my freeswitch server, but I'm kinda stuck in this process.
My provider sent me this Asterisk's configs:
======================================================= # sip.conf: register => USERNAME:PASSWD@SERVER_IP
[directcall12] context=default fromuser= USERNAME username= USERNAME secret= PASSWD type=friend host=SERVER_IP canreinvite=no nat=no dtmfmode=rfc2833 insecure=very disallow=all allow=g729
# extensions.conf: exten => 3131,1,Noop(ORIGEM - ${CALLERID(num)}) exten => 3131,n,Dial(${TRUNKPBX}/${RAMAL}) exten => 3131,n,Hangup()
** change these settings according you internal extensions configs =======================================================
Well, I tried adapting it to FreeSwitch like this (according some examples I found across the web):
======================================================= # /usr/local/freeswitch/conf/sip_profiles/external/testing.xml <include> <gateway name="testing"> <param name="username" value="USERNAME" /> <param name="realm" value="SERVER_IP" /> <param name="password" value="PASSWORD" /> </gateway> </include>
# /usr/local/freeswitch/conf/dialplan/public/testing.xml <include> <extension name="testing-inbound"> <condition field="destination_number" expression="^(USERNAME)$"> <action application="lua" data="/root/call_logger.lua" /> </condition> </extension> </include> =======================================================
In the end all I got is this log:
2012-03-17 01:41:23.565471 [NOTICE] sofia_reg.c:415 Registering testing 2012-03-17 01:41:55.565460 [ERR] sofia_reg.c:1962 testing Registration Failed with status Request Timeout [408].
All I want is to connect with my provider and route the calls made to the real number my provider gave me to my Dialplan, so my lua script will be called.
Btw, I dont actually bought a "dedicated number" but an extension. I mean, I will call a number and an IVR-menu will ask me for an extension, then I type the extension I bought (3131) and their system will send the call for me. Is this clear?
Sorry, I'm an experienced programmer but I'm just starting with all this telephony thing and I don't know what else I need to do from this point on, I have searched a lot and tried a lot of different approaches, but none succeed.
Could anybody help me with this, please?
Thanks in advance.
Anderson Arboleya
This header has sent to your gateway by FS, where is the response? If has no response, maybe FS cannot reach your Gateway. Best Regards, Importante: Esta mensagem, incluindo todo seu conteúdo, contém informações confidenciais legalmente protegidas e destinadas a indivíduo e propósito específicos. Caso a tenha recebido por engano, lembramos do caráter sigiloso e solicitamos a gentileza de desconsiderá-la e comunicar-nos o mais breve possível. As informações contidas nesta mensagem e em seu conteúdo são de responsabilidade de seu autor, não representando necessariamente idéias, opiniões, pensamentos ou qualquer forma de posicionamento por parte da NextBilling IP Solutions. P "Antes de imprimir pense em seu compromisso com o Meio Ambiente." -------Original Message------- From: Anderson Arboleya Date: 22/03/2012 07:57:15 To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Gateway Configuration (asteriskexampleprovided) Fernando, here's the result: send 662 bytes to udp/[189.84.133.130]:5060 at 10:49:40.725611: ------------------------------------------------------------------------ REGISTER sip:PROVIDER_IP;transport=udp SIP/2.0 Via: SIP/2.0/UDP SERVER_IP:5080;rport;branch=z9hG4bKFHjr44Ug1NZ7e Max-Forwards: 70 From: <sip:USERNAME@PROVIDER_IP;transport=udp>;tag=FN5Fjc2t9Be1K To: <sip:USERNAME@PROVIDER_IP;transport=udp> Call-ID: ae19b5d8-740c-11e1-a151-17725ca17356 CSeq: 25870616 REGISTER Contact: <sip:gw+PROVIDER_IP@SERVER_IP:5080;transport=udp;gw=189.84 133.130> Expires: 3600 User-Agent: FreeSWITCH-mod_sofia/1.0.head-git-914f6cb 2012-03-16 12-33-42 -0500 Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY Supported: timer, precondition, path, replaces Content-Length: 0 ------------------------------------------------------------------------ I've replaced the IPs according this aliases: PROVIDER_IP -> My Provider IP SERVER_IP -> My server IP (in which fs is running) Thank you very much for your help. Anderson Arboleya On Thu, Mar 22, 2012 at 7:45 AM, Fernando - NextBilling IP Solutions <fernandojdk@gmail.com> wrote:
Its Seem that FS cannot connect to your gateway.
Try the command "sofia profile external siptrace on" and see the response
from your gateway.
Post here the siptrace, maybe i can help.
Best regards, Importante: Esta mensagem, incluindo todo seu conteúdo, contém informações
confidenciais, legalmente protegidas e destinadas a indivíduo e propósito específicos. Caso a tenha recebido por engano, lembramos do caráter sigiloso e solicitamos a gentileza de desconsiderá-la e comunicar-nos o mais breve possível.
As informações contidas nesta mensagem e em seu conteúdo são de responsabilidade de seu autor, não representando necessariamente idéias, opiniões, pensamentos ou qualquer forma de posicionamento por parte da NextBilling IP Solutions. P "Antes de imprimir pense em seu compromisso com o Meio Ambiente." -------Original Message-------
From: Anderson Arboleya Date: 22/03/2012 07:40:53 To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Gateway Configuration (asterisk exampleprovided)
Hi Fernando, I added the register param too.
Brian, I've change the name to the SERVER_IP my provider sent me.
That's my configs now:
======================================================= # /usr/local/freeswitch/conf/sip_profiles/external/testing.xml <include> <gateway name="SERVER_IP"> <param name="username" value="USERNAME" /> <param name="realm" value="SERVER_IP" /> <param name="password" value="PASSWORD" /> <param name="register" value="true"/> </gateway> </include>
# /usr/local/freeswitch/conf/dialplan/public/testing.xml <include> <extension name="testing-inbound"> <condition field="destination_number" expression="^(USERNAME)$"> <action application="lua" data="/root/call_logger.lua" /> </condition> </extension> </include> =======================================================
And now I got this error:
======================================================= 2012-03-22 10:28:00.125504 [NOTICE] sofia_reg.c:415 Registering 189.84.133 130 2012-03-22 10:28:32.125503 [ERR] sofia_reg.c:1962 189.84.133.130 Registration Failed with status Request Timeout [408]. failure #1 =======================================================
When I run a "sofia status" and the fs_cli I got:
external::SERVER_IP gateway sip:USERNAME@SERVER_IP FAIL_WAIT
Any other suggestions?
Tks
Anderson Arboleya
On Wed, Mar 21, 2012 at 11:41 PM, Brian Foster <bdfoster@endigotech.com> wrote:
Whoops...
By default it will try and register to the gateway name unless stated otherwise. So as your dialplan sits, its registering to "testing" literally. Should be "example.com" or the domain you're registering to.
-BDF
On Mar 21, 2012 10:27 PM, "Anderson Arboleya" <me@nybras.com> wrote:
Hello,
I'm trying to connect freeswitch to a provider so I can call real numbers and reach my freeswitch server, but I'm kinda stuck in this process.
My provider sent me this Asterisk's configs:
======================================================= # sip.conf: register => USERNAME:PASSWD@SERVER_IP
[directcall12] context=default fromuser= USERNAME username= USERNAME secret= PASSWD type=friend host=SERVER_IP canreinvite=no nat=no dtmfmode=rfc2833 insecure=very disallow=all allow=g729
# extensions.conf: exten => 3131,1,Noop(ORIGEM - ${CALLERID(num)}) exten => 3131,n,Dial(${TRUNKPBX}/${RAMAL}) exten => 3131,n,Hangup()
** change these settings according you internal extensions configs =======================================================
Well, I tried adapting it to FreeSwitch like this (according some examples I found across the web):
======================================================= # /usr/local/freeswitch/conf/sip_profiles/external/testing.xml <include> <gateway name="testing"> <param name="username" value="USERNAME" /> <param name="realm" value="SERVER_IP" /> <param name="password" value="PASSWORD" /> </gateway> </include>
# /usr/local/freeswitch/conf/dialplan/public/testing.xml <include> <extension name="testing-inbound"> <condition field="destination_number" expression="^(USERNAME)$"> <action application="lua" data="/root/call_logger.lua" /> </condition> </extension> </include> =======================================================
In the end all I got is this log:
2012-03-17 01:41:23.565471 [NOTICE] sofia_reg.c:415 Registering testing 2012-03-17 01:41:55.565460 [ERR] sofia_reg.c:1962 testing Registration Failed with status Request Timeout [408].
All I want is to connect with my provider and route the calls made to the real number my provider gave me to my Dialplan, so my lua script will be called.
Btw, I dont actually bought a "dedicated number" but an extension. I mean, I will call a number and an IVR-menu will ask me for an extension, then I type the extension I bought (3131) and their system will send the call for me. Is this clear?
Sorry, I'm an experienced programmer but I'm just starting with all this telephony thing and I don't know what else I need to do from this point on, I have searched a lot and tried a lot of different approaches, but none succeed.
Could anybody help me with this, please?
Thanks in advance.
Anderson Arboleya
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi, Have you tried the basic first? 1. Do a ping from your FS to your provider IP to check conectivity 2. Do a telnet: telne PROVIDER_IP PORT and see if it open conection 3. Have you a firewall installed? 4. Have you FS behind a router doing NAT or it has network interface conected directly to internet? On 3/22/2012 6:34 AM, Fernando - NextBilling IP Solutions wrote:
This header has sent to your gateway by FS, where is the response? If has no response, maybe FS cannot reach your Gateway. Best Regards, ** *Importante:* Esta mensagem, incluindo todo seu conteúdo, contém informações confidenciais, legalmente protegidas e destinadas a indivíduo e propósito específicos. Caso a tenha recebido por engano, lembramos do caráter sigiloso e solicitamos a gentileza de desconsiderá-la e comunicar-nos o mais breve possível. As informações contidas nesta mensagem e em seu conteúdo são de responsabilidade de seu autor, não representando necessariamente idéias, opiniões, pensamentos ou qualquer forma de posicionamento por parte da NextBilling IP Solutions. P* "Antes de imprimir pense em seu compromisso com o Meio Ambiente."* /-------Original Message-------/ /*From:*/ Anderson Arboleya <mailto:me@nybras.com> /*Date:*/ 22/03/2012 07:57:15 /*To:*/ FreeSWITCH Users Help <mailto:freeswitch-users@lists.freeswitch.org> /*Subject:*/ Re: [Freeswitch-users] Gateway Configuration (asteriskexampleprovided) Fernando, here's the result: send 662 bytes to udp/[189.84.133.130]:5060 at 10:49:40.725611:
------------------------------------------------------------------------ REGISTER sip:PROVIDER_IP;transport=udp SIP/2.0 Via: SIP/2.0/UDP SERVER_IP:5080;rport;branch=z9hG4bKFHjr44Ug1NZ7e Max-Forwards: 70 From: <sip:USERNAME@PROVIDER_IP;transport=udp>;tag=FN5Fjc2t9Be1K To: <sip:USERNAME@PROVIDER_IP;transport=udp> Call-ID: ae19b5d8-740c-11e1-a151-17725ca17356 CSeq: 25870616 REGISTER Contact: <sip:gw+PROVIDER_IP@SERVER_IP:5080;transport=udp;gw=189.84.133.130 <mailto:sip:gw+PROVIDER_IP@SERVER_IP:5080;transport=udp;gw=189.84.133.130>> Expires: 3600 User-Agent: FreeSWITCH-mod_sofia/1.0.head-git-914f6cb 2012-03-16 12-33-42 -0500 Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY Supported: timer, precondition, path, replaces Content-Length: 0
------------------------------------------------------------------------ I've replaced the IPs according this aliases: PROVIDER_IP -> My Provider IP SERVER_IP -> My server IP (in which fs is running) Thank you very much for your help. Anderson Arboleya On Thu, Mar 22, 2012 at 7:45 AM, Fernando - NextBilling IP Solutions <fernandojdk@gmail.com <mailto:fernandojdk@gmail.com>> wrote:
Its Seem that FS cannot connect to your gateway.
Try the command "sofia profile external siptrace on" and see the
response from your gateway.
Post here the siptrace, maybe i can help.
Best regards, Importante: Esta mensagem, incluindo todo seu conteúdo, contém informações
confidenciais, legalmente protegidas e destinadas a indivíduo e propósito específicos. Caso a tenha recebido por engano, lembramos do caráter sigiloso e solicitamos a gentileza de desconsiderá-la e comunicar-nos o mais breve possível.
As informações contidas nesta mensagem e em seu conteúdo são de responsabilidade de seu autor, não representando necessariamente idéias, opiniões, pensamentos ou qualquer forma de posicionamento por parte da NextBilling IP Solutions. P "Antes de imprimir pense em seu compromisso com o Meio Ambiente." -------Original Message-------
From: Anderson Arboleya Date: 22/03/2012 07:40:53 To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Gateway Configuration (asterisk exampleprovided)
Hi Fernando, I added the register param too.
Brian, I've change the name to the SERVER_IP my provider sent me.
That's my configs now:
======================================================= # /usr/local/freeswitch/conf/sip_profiles/external/testing.xml <include> <gateway name="SERVER_IP"> <param name="username" value="USERNAME" /> <param name="realm" value="SERVER_IP" /> <param name="password" value="PASSWORD" /> <param name="register" value="true"/> </gateway> </include>
# /usr/local/freeswitch/conf/dialplan/public/testing.xml <include> <extension name="testing-inbound"> <condition field="destination_number" expression="^(USERNAME)$"> <action application="lua" data="/root/call_logger.lua" /> </condition> </extension> </include> =======================================================
And now I got this error:
======================================================= 2012-03-22 10:28:00.125504 [NOTICE] sofia_reg.c:415 Registering 189.84.133.130 2012-03-22 10:28:32.125503 [ERR] sofia_reg.c:1962 189.84.133.130 Registration Failed with status Request Timeout [408]. failure #1 =======================================================
When I run a "sofia status" and the fs_cli I got:
external::SERVER_IP gateway sip:USERNAME@SERVER_IP FAIL_WAIT
Any other suggestions?
Tks
Anderson Arboleya
On Wed, Mar 21, 2012 at 11:41 PM, Brian Foster <bdfoster@endigotech.com <mailto:bdfoster@endigotech.com>> wrote:
Whoops...
By default it will try and register to the gateway name unless stated otherwise. So as your dialplan sits, its registering to "testing" literally. Should be "example.com" or the domain you're registering to.
-BDF
On Mar 21, 2012 10:27 PM, "Anderson Arboleya" <me@nybras.com <mailto:me@nybras.com>> wrote:
Hello,
I'm trying to connect freeswitch to a provider so I can call real numbers and reach my freeswitch server, but I'm kinda stuck in this process.
My provider sent me this Asterisk's configs:
======================================================= # sip.conf: register => USERNAME:PASSWD@SERVER_IP
[directcall12] context=default fromuser= USERNAME username= USERNAME secret= PASSWD type=friend host=SERVER_IP canreinvite=no nat=no dtmfmode=rfc2833 insecure=very disallow=all allow=g729
# extensions.conf: exten => 3131,1,Noop(ORIGEM - ${CALLERID(num)}) exten => 3131,n,Dial(${TRUNKPBX}/${RAMAL}) exten => 3131,n,Hangup()
** change these settings according you internal extensions configs =======================================================
Well, I tried adapting it to FreeSwitch like this (according some examples I found across the web):
======================================================= # /usr/local/freeswitch/conf/sip_profiles/external/testing.xml <include> <gateway name="testing"> <param name="username" value="USERNAME" /> <param name="realm" value="SERVER_IP" /> <param name="password" value="PASSWORD" /> </gateway> </include>
# /usr/local/freeswitch/conf/dialplan/public/testing.xml <include> <extension name="testing-inbound"> <condition field="destination_number" expression="^(USERNAME)$"> <action application="lua" data="/root/call_logger.lua" /> </condition> </extension> </include> =======================================================
In the end all I got is this log:
2012-03-17 01:41:23.565471 [NOTICE] sofia_reg.c:415 Registering
testing
2012-03-17 01:41:55.565460 [ERR] sofia_reg.c:1962 testing Registration Failed with status Request Timeout [408].
All I want is to connect with my provider and route the calls made to the real number my provider gave me to my Dialplan, so my lua script will be called.
Btw, I dont actually bought a "dedicated number" but an extension. I mean, I will call a number and an IVR-menu will ask me for an extension, then I type the extension I bought (3131) and their system will send the call for me. Is this clear?
Sorry, I'm an experienced programmer but I'm just starting with all this telephony thing and I don't know what else I need to do from this point on, I have searched a lot and tried a lot of different approaches, but none succeed.
Could anybody help me with this, please?
Thanks in advance.
Anderson Arboleya
Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
No virus found in this message. Checked by AVG - www.avg.com <http://www.avg.com> Version: 2012.0.1913 / Virus Database: 2114/4886 - Release Date: 03/22/12
-- Atentamente, *Dario García* Consultor. CCCT, Nivel C2, Sector Yarey, Mz, Ofc. MZ03a. Caracas-Venezuela. Teléfono: +58 212 9081842 Cel: +58 412 2221515 dgarcia@anew.com.ve http://www.anew.com.ve
Damn! I forgot to do a stupid telnet. Thank you for shaking me, I was assuming the mistake was mine because I'm so new to this. There was a problem with the provider's firewall but now it seems to be solved, when I do a "sofia status" the gateway appears REGED. Now I'm trying to properly route the calls in my dialplan to run my LuaScript. So far I have: /usr/local/freeswitch/conf/dialplan/public/testing.xml ======================================== <include> <extension name="testing-inbound"> <condition field="destination_number" expression=".*"> <action application="lua" data="/root/ginga-gingaphone/freeswitch/operator.lua" > </condition> </extension> </include> ======================================== But when I call my number I got this log: ======================================== 2012-03-23 20:36:23.465456 [NOTICE] switch_channel.c:926 New Channel sofia/external/1135678377@189.84.133.130:5060[dae908e0-7527-11e1-8295-15ac0b75d081] 2012-03-23 20:36:23.465456 [NOTICE] sofia.c:5813 Hangup sofia/external/ 1135678377@189.84.133.130:5060 [CS_NEW] [INCOMPATIBLE_DESTINATION] 2012-03-23 20:36:23.465456 [NOTICE] switch_core_session.c:1400 Session 8 (sofia/external/1135678377@189.84.133.130:5060) Ended 2012-03-23 20:36:23.465456 [NOTICE] switch_core_session.c:1402 Close Channel sofia/external/1135678377@189.84.133.130:5060 [CS_DESTROY] ======================================== When I tested the same Dialplan in the default context, calling from a SIP client without passing through the external gateway it worked fine and my lua script is hit, answering the call. What am I doing wrong? Thanks again. Anderson Arboleya On Thu, Mar 22, 2012 at 10:12 AM, Saugort Dario Garcia Tovar < dgarcia@anew.com.ve> wrote:
Hi,
Have you tried the basic first? 1. Do a ping from your FS to your provider IP to check conectivity 2. Do a telnet: telne PROVIDER_IP PORT and see if it open conection 3. Have you a firewall installed? 4. Have you FS behind a router doing NAT or it has network interface
conected directly to internet?
participants (4)
-
Anderson Arboleya
-
Brian Foster
-
Fernando - NextBilling IP Solutions
-
Saugort Dario Garcia Tovar