[Freeswitch-users] Newbie -- Help Needed Transferring Inbound Caller ID to external SIP Gateway URI

Notify Me notify.sina at gmail.com
Thu Nov 27 22:10:37 MSK 2014


Hi!

I am very very new to Freeswitch. I am running FreeSWITCH Version
1.5.15b+git~20141120T035109Z~79de78a0fb~64bit (git 79de78a 2014-11-20
03:51:09Z 64bit) on a CentOS 6.6 64-bit Virtual Machine.

I am trying to setup freeswitch such that once it gets a call through
a sip gateway, it sends the caller ID to another SIP gateway (A URI)
to be processed.
I am having a lot of difficulty and I am not sure if I am doing the
right things correctly, and the logs give so much information it is
difficult to see what is happening. Please help me verify if I am
correctly configured.

I've setup the gateways I expect inbound calls from and freeswitch
registers correctly.
example:
 <gateway name="sipgw081">
   <param name="username" value="012345081"/>
   <param name="password" value="xxxxx"/>
   <param name="register" value="true"/>
   <param name="realm" value="sip.sipgwtelecoms.com"/>
   <param name="proxy" value="sip.sipgwtelecoms.com"/>
   <param name="outbound-proxy" value="sip.sipgwtelecoms.com"/>
   <param name="caller-id-in-from" value="true"/>
 </gateway>

Sofia returns:
external::sipgw081       gateway
sip:012345081 at sip.sipgwtelecoms.com      REGED

 The gateway I expect to route caller_id_numbers to is defined, but as
I was not given a password or asked to register I set it up like so
(is this OK?):
 <gateway name="othersipgw">
  <param name="username" value="user.name"/>
  <param name="password" value="none"/>
  <param name="register" value="false"/>
  <param name="realm" value="sip.othersipgw.in"/>
  <param name="proxy" value="sip.othersipgw.in"/>
  <param name="outbound-proxy" value="sip.othersipgw.in"/>
  <param name="expire-seconds" value="3600"/>
<!--  <param name="caller-id-in-from" value="true"/> -->
 </gateway>

Sofia returns:
external::othersipgw       gateway
sip:user.name at sip.othersipgw.in      NOREG

>From what I can see in the documentation I've read, in order to route
inbound calls anywhere in freeswitch,
Calls that initially come in to the public context and are treated as
untrusted—if they are not
specifically routed to an extension in the default context, then they
are simply disconnected.

So I created a file in conf/dailplan/public with the following to dail
an extension 1212 in default( I want to route caller IDs with 11
digits, all beginning with number 0):

<include>
 <extension name="sipgw-inbound">
  <condition field="caller_id_number"  expression="^0(\d+)$">
<!--   <action application="set" data="domain_name=$${domain}"/> -->
   <action application="transfer" data="1212 XML default"/>
  </condition>
 </extension>
</include>

This is where my confusion starts. I both created a file in
conf/dialplan/default and edited the conf/dialplan/default.xml to
route calls sent to 1212 through to the external gateway URI. I also
want the caller_id prefixed with a +234

default.xml:

    <extension name="1212">
     <condition field="destination_number" expression="^1212$">
      <action application="set"data="absolute_codec_string=G729"/>
      <action application="set" data="hangup_after_bridge=true"/>
      <action application="bridge" data="sofia/gateway/othersipgw/+234$1"/>
    </condition>
   </extension>

outbound.xml file in conf/dialplan/default:

<include>
 <extension name="othersipgwoutbound">
  <condition field="destination number" expression="1212">
   <action application="set"data="absolute_codec_string=G729"/>
   <action application="bridge"
data="[leg_timeout=5]sofia/gateway/othersipgw/$1"/>
  </condition>
 </extension>
</include>


Any assistance gratefully accepted.



Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list