hishamabs / sipek2

Automatically exported from code.google.com/p/sipek2
1 stars 0 forks source link

Caller ID for incoming calls displays "MOD_SOFIA" instead of extension number when connected to freeswitch #17

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. install freeswitch (default configuration is ok)
2. connect as extension 1000 with gui
3. connect as extension 1001 with x-lite or another sip phone
4. call extension 1000 from x-lite

What is the expected output? What do you see instead?
expected: gui displaying call from 1000
instead: gui displays an incoming call from 'mod_sofia' (the sip stack used 
by freeswitch)

What version of the product are you using? On what operating system?
last sipek binary release (as of today)
last freeswitch binary windows (.msi) distribution

Please provide any additional information below.
call extension 1001 from gui - x-lite displays an incoming call from 1000

Original issue reported on code.google.com by rough...@gmail.com on 25 Nov 2008 at 2:48

GoogleCodeExporter commented 8 years ago
Also tested OK with jain-sip communicator and x-lite

Original comment by rough...@gmail.com on 25 Nov 2008 at 11:09

GoogleCodeExporter commented 8 years ago
Problem doesn't show up with Yate

Original comment by rough...@gmail.com on 29 Nov 2008 at 8:24

GoogleCodeExporter commented 8 years ago

Original comment by sasa...@gmail.com on 30 Jan 2009 at 7:04

GoogleCodeExporter commented 8 years ago
@roughraf: same setup (and error) here.
I fixed it by patching last line of function on_incoming_call in pjsipDll.cpp:

function: static on_incoming_call(pjsua_acc_id acc_id,
pjsua_call_id call_id,                                                   pjsip_rx_data *rdata)

original line:
if (cb_callincoming != 0) cb_callincoming(call_id, 
call_info.remote_contact.ptr);

patched line:
if (cb_callincoming != 0) cb_callincoming(call_id, call_info.remote_info.ptr);

It works for me, waiting for Sasa confirmation...

Original comment by claudio....@gmail.com on 11 Jun 2009 at 10:01

GoogleCodeExporter commented 8 years ago
@claudio.nicora
Thanks, I've seen your comment only tonight. Do you know if this change is 
packaged in 
a release? Or can you share a precompiled pjsip.dll with this fix?

Original comment by rough...@gmail.com on 31 Jul 2009 at 9:12

GoogleCodeExporter commented 8 years ago
@roughraf
I don't think any official release contains this fix because when I last update 
from
SVN it was not included yet.
Still waiting for Sasa...

I attached my pjsip.dll, statically linked for x86.
Hope it works for you.

Original comment by claudio....@gmail.com on 31 Jul 2009 at 9:35

Attachments:

GoogleCodeExporter commented 8 years ago
...too bad it doesn't. FreeSWITCH cannot forward any call to the registered 
sipekphone reporting the following error:

2009-08-01 00:08:40 [CRIT] mod_local_stream.c:237 read_stream_thread() Leaking 
stream 
handle! [switch_ivr_originate() ..\..\src\switch_ivr_originate.c:1640]

I've also tried a pjsip dll from here 
http://code.google.com/p/sipeksdk/source/browse/#svn/trunk/pjsipdll/Lib
but it shows similar behaviour

Thanks for having tried - sasa, we need your help!

Ciao,
   Raffaele

Original comment by rough...@gmail.com on 31 Jul 2009 at 10:13

GoogleCodeExporter commented 8 years ago
@claudio.nicora

maybe SipekSdk.dll is required to be updated as well? Does it make any sense? 
Can you 
try to attach it, too?

Original comment by rough...@gmail.com on 31 Jul 2009 at 11:58

GoogleCodeExporter commented 8 years ago
@claudio.nicora

do you know what sip variable "remote_info" and "remote_contact" represent? 
maybe I can 
try to patch it in FS dialplan playing with variables

Original comment by rough...@gmail.com on 1 Aug 2009 at 7:27

GoogleCodeExporter commented 8 years ago
found it! The variable is "sip_contact_user". Assigning it a value from the 
dialplan 
(or in any other way) corrects the problem. 

You can try it from FreeSWITCH command line:

   originate user/1001 1000 
   --> shows an incoming call from mod_sofia
   originate {sip_contact_user=1000}user/1001 1000
   --> shows an incoming call from 1000

This behaviour is probably a bit different from the standard - but in FS or in 
Sipek? 
Easy to correct, anyhow, but I'll point this out in the FS mailing list

Original comment by rough...@gmail.com on 1 Aug 2009 at 8:37

GoogleCodeExporter commented 8 years ago
@roughraf: great, you sorted it out! I'll try ASAP in my FS.
Please update this thread if get an answer from FS mailing list.

Anyway, this is my patched SipekSdk.dll

Original comment by claudio....@gmail.com on 1 Aug 2009 at 9:27

Attachments:

GoogleCodeExporter commented 8 years ago
Dear all,

I am unable to figure out a workaround for this problem. I tried @roughraf's 
method from freeswitch console, still my application using SIPEK SDK shows 
"mod_sofia" as calling number, and "NULL" as calling name.

BTW I used an instance of IStateMachine as _call, and I am using 
CallManager.getCall(sessiodId) to receive an incoming call.

The pjsip DLL here (attached above) does not work and shows up an error about 
not being accessible or invalid COM component, when I try to add it as 
reference in my VB.NET (VS2008) project. 

Please help me out if some one has found a solution. Anything, even workarounds 
like roughraf suggested about modifying some variables in dialplan or directory 
that are successful would be highly appreciated!

Original comment by jagdi...@ritrl.com on 6 Jun 2012 at 11:54