Jacek, I had a similar problem once. It actually depends on your sip gateway, but I was able to solve the problem by setting the caller id, ie: session1 = new Session(); session1.setCallerData("caller_id_name", "8280052500"); session1.setCallerData("caller_id_number", "8280052500"); session1.originate(session1, "{ignore_early_media=true}sofia/gateway/sip.ipcorp.cl/0225490317", 60); In this case, the caller_id was the number assigned to me by the external gateway. Hope it helps. Nicolas On Tue, Feb 3, 2009 at 10:36 AM, Jacek Sokulski <jsokulski@dotsystems.pl> wrote:
Hello I am trying to initiate a call from javascript, it works fine for local numbers:
session1.originate(session1, "{ignore_early_media=true}user/1008@192.168.1.122");
but when I am trying to connect through sofia gateway, the connection is not being established:
session2.originate(session2, "sofia/gateway/halonet/0225490317");
although I can call to this number from softphone. I have also tried setting effective_caller_id_number:
session1.originate(session1, "{effective_caller_id_number=fixed0248b}sofia/gateway/halonet/0225490317");
with the same result.
A configuration in the dialplan that works is:
<extension name="halonet.pl"> <condition field="destination_number" expression="^0095(\d{10})$"> <action application="set" data="effective_caller_id_number=fixed0248b"/> <action application="set" data="bypass_media=true"/> <action application="set" data="hangup_after_bridge=true"/> <action application="bridge" data="sofia/gateway/halonet/$1"/> </condition> </extension>
Would appreciate any help. Jacek
_______________________________________________ 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