Skip to content

Commit 0b1f01f

Browse files
alfredhrichaas
authored andcommitted
sipreg: add from_name (Display Name) (creytiv#104)
1 parent 83ef499 commit 0b1f01f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

include/re_sipreg.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ struct sipreg;
88

99

1010
int sipreg_register(struct sipreg **regp, struct sip *sip, const char *reg_uri,
11-
const char *to_uri, const char *from_uri, uint32_t expires,
11+
const char *to_uri, const char *from_name,
12+
const char *from_uri, uint32_t expires,
1213
const char *cuser, const char *routev[], uint32_t routec,
1314
int regid, sip_auth_h *authh, void *aarg, bool aref,
1415
sip_resp_h *resph, void *arg,

src/sipreg/reg.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ static int request(struct sipreg *reg, bool reset_ls)
306306
* @param sip SIP Stack instance
307307
* @param reg_uri SIP Request URI
308308
* @param to_uri SIP To-header URI
309+
* @param from_name SIP From-header display name (optional)
309310
* @param from_uri SIP From-header URI
310311
* @param expires Registration interval in [seconds]
311312
* @param cuser Contact username
@@ -323,7 +324,8 @@ static int request(struct sipreg *reg, bool reset_ls)
323324
* @return 0 if success, otherwise errorcode
324325
*/
325326
int sipreg_register(struct sipreg **regp, struct sip *sip, const char *reg_uri,
326-
const char *to_uri, const char *from_uri, uint32_t expires,
327+
const char *to_uri, const char *from_name,
328+
const char *from_uri, uint32_t expires,
327329
const char *cuser, const char *routev[], uint32_t routec,
328330
int regid, sip_auth_h *authh, void *aarg, bool aref,
329331
sip_resp_h *resph, void *arg,
@@ -340,7 +342,7 @@ int sipreg_register(struct sipreg **regp, struct sip *sip, const char *reg_uri,
340342
if (!reg)
341343
return ENOMEM;
342344

343-
err = sip_dialog_alloc(&reg->dlg, reg_uri, to_uri, NULL, from_uri,
345+
err = sip_dialog_alloc(&reg->dlg, reg_uri, to_uri, from_name, from_uri,
344346
routev, routec);
345347
if (err)
346348
goto out;

0 commit comments

Comments
 (0)