[asterisk-dev] Query about getting peer information in chan_sip.c

Chan Kwang Mien kwangmien at asgent-tech.com
Thu Jun 28 23:09:14 CDT 2007


I am trying to get peer information in chan_sip.c for the following
scenario :

 Phone A -> Asterisk_1 -> Asterisk_2 -> Phone B

Asterisk_1 is registered to Asterisk_2.

When Asterisk_1 receives INVITE from Phone A, Asterisk_1 sends the INVITE
to Asterisk_2. I understand that sip_call(...) is called when the INVITE
is sent at Asterisk_1.

At the point in time when INVITE is sent by Asterisk_1, I would like to
find out who the originator of the INVITE is in sip_call(...).

Is there a way I could get this information, in this case, Phone A's
extension in sip_call(...) ?

Thank you.

Kwang Mien

More information about the asterisk-dev mailing list