Review Board 1.7.16


Add ISDN Calling and Called Subaddress support functions to LIBPRI

Review Request #406 - Created Oct. 14, 2009 and submitted

Alec Davis
15604
Reviewers
asterisk-dev
mattf, rmudgett
LibPRI
Further Libpri support for subaddress, previously LIBPRI only supported receiving Calling Subaddress.

The first intentions of this are to add Transmit and Receive capabilites for Calling Subaddress and Called Subaddress.

Calling, Called, Connected and Redirecting Subaddress, now correctly supports User Specific type and the default NSAP.

Redirection and Redirecting Subaddress have been identified, but will come later.

 

Changes between revision 1 and 6

1 2 3 4 5 6 7
1 2 3 4 5 6 7

  1. /team/rmudgett/subaddr/libpri.h: Loading...
  2. /team/rmudgett/subaddr/pri.c: Loading...
  3. /team/rmudgett/subaddr/pri_internal.h: Loading...
  4. /team/rmudgett/subaddr/pri_q931.h: Loading...
  5. /team/rmudgett/subaddr/q931.c: Loading...
/team/rmudgett/subaddr/libpri.h
Diff Revision 1 Diff Revision 6
[20] 425 lines
[+20] [+] struct pri_party_subaddress {
426
	/*!
426
	/*!
427
	 * \brief Subaddress data with null terminator.
427
	 * \brief Subaddress data with null terminator.
428
	 * \note The null terminator is a convenience only since the data could be
428
	 * \note The null terminator is a convenience only since the data could be
429
	 * BCD/binary and thus have a null byte as part of the contents.
429
	 * BCD/binary and thus have a null byte as part of the contents.
430
	 */
430
	 */
431
	char data[32];
431
	unsigned char data[32];
432
};
432
};
433

    
   
433

   
434
/*! \brief Information needed to identify an endpoint in a call. */
434
/*! \brief Information needed to identify an endpoint in a call. */
435
struct pri_party_id {
435
struct pri_party_id {
436
	/*! \brief Subscriber name */
436
	/*! \brief Subscriber name */
[+20] [20] 168 lines
[+20] [+] typedef struct pri_event_ring {
605
	char origcallednum[256];
605
	char origcallednum[256];
606
	int callingplanorigcalled;		/* Dialing plan of Originally Called Number */
606
	int callingplanorigcalled;		/* Dialing plan of Originally Called Number */
607
	int origredirectingreason;
607
	int origredirectingreason;
608
	int reversecharge;
608
	int reversecharge;
609
	struct pri_subcommands *subcmds;
609
	struct pri_subcommands *subcmds;
610
	struct pri_party_subaddress calling_subaddress;	/* Calling parties subaddress */
610
	struct pri_party_id calling;			/* Calling Party's info, initially subaddress' */
611
	struct pri_party_subaddress called_subaddress;	/* Called parties subaddress */
611
	struct pri_party_subaddress called_subaddress;	/* Called parties subaddress */
612
} pri_event_ring;
612
} pri_event_ring;
613

    
   
613

   
614
typedef struct pri_event_hangup {
614
typedef struct pri_event_hangup {
615
	int e;
615
	int e;
[+20] [20] 246 lines
[+20] [+] int pri_sr_set_caller(struct pri_sr *sr, char *caller, char *callername, int callerplan, int callerpres);
862
 * \param sr New call SETUP record.
862
 * \param sr New call SETUP record.
863
 * \param Subaddress information to set.
863
 * \param Subaddress information to set.
864
 *
864
 *
865
 * \return Nothing
865
 * \return Nothing
866
 */
866
 */

    
   
867

   
867
#define HAVE_PRI_SUBADDR
868
#define HAVE_PRI_SUBADDR
868
void pri_sr_set_calling_subaddress(struct pri_sr *sr, const struct pri_party_subaddress *subaddress);
869
/* XXX TODO XXX remove the above HAVE_PRI_SUBADDR line and put a test for the feature in configure.ac when it is committed

    
   
870
 */

    
   
871
void pri_sr_set_caller_subaddress(struct pri_sr *sr, const struct pri_party_subaddress *subaddress);
869
void pri_sr_set_called_subaddress(struct pri_sr *sr, const struct pri_party_subaddress *subaddress);
872
void pri_sr_set_called_subaddress(struct pri_sr *sr, const struct pri_party_subaddress *subaddress);
870

    
   
873

   
871
/*!
874
/*!
872
 * \brief Set the redirecting information in the call SETUP record.
875
 * \brief Set the redirecting information in the call SETUP record.
873
 *
876
 *
[+20] [20] 11 lines
[+20] [+] int pri_sr_set_redirecting(struct pri_sr *sr, char *num, int plan, int pres, int reason);
885
void pri_sr_set_useruser(struct pri_sr *sr, const char *userchars);
888
void pri_sr_set_useruser(struct pri_sr *sr, const char *userchars);
886
void pri_sr_set_reversecharge(struct pri_sr *sr, int requested);
889
void pri_sr_set_reversecharge(struct pri_sr *sr, int requested);
887

    
   
890

   
888
void pri_call_set_useruser(q931_call *sr, const char *userchars);
891
void pri_call_set_useruser(q931_call *sr, const char *userchars);
889

    
   
892

   
890

    
   

   
891
int pri_setup(struct pri *pri, q931_call *call, struct pri_sr *req);
893
int pri_setup(struct pri *pri, q931_call *call, struct pri_sr *req);
892

    
   
894

   
893
/*!
895
/*!
894
 * \brief Set a call as a call indpendent signalling connection (i.e. no bchan)
896
 * \brief Set a call as a call indpendent signalling connection (i.e. no bchan)
895
 * \note Call will automaticlly disconnect after signalling sent.
897
 * \note Call will automaticlly disconnect after signalling sent.
[+20] [20] 124 lines
/team/rmudgett/subaddr/pri.c
Diff Revision 1 Diff Revision 6
 
/team/rmudgett/subaddr/pri_internal.h
Diff Revision 1 Diff Revision 6
 
/team/rmudgett/subaddr/pri_q931.h
Diff Revision 1 Diff Revision 6
 
/team/rmudgett/subaddr/q931.c
Diff Revision 1 Diff Revision 6
 
  1. /team/rmudgett/subaddr/libpri.h: Loading...
  2. /team/rmudgett/subaddr/pri.c: Loading...
  3. /team/rmudgett/subaddr/pri_internal.h: Loading...
  4. /team/rmudgett/subaddr/pri_q931.h: Loading...
  5. /team/rmudgett/subaddr/q931.c: Loading...

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.