[asterisk-dev] sip_pvt call origin information
Mark Michelson
mmichelson at digium.com
Thu Sep 2 12:08:02 CDT 2010
On 09/02/2010 11:55 AM, st41ker wrote:
> Hello,
>
> Could, please, someone clarify for me on how to get call origin (is it
> was dialed or it's an incoming call) by only using sip_pvt object?
>
> Thank you,
> Alexander.
>
>
Depending on the version of Asterisk you are using, you either can look
at the pvt's outgoing_call field, or check its flags for the
SIP_PAGE2_OUTGOING_CALL flag (ast_test_flag(&pvt->flags[1],
SIP_PAGE2_OUTGOING_CALL). Later versions of Asterisk use the first
method and earlier versions use the second method.
Mark Michelson
More information about the asterisk-dev
mailing list