[asterisk-dev] Setting the context in a SIP channel
Marc Haisenko
haisenko at comdasys.com
Tue Jan 24 04:48:40 MST 2006
Hi folks,
I've got a problem that seemed trivial to me at first but which I currently
can't solve.
I'm writing an application which creates a SIP channel. It should mimic
another original channel as that on is hung up. By "mimic" I mean that
channel should get the same context, extension, priority.
This works fine by setting the appropiate channel variables, and when I call
ast_pbx_start it works as expected.
However SIP transfers don't work any more because it seems sip_pvt has its own
context and exten variables and uses these ones in the transfer.
So I thought, "well, I just need to set those variables", but there doesn't
seem to be a way to do this: there doesn't seem to be a callback that I can
use to do this and since chan_sip.c is just one monolithic C file with no
header file I can't set that variable directly as I can't get the layout of
struct sip_pvt.
Have I missed something so far ?
If not, I see two ways of overcoming this problem: the first would be to
implement setting the context/exten from the outside, the second would be to
use the context/exten of the owning channel.
So what's the reason for sip_pvt to include the context and exten variables ?
Why not use the ones from the owning channel ?
C'ya,
Marc
--
Marc Haisenko
Comdasys AG
Rüdesheimer Straße 7
D-80686 München
Tel: +49 (0)89 - 548 43 33 0
Fax: +49 (0)89 - 548 43 33 29
e-mail: haisenko at comdasys.com
http://www.comdasys.com
More information about the asterisk-dev
mailing list